Charm scrolls not functioning properly

I'm sure there will be a TON of bugs discovered. List them here and we will cross them off the list as they are fixed.

Charm scrolls not functioning properly

Postby adosorken on Sat Aug 27, 2016 12:59 am

So I used an Ice Charm scroll (381 10) and it sent me to 0,600 in El Verloon. All three of the charm scrolls have the wrong sprite (they look like normal scrolls, just... orange). Spark Charm and Blood Charm do nothing.
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Charm scrolls not functioning properly

Postby adosorken on Sat Aug 27, 2016 6:23 am

OK so I checked out the STB files like you did for the return scrolls... Ice Charm is skill #3181. X is 0, Y is 60. That would explain why it put me at 0,600. Curious as to why it even teleported though. The other two don't work, as the value before the X (which your excel app lists as "warp zone no.") are both blank. For Ice Charm, this is 24. (The STB editor I am using is not fully translated.)
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Charm scrolls not functioning properly

Postby rl2171 on Sun Aug 28, 2016 12:29 am

Those charms aren't teleport scrolls, they are AOEs, like a bomb. I remember them in iRose alot. very powerful at the time.

Hasn't been working in the later versions of EVO.
Image
rl2171
Admin
Admin
 
Posts: 1706
Joined: Mon Aug 06, 2007 5:17 pm
Location: Sacramento, CA USA - GMT-8

Re: Charm scrolls not functioning properly

Postby adosorken on Sun Aug 28, 2016 2:17 pm

Yep, I know they're not teleport scrolls, which is why I am wondering why Ice Charm teleported. The values in the STB at those columns were valid for a teleport scroll for Ice Charm but not for the other two. It's probably just a mismatch somewhere. I use these scrolls all the time in AruaROSE and in my hodgepodge client/server setup that I first set up when I first got involved here. :D
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Charm scrolls not functioning properly

Postby PurpleYouko on Sun Aug 28, 2016 9:29 pm

It's because started rewriting all the useitems code to read data directly from the STB. The old way was to have about 300 case and if statements and with all the values pretty much hard coded.
I was kind of sick of the way it used to be done, all disjointed and messy so i decided to tidy it all up and recode it from the ground up.

First thing i did was the teleport functions. It's obviously reading charm scrolls as return scrolls. A minor tweak will fix that. ;)
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Charm scrolls not functioning properly

Postby adosorken on Mon Aug 29, 2016 3:48 am

Awesomeness. :D
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Charm scrolls not functioning properly

Postby PurpleYouko on Mon Aug 29, 2016 3:37 pm

Modified the code that works for return scrolls to exclude charm scrolls that strangely have values in the "warp zone" field

This will fix the error with the charm scrolls warping but might possibly leave them doing nothing at all in which case i will need to spend a lot more time than I currently have available to me in rewriting the code in worldpackets.cpp

for anyone attempting to figure it out for themselves the way that most useitems work is this.

First this function is called in extrafunctions.cpp
// Get Consumible Item Info
CUseInfo* CWorldServer::GetUseItemInfo(CPlayer* thisclient, unsigned int slot )


It creates a use-script and use-value variable for the consumable item that is used but does nothing else with it. Go look up the code to see what I mean. IMO this is highly unsatisfactory so I began changing it to remove this function altogether.
The use-script and use-value variables are then passed to function
// Consumible Items
bool CWorldServer::pakUseItem ( CPlayer* thisclient, CPacket* P )

in worldpackets.cpp and that is where i have started to rebuild the code using a more sensible approach.

here is the code that I wrote for return scrolls so that they can read directly from the STB
  1. //if the useitem has an attached skill.....
  2.     if( thisuse->skillid != 0 )
  3.     {
  4.         CSkills* thisskill = GetSkillByID( thisuse->skillid );
  5.         //This one line of code should replace almost the entire switch below
  6.         thisclient->StartAction( NULL, thisskill->skilltype, thisskill->id );
  7.  
  8.         if( thisskill->WarpZone != 0 && thisskill->target == 0) //return scrolls or any other item that runs a warp in the skill. this is NOT handled in skill handling for some reason
  9.         {
  10.             BEGINPACKET( pak,0x7a3 );
  11.             ADDWORD    ( pak,thisclient->clientid );
  12.             ADDWORD    ( pak, thisuse->itemnum );
  13.             ADDBYTE    ( pak,slot );
  14.             thisclient->client->SendPacket( &pak );
  15.             fPoint thispoint;
  16.             thispoint.x = thisskill->WarpX * 10;
  17.             thispoint.y = thisskill->WarpY * 10;           
  18.             TeleportTo ( thisclient, thisskill->WarpZone, thispoint );
  19.             thisuse->usescript = 999;
  20.         }
  21.         flag = true;
  22.     }

I added "&& thisskill->target == 0" to stop it trying to warp the player when they use charm scrolls
As you can probably tell though, there are WAY more use-items that are associated with skills so this is just the very start of a large number of cases that need to be rewritten.
Further down the code I found that I had commented out charm scrolls and cherry berries, indicating that they were covered by the code above. I'm no longer sure what I was thinking at the time because they do not appear to be covered at all so I suspect they will not work at all unless they are recoded in the new section OR uncommented
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm


Return to BUGS

Who is online

Users browsing this forum: No registered users and 2 guests