Jump to content

changed syntax on @job that it fits with the internal classnaming


Tepoo

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   4
  • Joined:  02/06/12
  • Last Seen:  

Hey Guys,

the base classnaming in mmo.h is JOB_<JOBNAME>[_T]

on the actual version of @job the syntax for changing to a trans third class is @job id or @job <jobname>[ (trans)] i changed that to @job <jobname>[_T]

that it fits to the informations placed in mmo.h.

/*==========================================
* Changes a character's calass
*------------------------------------------*/
ACMD_FUNC(jobchange)
{
//FIXME: redundancy, potentially wrong code, should use job_name() or similar instead of hardcoding the table [ultramage]
int job = 0, upper = 0;
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1)
{
 int i, found = 0;
 const struct { char name[24]; int id; } jobs[] = {
  { "novice",  0 },
  { "swordsman", 1 },
  { "mage",  2 },
  { "archer",  3 },
  { "acolyte", 4 },
  { "merchant", 5 },
  { "thief",  6 },
  { "knight",  7 },
  { "priest",  8 },
  { "priestess", 8 },
  { "wizard",  9 },
  { "blacksmith", 10 },
  { "hunter",  11 },
  { "assassin", 12 },
  { "crusader", 14 },
  { "monk",  15 },
  { "sage",  16 },
  { "rogue",  17 },
  { "alchemist", 18 },
  { "bard",  19 },
  { "dancer",  20 },
  { "super novice", 23 },
  { "supernovice", 23 },
  { "gunslinger", 24 },
  { "gunner", 24 },
  { "ninja", 25 },
  { "high novice", 4001 },
  { "swordsman high", 4002 },
  { "mage high",  4003 },
  { "archer high", 4004 },
  { "acolyte high", 4005 },
  { "merchant high", 4006 },
  { "thief high",  4007 },
  { "lord knight", 4008 },
  { "high priest", 4009 },
  { "high priestess", 4009 },
  { "high wizard", 4010 },
  { "whitesmith",  4011 },
  { "sniper",  4012 },
  { "assassin cross", 4013 },
  { "paladin", 4015 },
  { "champion", 4016 },
  { "professor", 4017 },
  { "stalker", 4018 },
  { "creator", 4019 },
  { "clown",  4020 },
  { "gypsy",  4021 },
  { "baby novice", 4023 },
  { "baby swordsman", 4024 },
  { "baby mage",  4025 },
  { "baby archer", 4026 },
  { "baby acolyte", 4027 },
  { "baby merchant", 4028 },
  { "baby thief",  4029 },
  { "baby knight", 4030 },
  { "baby priest", 4031 },
  { "baby priestess", 4031 },
  { "baby wizard", 4032 },
  { "baby blacksmith",4033 },
  { "baby hunter", 4034 },
  { "baby assassin", 4035 },
  { "baby crusader", 4037 },
  { "baby monk",  4038 },
  { "baby sage",  4039 },
  { "baby rogue",  4040 },
  { "baby alchemist", 4041 },
  { "baby bard",  4042 },
  { "baby dancer", 4043 },
  { "super baby",  4045 },
  { "taekwon",  4046 },
  { "taekwon boy", 4046 },
  { "taekwon girl", 4046 },
  { "star gladiator", 4047 },
  { "soul linker", 4049 },
  { "rune knight", 4054 },
  { "warlock",  4055 },
  { "ranger",   4056 },
  { "arch bishop", 4057 },
  { "mechanic",  4058 },
  { "guillotine",  4059 },
  { "rune knight_t", 4060 },
  { "warlock_t",  4061 },
  { "ranger_t",  4062 },
  { "arch bishop_t", 4063 },
  { "mechanic_t",  4064 },
  { "guillotine_t", 4065 },
  { "royal guard", 4066 },
  { "sorcerer",  4067 },
  { "minstrel",  4068 },
  { "wanderer",  4069 },
  { "sura",   4070 },
  { "genetic",  4071 },
  { "shadow chaser", 4072 },
  { "royal guard_t", 4073 },
  { "sorcerer_t",  4074 },
  { "minstrel_t",  4075 },
  { "wanderer_t",  4076 },
  { "sura_t",   4077 },
  { "genetic_t",  4078 },
  { "shadow chaser_t", 4079 },
 };
 for (i=0; i < ARRAYLENGTH(jobs); i++) {
  if (strncmpi(message, jobs[i].name, 16) == 0) {
job = jobs[i].id;
upper = 0;
found = 1;
break;
  }
 }
 if (!found) {
  clif_displaymessage(fd, "Please, enter job ID (usage: @job/@jobchange ).");
  clif_displaymessage(fd, "----- Novice / 1st Class -----");
  clif_displaymessage(fd, "   0 Novice			1 Swordman		  2 Mage			  3 Archer");
  clif_displaymessage(fd, "   4 Acolyte		   5 Merchant		  6 Thief");
  clif_displaymessage(fd, "----- 2nd Class -----");
  clif_displaymessage(fd, "   7 Knight			8 Priest			9 Wizard		   10 Blacksmith");
  clif_displaymessage(fd, "  11 Hunter		   12 Assassin		 14 Crusader		 15 Monk");
  clif_displaymessage(fd, "  16 Sage			 17 Rogue			18 Alchemist		19 Bard");
  clif_displaymessage(fd, "  20 Dancer");
  clif_displaymessage(fd, "----- High Novice / High 1st Class -----");
  clif_displaymessage(fd, "4001 Novice High	4002 Swordman High  4003 Mage High	  4004 Archer High");
  clif_displaymessage(fd, "4005 Acolyte High   4006 Merchant High  4007 Thief High");
  clif_displaymessage(fd, "----- Transcendent 2nd Class -----");
  clif_displaymessage(fd, "4008 Lord Knight	4009 High Priest	4010 High Wizard	4011 Whitesmith");
  clif_displaymessage(fd, "4012 Sniper		 4013 Assassin Cross 4015 Paladin		4016 Champion");
  clif_displaymessage(fd, "4017 Professor	  4018 Stalker		4019 Creator		4020 Clown");
  clif_displaymessage(fd, "4021 Gypsy");
  clif_displaymessage(fd, "----- 3rd Class (Regular to 3rd) -----");
  clif_displaymessage(fd, "4054 Rune Knight	4055 Warlock		4056 Ranger		 4057 Arch Bishop");
  clif_displaymessage(fd, "4058 Mechanic	   4059 Guillotine Cross 4066 Royal Guard  4067 Sorcerer");
  clif_displaymessage(fd, "4068 Minstrel	   4069 Wanderer	   4070 Sura		   4071 Genetic");
  clif_displaymessage(fd, "4072 Shadow Chaser");
  clif_displaymessage(fd, "----- 3rd Class (Transcendent to 3rd) -----");
  clif_displaymessage(fd, "4060 Rune Knight_T	4061 Warlock_T	4062 Ranger_T");
  clif_displaymessage(fd, " 4063 Arch Bishop_T	4064 Mechanic_T	4065 Guillotine Cross_T");
  clif_displaymessage(fd, "4073 Royal Guard_T	4074 Sorcerer_T	4075 Minstrel_T");
  clif_displaymessage(fd, "4076 Wanderer_T	4077 Sura_T	4078 Genetic_T	4079 Shadow Chaser_T");
  clif_displaymessage(fd, "----- Expanded Class -----");
  clif_displaymessage(fd, "  23 Super Novice	 24 Gunslinger	   25 Ninja			26 Xmas");
  clif_displaymessage(fd, "  27 Summer		 4046 Taekwon		4047 Star Gladiator 4049 Soul Linker");
  //clif_displaymessage(fd, "4050 Gangsi		 4051 Death Knight   4052 Dark Collector");
  clif_displaymessage(fd, "---- 1st And 2nd Baby Class ----");
  clif_displaymessage(fd, "4023 Baby Novice	4024 Baby Swordsman 4025 Baby Mage	  4026 Baby Archer");
  clif_displaymessage(fd, "4027 Baby Acolyte   4028 Baby Merchant  4029 Baby Thief	 4030 Baby Knight");
  clif_displaymessage(fd, "4031 Baby Priest	4032 Baby Wizard	4033 Baby Blacksmith 4034 Baby Hunter");
  clif_displaymessage(fd, "4035 Baby Assassin  4037 Baby Crusader  4038 Baby Monk	  4039 Baby Sage");
  clif_displaymessage(fd, "4040 Baby Rogue	 4041 Baby Alchemist 4042 Baby Bard	  4043 Baby Dancer");
  clif_displaymessage(fd, "4045 Super Baby");
  //clif_displaymessage(fd, "---- 3rd Baby Class ----");
  //clif_displaymessage(fd, "4096 Baby Rune Knight	4097 Baby Warlock		4098 Baby Ranger");
  //clif_displaymessage(fd, "4099 Baby Arch Bishop	4100 Baby Mechanic	   4101 Baby Guillotine Cross");
  //clif_displaymessage(fd, "4102 Baby Royal Guard	4103 Baby Sorcerer	   4104 Baby Minstrel");
  //clif_displaymessage(fd, "4105 Baby Wanderer	   4106 Baby Sura		   4107 Baby Genetic");
  //clif_displaymessage(fd, "4108 Baby Shadow Chaser");
  //clif_displaymessage(fd, "---- Mounts, Modes, And Others ----");
  //clif_displaymessage(fd, "  13 Knight (Peco)	21 Crusader (Peco)  22 Wedding		  26 Christmas");
  //clif_displaymessage(fd, "  27 Summer 4014 Lord Knight (Peco) 4022 Paladin (Peco)  4036 Baby Knight (Peco)");
  //clif_displaymessage(fd, "4044 Baby Crusader (Peco) 4048 Star Gladiator (Union) 4080 Rune Knight (Dragon)");
  //clif_displaymessage(fd, "4081 Rune Knight Trans (Dragon) 4082 Royal Guard (Gryphon)");
  //clif_displaymessage(fd, "4083 Royal Guard Trans (Gryphon) 4084 Ranger (Warg) 4085 Ranger Trans (Warg)");
  //clif_displaymessage(fd, "4086 Mechanic (Mado) 4087 Mechanic Trans (Mado)");
  return -1;
 }
}
if (job == 13 || job == 21 || job == 22 || job == 26 || job == 27
 || job == 4014 || job == 4022 || job == 4036 || job == 4044 || job == 4048
) // Deny direct transformation into dummy jobs
 return 0;
if (pcdb_checkid(job))
{
 if (pc_jobchange(sd, job, upper) == 0)
  clif_displaymessage(fd, msg_txt(12)); // Your job has been changed.
 else {
  clif_displaymessage(fd, msg_txt(155)); // You are unable to change your job.
  return -1;
 }
} else {
 clif_displaymessage(fd, "Please, enter job ID (usage: @job/@jobchange ).");
  clif_displaymessage(fd, "----- Novice / 1st Class -----");
  clif_displaymessage(fd, "   0 Novice			1 Swordman		  2 Mage			  3 Archer");
  clif_displaymessage(fd, "   4 Acolyte		   5 Merchant		  6 Thief");
  clif_displaymessage(fd, "----- 2nd Class -----");
  clif_displaymessage(fd, "   7 Knight			8 Priest			9 Wizard		   10 Blacksmith");
  clif_displaymessage(fd, "  11 Hunter		   12 Assassin		 14 Crusader		 15 Monk");
  clif_displaymessage(fd, "  16 Sage			 17 Rogue			18 Alchemist		19 Bard");
  clif_displaymessage(fd, "  20 Dancer");
  clif_displaymessage(fd, "----- High Novice / High 1st Class -----");
  clif_displaymessage(fd, "4001 Novice High	4002 Swordman High  4003 Mage High	  4004 Archer High");
  clif_displaymessage(fd, "4005 Acolyte High   4006 Merchant High  4007 Thief High");
  clif_displaymessage(fd, "----- Transcendent 2nd Class -----");
  clif_displaymessage(fd, "4008 Lord Knight	4009 High Priest	4010 High Wizard	4011 Whitesmith");
  clif_displaymessage(fd, "4012 Sniper		 4013 Assassin Cross 4015 Paladin		4016 Champion");
  clif_displaymessage(fd, "4017 Professor	  4018 Stalker		4019 Creator		4020 Clown");
  clif_displaymessage(fd, "4021 Gypsy");
  clif_displaymessage(fd, "----- 3rd Class (Regular to 3rd) -----");
  clif_displaymessage(fd, "4054 Rune Knight	4055 Warlock		4056 Ranger		 4057 Arch Bishop");
  clif_displaymessage(fd, "4058 Mechanic	   4059 Guillotine Cross 4066 Royal Guard  4067 Sorcerer");
  clif_displaymessage(fd, "4068 Minstrel	   4069 Wanderer	   4070 Sura		   4071 Genetic");
  clif_displaymessage(fd, "4072 Shadow Chaser");
  clif_displaymessage(fd, "----- 3rd Class (Transcendent to 3rd) -----");
  clif_displaymessage(fd, "4060 Rune Knight_T	4061 Warlock_T	4062 Ranger_T");
  clif_displaymessage(fd, " 4063 Arch Bishop_T	4064 Mechanic_T	4065 Guillotine Cross_T");
  clif_displaymessage(fd, "4073 Royal Guard_T	4074 Sorcerer_T	4075 Minstrel_T");
  clif_displaymessage(fd, "4076 Wanderer_T	4077 Sura_T	4078 Genetic_T	4079 Shadow Chaser_T");
  clif_displaymessage(fd, "----- Expanded Class -----");
  clif_displaymessage(fd, "  23 Super Novice	 24 Gunslinger	   25 Ninja			26 Xmas");
  clif_displaymessage(fd, "  27 Summer		 4046 Taekwon		4047 Star Gladiator 4049 Soul Linker");
  //clif_displaymessage(fd, "4050 Gangsi		 4051 Death Knight   4052 Dark Collector");
  clif_displaymessage(fd, "---- 1st And 2nd Baby Class ----");
  clif_displaymessage(fd, "4023 Baby Novice	4024 Baby Swordsman 4025 Baby Mage	  4026 Baby Archer");
  clif_displaymessage(fd, "4027 Baby Acolyte   4028 Baby Merchant  4029 Baby Thief	 4030 Baby Knight");
  clif_displaymessage(fd, "4031 Baby Priest	4032 Baby Wizard	4033 Baby Blacksmith 4034 Baby Hunter");
  clif_displaymessage(fd, "4035 Baby Assassin  4037 Baby Crusader  4038 Baby Monk	  4039 Baby Sage");
  clif_displaymessage(fd, "4040 Baby Rogue	 4041 Baby Alchemist 4042 Baby Bard	  4043 Baby Dancer");
  clif_displaymessage(fd, "4045 Super Baby");
  //clif_displaymessage(fd, "---- 3rd Baby Class ----");
  //clif_displaymessage(fd, "4096 Baby Rune Knight	4097 Baby Warlock		4098 Baby Ranger");
  //clif_displaymessage(fd, "4099 Baby Arch Bishop	4100 Baby Mechanic	   4101 Baby Guillotine Cross");
  //clif_displaymessage(fd, "4102 Baby Royal Guard	4103 Baby Sorcerer	   4104 Baby Minstrel");
  //clif_displaymessage(fd, "4105 Baby Wanderer	   4106 Baby Sura		   4107 Baby Genetic");
  //clif_displaymessage(fd, "4108 Baby Shadow Chaser");
  //clif_displaymessage(fd, "---- Mounts, Modes, And Others ----");
  //clif_displaymessage(fd, "  13 Knight (Peco)	21 Crusader (Peco)  22 Wedding		  26 Christmas");
  //clif_displaymessage(fd, "  27 Summer 4014 Lord Knight (Peco) 4022 Paladin (Peco)  4036 Baby Knight (Peco)");
  //clif_displaymessage(fd, "4044 Baby Crusader (Peco) 4048 Star Gladiator (Union) 4080 Rune Knight (Dragon)");
  //clif_displaymessage(fd, "4081 Rune Knight Trans (Dragon) 4082 Royal Guard (Gryphon)");
  //clif_displaymessage(fd, "4083 Royal Guard Trans (Gryphon) 4084 Ranger (Warg) 4085 Ranger Trans (Warg)");
  //clif_displaymessage(fd, "4086 Mechanic (Mado) 4087 Mechanic Trans (Mado)");
 return -1;
}
return 0;
}

Greetings

Tepoo

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

I don't really think this would be helpful. I'm rejecting this seeing as no one's had any input for a year and a half.

Link to comment
Share on other sites

×
×
  • Create New...