GM Commands

For those who don't have the patience to compile their own server and client.

GM Commands

Postby PurpleYouko on Fri Aug 26, 2016 4:52 pm

So I'm going to start listing some of the more useful GM commands that i have added here so that you can all test stuff easier.

This isn't (at least for now) a comprehensive list. You can find them all just by opening gmcmds.cpp if you really want to see them all

  • setustat This one allows you to set the UStat1 or UStat2 value for any item that you currently have equipped. presently it is the ONLY way to apply UStats to any item.
    Format: /setustat [ItemType] [index] [stat ] [value ]
    ItemType must be one of the following: "mask", "cap", "suit", "back", "glov", "shoe", "weap", "shield". Entering any other value will result in ItemType defaulting to "weap" and applying the UStat to your equipped weapon
    index must be 1 or 2. Any other value will result in the value defaulting to 1
    Stat can be any number from STR_ABILITY.STL. eg. 10 = STR. 23 = move speed and so on
    Value can be any number you like. Just be sensible about it. Setting move speed to 1,000,000 would be kind of stupid. Would probably work though :roll:
    NOTE: Not all stat values will actually do anything and some will not even display correctly. Stuff like "item drop rate" (79) and "item drop count increase" (63) both work properly and are coded at the server. try setting them both to 10 and see what happens
  • setstat
    This one can control a bunch of different things and allows you to cheat your stats completely without the need of equipping items
    Format: /setstat [stat] [value]
    Stat must be one of the following values: "maxhp", "hp", "movespeed", "ap" (attack power), "aspd" (attack speed). More options may be added easily later
    Value can be anything you like but again, please be sensible.
    Use of this function sets up a temporary "cheat" variable in the server which overwrites the normal calculated value for that particular stat while the cheat is active. use the command again and set to zero to cancel its effect
  • rate
    Set some of your server rates with a GM command.
    Format: /rate [choice] [value]
    Choice is currently limited to "drop" or "exp".
    Value can be anything. I don't recommend a very large value for drop though. I tested it with 5000 once and found myself on top of a massive vertical pile of dropped items when I killed a monster :D It was funny as hell but it lags the server.
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: GM Commands

Postby deivares on Sat May 27, 2017 10:37 pm

How to change the Zulie rate ??
deivares
Smoulie
Smoulie
 
Posts: 45
Joined: Wed May 15, 2013 12:17 am

Re: GM Commands

Postby L3nn0x on Tue May 30, 2017 12:47 pm

Try looking in the config file of the map server
L3nn0x
osiRose dev
osiRose dev
 
Posts: 111
Joined: Wed Oct 21, 2015 8:22 pm

Re: GM Commands

Postby deivares on Wed May 31, 2017 2:10 am

L3nn0x wrote:Try looking in the config file of the map server


I've already changed the config file, but it doesn't take any effect in game .. The /rate does .. I could do /rate exp and /rate drop .. But I didn't find a way to change the Zuly Rate in game
deivares
Smoulie
Smoulie
 
Posts: 45
Joined: Wed May 15, 2013 12:17 am

Re: GM Commands

Postby PurpleYouko on Thu Jun 01, 2017 3:03 pm

config.ZULY_RATE is loaded from the database list_config table in function bool CWorldServer::LoadConfig( ) in startup.cpp

It is applied to zuly drops in function CDrop* CWorldServer::GetNewDrop( CMonster* thismon ) in ServerFunctions.cpp with the following code
  1. if(randv <= thismon->thisnpc->money) // zuly drop
  2.     {
  3.         newdrop->type = 1; //zuly
  4.         newdrop->amount = thismon->thisnpc->level * 5 * (Config.ZULY_RATE) + RandNumber( 1, 10 );
  5.         if( thisclient->Session->codedebug )
  6.         {
  7.            SendPM(thisclient, "Zuly drop selected " );
  8.         }
  9.         return  newdrop;
  10.     }
  11.     //now check for item drops


It can also be modified in game using the GM command /configreset zulyrate X where X is your new rate

  1.  
  2. if(strcmp(action, "zulyrate")==0)
  3.         {
  4.             if ((tmp = strtok(NULL, " ")) == NULL) return true; newval = atoi(tmp);
  5.             {
  6.                 Config.ZULY_RATE = newval;
  7.                 //char* confname = "default";
  8.                 GServer->DB->QExecute("UPDATE list_config SET zuly_rate=%i WHERE conf='%s'",newval,"default");
  9.                 is_ok=true;
  10.             }
  11. }

Doing this with a GM command actually changes the stored value in the database so it is permanent until it is manually changed again, even if you restart your server.
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 Quick Start

Who is online

Users browsing this forum: No registered users and 1 guest

cron