Jump to content
  • 0

[Solved] @job does not show job ID.


Question

Posted (edited)

When I use @job <empty>

VAXZ5.png

When I use @help job (It shows correctly)

2mNQL.png

Here is my atcommand.c's jobchange block:

/*==========================================
* Changes a character's class
*------------------------------------------*/
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 },
  { "swordman",		  1 },
  { "swordsman",		 1 },
  { "magician",		  2 },
  { "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 },
  { "novice high",	4001 },
  { "high novice",	4001 },
  { "swordman high",  4002 },
  { "swordsman high", 4002 },
  { "magician high",  4003 },
  { "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 swordman",  4024 },
  { "baby swordsman", 4024 },
  { "baby magician",  4025 },
  { "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 },
  { "gangsi",		 4050 },
  { "bongun",		 4050 },
  { "munak",		  4050 },
  { "death knight",   4051 },
  { "dark collector", 4052 },
  { "rune knight",	4054 },
  { "warlock",		4055 },
  { "ranger",		 4056 },
  { "arch bishop",	4057 },
  { "mechanic",	   4058 },
  { "guillotine",	 4059 },
  { "rune knight2",   4060 },
  { "warlock2",	   4061 },
  { "ranger2",		4062 },
  { "arch bishop2",   4063 },
  { "mechanic2",	  4064 },
  { "guillotine2",	4065 },
  { "royal guard",	4066 },
  { "sorcerer",	   4067 },
  { "minstrel",	   4068 },
  { "wanderer",	   4069 },
  { "sura",		   4070 },
  { "genetic",		4071 },
  { "shadow chaser",  4072 },
  { "royal guard2",   4073 },
  { "sorcerer2",	  4074 },
  { "minstrel2",	  4075 },
  { "wanderer2",	  4076 },
  { "sura2",		  4077 },
  { "genetic2",	   4078 },
  { "shadow chaser2", 4079 },
  { "baby rune",	  4096 },
  { "baby warlock",   4097 },
  { "baby ranger",	4098 },
  { "baby bishop",	4099 },
  { "baby mechanic",  4100 },
  { "baby cross",	 4101 },
  { "baby guard",	 4102 },
  { "baby sorcerer",  4103 },
  { "baby minstrel",  4104 },
  { "baby wanderer",  4105 },
  { "baby sura",	  4106 },
  { "baby genetic",   4107 },
  { "baby chaser",	4108 },
  { "super novice e", 4190 },
  { "super baby e",   4191 },
  { "kagerou",		4211 },
  { "oboro",		  4212 },
 };
 for (i=0; i < ARRAYLENGTH(jobs); i++) {
  if (strncmpi(message, jobs[i].name, 16) == 0) {
job = jobs[i].id;
upper = 0;
found = 1;
break;
  }
 }
 // TODO: convert this to use atcommand_help_string()
 if (!found) {
  int i;
  for (i = 922; i <= 966; ++i)
clif_displaymessage(fd, msg_txt(i));
  clif_displaymessage(fd, msg_txt(967)); // ---- Modes And Others ----
  clif_displaymessage(fd, msg_txt(968)); // 22 Wedding   26 Christmas   27 Summer   4048 Star Gladiator (Union)
  return -1;
 }
}
if (job == 13 || job == 21 || job == 22 || job == 26 || job == 27 || job == 4014 || job == 4022 || job == 4036 || job == 4044 || job == 4048
  || (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2)
) // Deny direct transformation into dummy jobs
 {clif_displaymessage(fd, "You can not change to this job by command.");
 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 {
 // TODO: convert this to use atcommand_help_string()
 int i;
 for (i = 922; i <= 966; ++i)
  clif_displaymessage(fd, msg_txt(i));
 clif_displaymessage(fd, msg_txt(967)); // ---- Modes And Others ----
 clif_displaymessage(fd, msg_txt(968)); // 22 Wedding   26 Christmas   27 Summer   4048 Star Gladiator (Union)
 return -1;
}
return 0;
}

Here is my msg_athena.conf

// @jobchange
922: Please enter a job ID.

//923-979 free (future jobs?)

Edit: Solved. Typing @job <empty> should show failed instead of Job ID in latest SVN.

Edited by darristan

3 answers to this question

Recommended Posts

Posted

Edit: Solved. Typing @job <empty> should show failed instead of Job ID in latest SVN.

Latest SVN and only installed [system]_item_bound_v1.1.1.diff and that only adds few line of msg_athena which I think is not the reason.

Bump...

Marking it as solved.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...