Bypass the Range value in Return Scrolls.

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: Bypass the Range value in Return Scrolls.

Postby PurpleYouko on Mon Nov 19, 2012 4:49 pm

I think the deal is that it only gets kicked back after it calls the SKILL. That is where the actual world information is stored.
If the client considers a NULL value to be a valid one then it's going to kick back a blank entry ( in the skills STB) too so the server will never receive the packet.
313 is listed as "magic item" though so it should be possible to get past client checks. There are plenty of other 313 items other than return scrolls.
Most likely you would just have to delete the skill value in the LIST_USEITEM.STB entry in the existing entry then just allow it to run through the server. certainly worth a shot anyway ;)
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: Bypass the Range value in Return Scrolls.

Postby kismetbecomes on Mon Nov 19, 2012 5:33 pm

PurpleYouko wrote:I think the deal is that it only gets kicked back after it calls the SKILL. That is where the actual world information is stored.
If the client considers a NULL value to be a valid one then it's going to kick back a blank entry ( in the skills STB) too so the server will never receive the packet.
313 is listed as "magic item" though so it should be possible to get past client checks. There are plenty of other 313 items other than return scrolls.
Most likely you would just have to delete the skill value in the LIST_USEITEM.STB entry in the existing entry then just allow it to run through the server. certainly worth a shot anyway ;)


Yeah! That might work! :o
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Re: Bypass the Range value in Return Scrolls.

Postby kismetbecomes on Thu Apr 18, 2013 8:33 pm

PurpleYouko wrote:Most likely you would just have to delete the skill value in the LIST_USEITEM.STB entry in the existing entry then just allow it to run through the server. certainly worth a shot anyway ;)


(I almost forgot about this post, until now that I had to work on the restrict-less scrolls again. I cannot settle with the /go command anymore.)

The client doesn't allow NULL entries in the skill value. I cannot use the item if the value is empty, is that requirement somehow coded in the server? I cannot identify where it is declared that a return scroll needs a skill value, I looked under CUseInfo* CWorldServer::GetUseItemInfo(CPlayer* thisclient, unsigned int slot ).


I think the message you are getting is from the client.

I've just thought of a way it could be worked with custom scrolls.
You would need to make a new scroll in LIST_USEITEMS.STB but leave all the data entries in the STB pretty much blank except for the type (313).
That way it should avoid client side tests. We don't actually need it to call a skill since the server doesn't use the skill anyway. It uses a case command.

Then you can simply make a special case for your scroll in extrafuntions.cpp under case 313: in function CUseInfo* CWorldServer::GetUseItemInfo(CPlayer* thisclient, unsigned int slot )

just add a new case for your scroll or modify the original one. The original cases are all there already.


Altho, after re-reading this, it gave me an idea. But, the problem is I do not know how to code a special case to make the scrolls restrict-less using the custom scroll technique. I have this inside my extrafuntions: (this you also taught me.)


  1. else //Return Scrolls
  2.  
  3.             if( (useitem->itemnum>347 && useitem->itemnum<371) && (useitem->itemnum>510 && useitem->itemnum<521))
  4.             {
  5.  
  6.             if( thisclient->Stats->MP < 33 )
  7.                 {
  8.                     delete useitem;
  9.                     return NULL;
  10.                 }
  11.                 thisclient->Stats->MP -= 32;
  12.                 useitem->usescript = 2;
  13.                 switch( useitem->itemnum )
  14.             {
  15.                         //Adventure's Plains
  16.                                 case 350:
  17.  
  18.                                    if( thisclient->Stats->Level < 1 )
  19.                                     {
  20.                                           SendPM(thisclient,"You do not meet the required level to use this item.");
  21.                                           return NULL;
  22.                                     }
  23.                                     useitem->usetype = 22;
  24.                                     useitem->usevalue = 56525198;
  25.                                 break;



Modifying or making a custom scroll is MURDERING my mind. I don't know how, where to begin and what to do first. Editing is easy, but modifying it to the point of a new function, well... I'm sorry. :?

Altho, I was thinking of a way to make a case that USES or at least does a similar effect when a player uses /go command.

Here is the old code of the /go system.
  1. else if (strcmp(command, "go")==0) // AtCommandGo
  2.     {
  3.         if(Config.Command_go > thisclient->Session->accesslevel)
  4.            return true;
  5.         if ((tmp = strtok(NULL, " ")) == NULL) tmp = 0; int loc=atoi(tmp);
  6.         if(Config.Command_Go > thisclient->Session->accesslevel)
  7.             return true;
  8.         int x = 0;
  9.         int y = 0;
  10.         int map = 0;
  11.         if(loc == 1) // Adventure Plains
  12.         {
  13.             map = 22;
  14.             x = 5644; //old map
  15.             y = 5174; // old map
  16.             //x = 5098; // new map
  17.             //y = 5322; // new map
  18.         }
  19.         else if(loc == 2) // Canyon City of Zant
  20.         {
  21.             map = 1;
  22.             x = 5240;
  23.             y = 5192;
  24.         }
  25.         else if (loc == 3) // Junon Polis
  26.         {
  27.             map = 2;
  28.             x = 5514;
  29.             y = 5364;
  30.         }



Is it possible to revise the return scroll codes to something like:

  1. //Adventurer Plains
  2. if(useitem->itemnum==350){
  3.            map = 22; //map to where it will teleport to
  4.             x = 5644; //coordinate
  5.             y = 5174; //coordinate
  6. }
  7.  
  8.  
  9. //Zant
  10. else if (useitem->itemnum==351){
  11.  map = 22; //map to where it will teleport to
  12.             x = 5644; //coordinate
  13.             y = 5174; //coordinate
  14. }
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Re: Bypass the Range value in Return Scrolls.

Postby ICON on Thu Apr 18, 2013 9:19 pm

Simple fix if you have not got it, Use an event scroll that calls a npc dialog and makes the box say go here. Event Scrolls to base off are like 500 to 507 or something they can call a event trigger to pull a con file for npc dialog box give them a move and a no thanks, and trigger it from a qsd file. I have done many event scrolls and that is a easy way of doing a lot of things in Rose.
Move along move along like i know you Should.

New games in the making....
ICON
Clown
Clown
 
Posts: 532
Joined: Mon Feb 04, 2008 7:34 am

Re: Bypass the Range value in Return Scrolls.

Postby PurpleYouko on Fri Apr 19, 2013 3:09 pm

Lol

It pretty much IS written that way already.

The way it is now
  1. //Adventure's Plains
  2.                                 case 350:
  3.  
  4.                                    if( thisclient->Stats->Level < 1 )
  5.                                     {
  6.                                           SendPM(thisclient,"You do not meet the required level to use this item.");
  7.                                           return NULL;
  8.                                     }
  9.                                     useitem->usetype = 22;
  10.                                     useitem->usevalue = 56525198;
  11.                                 break;

the way you want it
  1. if(loc == 1) // Adventure Plains
  2.         {
  3.             map = 22;
  4.             x = 5644; //old map
  5.             y = 5174; // old map
  6.             //x = 5098; // new map
  7.             //y = 5322; // new map
  8.         }

just take a good look at the values from the scroll
useitem->usetype = 22; this is the map id
useitem->usevalue = 56525198; and this is both coordinates. 5625 and 5198 just concatenated together.

To add a new case all you will need to do is find an open item number in the STB and just copy the format of one of the other scrolls but leave the skill blank (or just put a skill id in too then go edit the skills STB)
I may have been wrong before. After looking through the useitems STB it looks like all the 313s call a skill so you might need to add something to the skills STB anyway even if it doesn't really do a lot.
What I mean by that is that the skills associated with the scrolls have some data related to warp zone and warp X,Y coordinates but they don't coincide with anything that we use in the existing scrolls anyway. The server side code for warping will override the client STB values anyhow. Whatever we code into the server is where the teleport will take you. NOT what it says in the STB.

So the steps to add a custom scroll are as follows
1) add the entry to LIST_USEITEMS.STB (and STL of course)
2) add an entry in the corresponding row in LIST_SKILL.STB (no STL entry required as these skills have no names) Just copy down the data from the row above. Just match what you can. things like the first column after the name "skill number" which obviously needs to be the same as the STB row number. Set the warp zone (map id) correctly and make some sort of educated guess about warp X.Y. I don't think they matter in the slightest but can't hurt to put something in there. Don't bother putting any values in the stat1, value1 and ratio1 fields where there are data that appears to be a copy of the warp data. These fields are not used for scrolls and are just legacy crap from older STB versions.
3) add a case into the code. it's really easy. just use the STB item number in the case then set useitem->usetype = your map id and the usevalue equal to your chosen coordinates.

recompile, add in your two modified STBs ans the STL then launch server and client
It should all work fine

Icon's method would work fine if you were using an arc server but it probably won't work in osprose at all.
I'm pretty sure we don't have any code to handle event scrolls in the way that he describes.
Possibly that kind of thing needs to be written.
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: Bypass the Range value in Return Scrolls.

Postby ICON on Fri Apr 19, 2013 8:46 pm

I sometimes forget that this code is not perfect. But yea all clients are built to handle event scrolls but if it was never added to the os Server then it mite not work lol.
Move along move along like i know you Should.

New games in the making....
ICON
Clown
Clown
 
Posts: 532
Joined: Mon Feb 04, 2008 7:34 am

Re: Bypass the Range value in Return Scrolls.

Postby PurpleYouko on Mon Apr 22, 2013 2:46 pm

I've never actually played with event scrolls.

Give me an example of one and I'll take a look to see if it's coded or not.
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: Bypass the Range value in Return Scrolls.

Postby ICON on Mon Apr 22, 2013 8:57 pm

Um shit lol , Its any of the scrolls in like 501 to 510or something one of them runs the stat reset scroll.
They have stat reset skill reset and some other stuff. It basically is a scroll that will trigger a con dialog and runs like talking to a npc. in thus you can run it thru qsd to basically do anything.

The Default ones are called Letter of the Akram Kingdom, Like i said they default start at 501 to 510.

I just checked the evo client. I think stat reset is like 504 but could be wrong.
Move along move along like i know you Should.

New games in the making....
ICON
Clown
Clown
 
Posts: 532
Joined: Mon Feb 04, 2008 7:34 am

Re: Bypass the Range value in Return Scrolls.

Postby PurpleYouko on Tue Apr 23, 2013 2:22 pm

OK so the "letters to the Akram kingdom" are numbered 501 through 510
All have a use type of 316

The bad news is that the only code related to these things that was ever written goes as follows

  1. case 316://Quest Scroll
  2.            delete useitem;
  3.            return NULL;
  4.         break;

LOL Not going to do a lot other than delete your scroll
It may well do something from the client end but if that is the case then our server has to wait for the incoming packet from the client before it can act.
Seems a little open to packet hacking abuses methinks.

As for reset books. Those are type 323. We handle those just fine but no CON or QSD is called anywhere in our code.
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

Previous

Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 11 guests