Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Improved !job command

Junior Spellweaver
Joined
Apr 6, 2008
Messages
181
Reaction score
0
The person doing the IDless project gave me this idea, so I decided to do it. Basically, this makes it so that you do not need to use job IDs to change your character's job, but instead you put the job name(or abbreviation of it) after !job.

Add this to Players.cpp:
Code:
		// Jobs
		else if(strcmp(command, "job") == 0){
			if(strcmp(next_token, "thief") == 0){
				Levels::setJob(player ,400);
			}
			else if(strcmp(next_token, "sin") == 0){
				Levels::setJob(player ,410);
			}
			else if(strcmp(next_token, "hermit") == 0){
				Levels::setJob(player ,411);
			}
			else if(strcmp(next_token, "nl") == 0){
				Levels::setJob(player ,412);
			}
			else if(strcmp(next_token, "dit") == 0){
				Levels::setJob(player ,420);
			}
			else if(strcmp(next_token, "cb") == 0){
				Levels::setJob(player ,421);
			}
			else if(strcmp(next_token, "shadower") == 0){
				Levels::setJob(player ,422);
			}
			else if(strcmp(next_token, "bowman") == 0){
				Levels::setJob(player ,300);
			}
			else if(strcmp(next_token, "hunter") == 0){
				Levels::setJob(player ,310);
			}
			else if(strcmp(next_token, "ranger") == 0){
				Levels::setJob(player ,311);
			}
			else if(strcmp(next_token, "bm") == 0){
				Levels::setJob(player ,312);
			}
			else if(strcmp(next_token, "xbowman") == 0){
				Levels::setJob(player ,320);
			}
			else if(strcmp(next_token, "sniper") == 0){
				Levels::setJob(player ,321);
			}
			else if(strcmp(next_token, "marksman") == 0){
				Levels::setJob(player ,322);
			}
			else if(strcmp(next_token, "mage") == 0){
				Levels::setJob(player ,200);
			}
			else if(strcmp(next_token, "fpwiz") == 0){
				Levels::setJob(player ,210);
			}
			else if(strcmp(next_token, "fpmage") == 0){
				Levels::setJob(player ,211);
			}
			else if(strcmp(next_token, "fparch") == 0){
				Levels::setJob(player ,212);
			}
			else if(strcmp(next_token, "ilwiz") == 0){
				Levels::setJob(player ,220);
			}
			else if(strcmp(next_token, "ilmage") == 0){
				Levels::setJob(player ,221);
			}
			else if(strcmp(next_token, "ilarch") == 0){
				Levels::setJob(player ,222);
			}
			else if(strcmp(next_token, "cleric") == 0){
				Levels::setJob(player ,230);
			}
			else if(strcmp(next_token, "priest") == 0){
				Levels::setJob(player ,231);
			}
			else if(strcmp(next_token, "bishop") == 0){
				Levels::setJob(player ,232);
			}
			else if(strcmp(next_token, "warrior") == 0){
				Levels::setJob(player ,100);
			}
			else if(strcmp(next_token, "fighter") == 0){
				Levels::setJob(player ,110);
			}
			else if(strcmp(next_token, "sader") == 0){
				Levels::setJob(player ,111);
			}
			else if(strcmp(next_token, "hero") == 0){
				Levels::setJob(player ,112);
			}
			else if(strcmp(next_token, "page") == 0){
				Levels::setJob(player ,120);
			}
			else if(strcmp(next_token, "wk") == 0){
				Levels::setJob(player ,121);
			}
			else if(strcmp(next_token, "pally") == 0){
				Levels::setJob(player ,122);
			}
			else if(strcmp(next_token, "spearman") == 0){
				Levels::setJob(player ,130);
			}
			else if(strcmp(next_token, "dk") == 0){
				Levels::setJob(player ,131);
			}
			else if(strcmp(next_token, "drk") == 0){
				Levels::setJob(player ,132);
			}
			else if(strcmp(next_token, "gm") == 0){
				Levels::setJob(player ,500);
			}
			else if(strcmp(next_token, "supergm") == 0){
				Levels::setJob(player ,510);
			}
			else if(strcmp(next_token, "beginner") == 0){
				Levels::setJob(player ,000);
			}
		}
		// End Jobs

In place of:
Code:
		else if(strcmp(command, "job") == 0){
			if (strlen(next_token) > 0){
				Levels::setJob(player, strval(strtok_s(NULL, " ",&next_token)));
			}
		}

Job names are as follows(a lot of these follow along the abbreviations used when talking about the classes with people in game):

  • thief - Rogue/Thief ;3
  • sin - assassin
  • hermit
  • nl - Night Lord
  • dit - bandit
  • cb - Chief Bandit
  • shadower
  • bowman
  • hunter
  • ranger
  • bm - bow master
  • xbowman = crossbowman
  • sniper
  • marksman
  • mage - magician
  • fpwiz - fire/poison wizard
  • fpmage - fire/poison mage
  • fparch - fire/poison arch mage
  • ilwiz - ice/lit wiz
  • ilmage - ice/lit mage
  • ilarch - ice/lit arch mage
  • cleric
  • priest
  • bishop
  • warrior
  • fighter
  • sader - crusader
  • hero
  • page
  • wk - white knight
  • pally - paladin
  • spearman
  • dk - dragon knight
  • drk - dark knight
  • gm
  • supergm
  • beginner

Feel free to add this into project IDless. Cheers. =]
 
Newbie Spellweaver
Joined
Mar 13, 2007
Messages
45
Reaction score
0
Re: [Release] Improved !job command

Sweet you never cease to inpress me <3 ya =D could you please add a command so when you just type !job it says all the possable sub commands or is that too difficult?
 
Master Summoner
Joined
Apr 2, 2008
Messages
538
Reaction score
0
Re: [Release] Improved !job command

thanks :p
 
Newbie Spellweaver
Joined
Mar 25, 2007
Messages
42
Reaction score
0
Re: [Release] Improved !job command

Did i give you permission to steal my idea? :(

Atleast tell me you were doing this..

Mind if i use this for my project, and change some of the words around?
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
16
Reaction score
0
Re: [Release] Improved !job command

Hi, I updated your code, it has more aliases like "assassin" or "bandit" (not only the abbreviations), it also works like the old !job using the id (for ex. instead of !job supergm you can use !job 510).

Code:
        else if(strcmp(command, "job") == 0){
            if(strcmp(next_token, "thief") == 0 || strcmp(next_token, "rogue") == 0)
                Levels::setJob(player ,400);
            else if(strcmp(next_token, "assassin") == 0 || strcmp(next_token, "sin") == 0)
                Levels::setJob(player ,410);
            else if(strcmp(next_token, "hermit") == 0)
                Levels::setJob(player ,411);
            else if(strcmp(next_token, "nightlord") == 0)
                Levels::setJob(player ,412);
            else if(strcmp(next_token, "bandit") == 0 || strcmp(next_token, "dit") == 0)
                Levels::setJob(player ,420);
            else if(strcmp(next_token, "chiefbandit") == 0 || strcmp(next_token, "cb") == 0)
                Levels::setJob(player ,421);
            else if(strcmp(next_token, "shadower") == 0)
                Levels::setJob(player ,422);
            else if(strcmp(next_token, "bowman") == 0 || strcmp(next_token, "bow") == 0)
                Levels::setJob(player ,300);
            else if(strcmp(next_token, "hunter") == 0)
                Levels::setJob(player ,310);
            else if(strcmp(next_token, "ranger") == 0)
                Levels::setJob(player ,311);
            else if(strcmp(next_token, "bowmaster") == 0 || strcmp(next_token, "bm") == 0)
                Levels::setJob(player ,312);
            else if(strcmp(next_token, "crossbowman") == 0 || strcmp(next_token, "xbowman") == 0 || strcmp(next_token, "xbow") == 0)
                Levels::setJob(player ,320);
            else if(strcmp(next_token, "sniper") == 0)
                Levels::setJob(player ,321);
            else if(strcmp(next_token, "marksman") == 0)
                Levels::setJob(player ,322);
            else if(strcmp(next_token, "mage") == 0 || strcmp(next_token, "magician") == 0)
                Levels::setJob(player ,200);
            else if(strcmp(next_token, "fpwiz") == 0 || strcmp(next_token, "fpwizard") == 0)
                Levels::setJob(player ,210);
            else if(strcmp(next_token, "fpmage") == 0)
                Levels::setJob(player ,211);
            else if(strcmp(next_token, "fparch") == 0 || strcmp(next_token, "fparchmage") == 0)
                Levels::setJob(player ,212);
            else if(strcmp(next_token, "ilwiz") == 0 || strcmp(next_token, "ilwizard") == 0)
                Levels::setJob(player ,220);
            else if(strcmp(next_token, "ilmage") == 0)
                Levels::setJob(player ,221);
            else if(strcmp(next_token, "ilarch") == 0 || strcmp(next_token, "ilarchmage") == 0)
                Levels::setJob(player ,222);
            else if(strcmp(next_token, "cleric") == 0)
                Levels::setJob(player ,230);
            else if(strcmp(next_token, "priest") == 0)
                Levels::setJob(player ,231);
            else if(strcmp(next_token, "bishop") == 0)
                Levels::setJob(player ,232);
            else if(strcmp(next_token, "warrior") == 0 || strcmp(next_token, "swordman") == 0)
                Levels::setJob(player ,100);
            else if(strcmp(next_token, "fighter") == 0)
                Levels::setJob(player ,110);
            else if(strcmp(next_token, "sader") == 0 || strcmp(next_token, "crusader") == 0)
                Levels::setJob(player ,111);
            else if(strcmp(next_token, "hero") == 0)
                Levels::setJob(player ,112);
            else if(strcmp(next_token, "page") == 0)
                Levels::setJob(player ,120);
            else if(strcmp(next_token, "wk") == 0 || strcmp(next_token, "whiteknight") == 0)
                Levels::setJob(player ,121);
            else if(strcmp(next_token, "paladin") == 0 || strcmp(next_token, "pally") == 0)
                Levels::setJob(player ,122);
            else if(strcmp(next_token, "spearman") == 0)
                Levels::setJob(player ,130);
            else if(strcmp(next_token, "dk") == 0 || strcmp(next_token, "dragonknight") == 0)
                Levels::setJob(player ,131);
            else if(strcmp(next_token, "drk") == 0 || strcmp(next_token, "darkknight") == 0)
                Levels::setJob(player ,132);
            else if(strcmp(next_token, "gm") == 0 || strcmp(next_token, "gamemaster") == 0)
                Levels::setJob(player ,500);
            else if(strcmp(next_token, "sgm") == 0 || strcmp(next_token, "supergm") == 0 || strcmp(next_token, "supergamemaster") == 0)
                Levels::setJob(player ,510);
            else if(strcmp(next_token, "beginner") == 0)
                Levels::setJob(player ,000);
            else
                Levels::setJob(player, strval(strtok_s(NULL, " ",&next_token)));
        }
 
Junior Spellweaver
Joined
Apr 6, 2008
Messages
181
Reaction score
0
Re: [Release] Improved !job command

Did i give you permission to steal my idea? :(

Atleast tell me you were doing this..

Mind if i use this for my project, and change some of the words around?
Doyos said:
Feel free to add this into project IDless. Cheers. =]

Don't be a tool, read.
 
Newbie Spellweaver
Joined
Apr 12, 2008
Messages
54
Reaction score
1
Re: [Release] Improved !job command

Looks great, thanks.
 
Back
Top