- Changed the column spacing in @go (town list) and @job (jobname list) so it lines up for Arial font, instead of fixed-width fonts.

- Follow up to r15907, made atcommand_help_string() convert alias to real command name before looking up in help.txt
- Moved the list of jobs to help.txt and converted @job to utilize atcommand_help_string().

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16729 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
brianluau 2012-09-01 04:14:07 +00:00
parent c37e0bdd3f
commit 369a65f7da
3 changed files with 74 additions and 103 deletions

View File

@ -43,20 +43,20 @@ go: "Params: <city name|number>\n" "Warps you to a city.\n"
" -3: (Memo point 2) 14: louyang 31: mora\n" " -3: (Memo point 2) 14: louyang 31: mora\n"
" -2: (Memo point 1) 15: start point 32: dewata\n" " -2: (Memo point 1) 15: start point 32: dewata\n"
" -1: (Memo point 0) 16: prison/jail 33: malangdo island\n" " -1: (Memo point 0) 16: prison/jail 33: malangdo island\n"
" 0: prontera 17: jawaii 34: malaya port\n" " 0: prontera 17: jawaii 34: malaya port\n"
" 1: morocc 18: ayothaya 35: eclage\n" " 1: morocc 18: ayothaya 35: eclage\n"
" 2: geffen 19: einbroch\n" " 2: geffen 19: einbroch\n"
" 3: payon 20: lighthalzen\n" " 3: payon 20: lighthalzen\n"
" 4: alberta 21: einbech\n" " 4: alberta 21: einbech\n"
" 5: izlude 22: hugel\n" " 5: izlude 22: hugel\n"
" 6: aldebaran 23: rachel\n" " 6: aldebaran 23: rachel\n"
" 7: xmas (lutie) 24: veins\n" " 7: xmas (lutie) 24: veins\n"
" 8: comodo 25: moscovia\n" " 8: comodo 25: moscovia\n"
" 9: yuno 26: midgard camp\n" " 9: yuno 26: midgard camp\n"
" 10: amatsu 27: manuk\n" " 10: amatsu 27: manuk\n"
" 11: gonryun 28: splendide\n" " 11: gonryun 28: splendide\n"
" 12: umbala 29: brasilis\n" " 12: umbala 29: brasilis\n"
" 13: niflheim 30: el dicastes" " 13: niflheim 30: el dicastes\n"
jumpto: "Params: <char name>\n" "Warps you to selected character." jumpto: "Params: <char name>\n" "Warps you to selected character."
follow: "Params: <char name>\n" "Follow a player." follow: "Params: <char name>\n" "Follow a player."
mount: "Give/remove you a peco (Class is required, but not skill)" mount: "Give/remove you a peco (Class is required, but not skill)"
@ -74,31 +74,52 @@ load: "Warps you to your save point."
warp: "Params: <mapname> [<x> <y>]\n" "Warps you to the selected map and position." warp: "Params: <mapname> [<x> <y>]\n" "Warps you to the selected map and position."
jump: "Params: [<x> [<y>]]\n" "Randomly warps you like a flywing." jump: "Params: [<x> [<y>]]\n" "Randomly warps you like a flywing."
jobchange: "Params: <job name|ID>\n" "Changes your job.\n" jobchange: "Params: <job name|ID>\n" "Changes your job.\n"
" 0: Novice 18: Alchemist 4015: Paladin\n" "----- Novice / 1st Class -----\n"
" 1: Swordman 19: Bard 4016: Champion\n" " 0 Novice 1 Swordman 2 Magician 3 Archer\n"
" 2: Mage 20: Dancer 4017: Professor\n" " 4 Acolyte 5 Merchant 6 Thief\n"
" 3: Archer 23: Super Novice 4018: Stalker\n" "----- 2nd Class -----\n"
" 4: Acolyte 4001: High Novice 4019: Creator\n" " 7 Knight 8 Priest 9 Wizard 10 Blacksmith\n"
" 5: Merchant 4002: High Swordman 4020: Clown\n" " 11 Hunter 12 Assassin 14 Crusader 15 Monk\n"
" 6: Thief 4003: High Mage 4021: Gypsy\n" " 16 Sage 17 Rogue 18 Alchemist 19 Bard\n"
" 7: Knight 4004: High Archer 4046: Taekwon\n" " 20 Dancer\n"
" 8: Priest 4005: High Acolyte 4047: Star Gladiator\n" "----- High Novice / High 1st Class -----\n"
" 9: Wizard 4006: High Merchant 4049: Soul Linker\n" "4001 Novice High 4002 Swordman High 4003 Magician High 4004 Archer High\n"
" 10: Blacksmith 4007: High Thief 24: Gunslinger\n" "4005 Acolyte High 4006 Merchant High 4007 Thief High\n"
" 11: Hunter 4008: Lord Knight 25: Ninja\n" "----- Transcendent 2nd Class -----\n"
" 12: Assassin 4009: High Priest\n" "4008 Lord Knight 4009 High Priest 4010 High Wizard 4011 Whitesmith\n"
" 14: Crusader 4010: High Wizard\n" "4012 Sniper 4013 Assassin Cross 4015 Paladin 4016 Champion\n"
" 15: Monk 4011: Whitesmith\n" "4017 Professor 4018 Stalker 4019 Creator 4020 Clown\n"
" 16: Sage 4012: Sniper\n" "4021 Gypsy\n"
" 17: Rogue 4013: Assassin Cross\n" "----- 3rd Class (Regular) -----\n"
" ---- Baby Classes ----\n" "4054 Rune Knight 4055 Warlock 4056 Ranger 4057 Arch Bishop\n"
" 4023: Baby 4024: Baby Swordman 4025: Baby Mage\n" "4058 Mechanic 4059 Guillotine Cross 4066 Royal Guard 4067 Sorcerer\n"
" 4026: Baby Archer 4027: Baby Acolyte 4028: Baby Merchant\n" "4068 Minstrel 4069 Wanderer 4070 Sura 4071 Genetic\n"
" 4029: Baby Thief 4030: Baby Knight 4031: Baby Priest\n" "4072 Shadow Chaser\n"
" 4032: Baby Wizard 4033: Baby Blacksmith 4034: Baby Hunter\n" "----- 3rd Class (Transcendent) -----\n"
" 4035: Baby Assassin 4037: Baby Crusader 4038: Baby Monk\n" "4060 Rune Knight 4061 Warlock 4062 Ranger 4063 Arch Bishop\n"
" 4039: Baby Sage 4040: Baby Rogue 4041: Baby Alchemist\n" "4064 Mechanic 4065 Guillotine Cross 4073 Royal Guard 4074 Sorcerer\n"
" 4042: Baby Bard 4043: Baby Dancer 4045: Super Baby\n" "4075 Minstrel 4076 Wanderer 4077 Sura 4078 Genetic\n"
"4079 Shadow Chaser\n"
"----- Expanded Class -----\n"
" 23 Super Novice 24 Gunslinger 25 Ninja 4045 Super Baby\n"
"4046 Taekwon 4047 Star Gladiator 4049 Soul Linker 4050 Gangsi\n"
"4051 Death Knight 4052 Dark Collector 4190 Ex. Super Novice 4191 Ex. Super Baby\n"
"4211 Kagerou 4212 Oboro\n"
"----- Baby Novice And Baby 1st Class -----\n"
"4023 Baby Novice 4024 Baby Swordman 4025 Baby Magician 4026 Baby Archer\n"
"4027 Baby Acolyte 4028 Baby Merchant 4029 Baby Thief\n"
"---- Baby 2nd Class ----\n"
"4030 Baby Knight 4031 Baby Priest 4032 Baby Wizard 4033 Baby Blacksmith\n"
"4034 Baby Hunter 4035 Baby Assassin 4037 Baby Crusader 4038 Baby Monk\n"
"4039 Baby Sage 4040 Baby Rogue 4041 Baby Alchemist 4042 Baby Bard\n"
"4043 Baby Dancer\n"
"---- Baby 3rd Class ----\n"
"4096 Baby Rune Knight 4097 Baby Warlock 4098 Baby Ranger 4099 Baby Arch Bishop\n"
"4100 Baby Mechanic 4101 Baby Glt. Cross 4102 Baby Royal Guard 4103 Baby Sorcerer\n"
"4104 Baby Minstrel 4105 Baby Wanderer 4106 Baby Sura 4107 Baby Genetic\n"
"4108 Baby Shadow Chaser\n"
"---- Modes And Others ----\n"
" 22 Wedding 26 Christmas 27 Summer 4048 Star Gladiator (Union)\n"
option: "Params: <param1> <param2>(stackable) <param3>(stackable)\n" "Adds different visual effects on or around your character.\n" option: "Params: <param1> <param2>(stackable) <param3>(stackable)\n" "Adds different visual effects on or around your character.\n"
" <param1> <param2> <param3>\n" " <param1> <param2> <param3>\n"
"01: Stone 01: Sight 01: Sight 512: Cart Lv. 4\n" "01: Stone 01: Sight 01: Sight 512: Cart Lv. 4\n"

View File

@ -639,55 +639,9 @@
921: Please enter at least one option. 921: Please enter at least one option.
// @jobchange // @jobchange
922: Please enter a job ID (usage: @job/@jobchange <job name/ID>). 922: Please enter a job ID.
923: ----- Novice / 1st Class -----
924: 0 Novice 1 Swordman 2 Magician 3 Archer
925: 4 Acolyte 5 Merchant 6 Thief
926: ----- 2nd Class -----
927: 7 Knight 8 Priest 9 Wizard 10 Blacksmith
928: 11 Hunter 12 Assassin 14 Crusader 15 Monk
929: 16 Sage 17 Rogue 18 Alchemist 19 Bard
930: 20 Dancer
931: ----- High Novice / High 1st Class -----
932: 4001 Novice High 4002 Swordman High 4003 Magician High 4004 Archer High
933: 4005 Acolyte High 4006 Merchant High 4007 Thief High
934: ----- Transcendent 2nd Class -----
935: 4008 Lord Knight 4009 High Priest 4010 High Wizard 4011 Whitesmith
936: 4012 Sniper 4013 Assassin Cross 4015 Paladin 4016 Champion
937: 4017 Professor 4018 Stalker 4019 Creator 4020 Clown
938: 4021 Gypsy
939: ----- 3rd Class (Regular) -----
940: 4054 Rune Knight 4055 Warlock 4056 Ranger 4057 Arch Bishop
941: 4058 Mechanic 4059 Guillotine Cross 4066 Royal Guard 4067 Sorcerer
942: 4068 Minstrel 4069 Wanderer 4070 Sura 4071 Genetic
943: 4072 Shadow Chaser
944: ----- 3rd Class (Transcendent) -----
945: 4060 Rune Knight 4061 Warlock 4062 Ranger 4063 Arch Bishop
946: 4064 Mechanic 4065 Guillotine Cross 4073 Royal Guard 4074 Sorcerer
947: 4075 Minstrel 4076 Wanderer 4077 Sura 4078 Genetic
948: 4079 Shadow Chaser
949: ----- Expanded Class -----
950: 23 Super Novice 24 Gunslinger 25 Ninja 4045 Super Baby
951: 4046 Taekwon 4047 Star Gladiator 4049 Soul Linker 4050 Gangsi
952: 4051 Death Knight 4052 Dark Collector 4190 Ex. Super Novice 4191 Ex. Super Baby
953: 4211 Kagerou 4212 Oboro
954: ----- Baby Novice And Baby 1st Class -----
955: 4023 Baby Novice 4024 Baby Swordman 4025 Baby Magician 4026 Baby Archer
956: 4027 Baby Acolyte 4028 Baby Merchant 4029 Baby Thief
957: ---- Baby 2nd Class ----
958: 4030 Baby Knight 4031 Baby Priest 4032 Baby Wizard 4033 Baby Blacksmith
959: 4034 Baby Hunter 4035 Baby Assassin 4037 Baby Crusader 4038 Baby Monk
960: 4039 Baby Sage 4040 Baby Rogue 4041 Baby Alchemist 4042 Baby Bard
961: 4043 Baby Dancer
962: ---- Baby 3rd Class ----
963: 4096 Baby Rune Knight 4097 Baby Warlock 4098 Baby Ranger 4099 Baby Arch Bishop
964: 4100 Baby Mechanic 4101 Baby Glt. Cross 4102 Baby Royal Guard 4103 Baby Sorcerer
965: 4104 Baby Minstrel 4105 Baby Wanderer 4106 Baby Sura 4107 Baby Genetic
966: 4108 Baby Shadow Chaser
967: ---- Modes And Others ----
968: 22 Wedding 26 Christmas 27 Summer 4048 Star Gladiator (Union)
//969-979 free (future jobs?) //923-979 free (future jobs?)
// @kami // @kami
980: Please enter a message (usage: @kami <message>). 980: Please enter a message (usage: @kami <message>).

View File

@ -173,16 +173,19 @@ void do_final_msg(void)
* @param name the name of the command to retrieve help information for * @param name the name of the command to retrieve help information for
* @return the string associated with the command, or NULL * @return the string associated with the command, or NULL
*/ */
static const char* atcommand_help_string(const char* name) static const char* atcommand_help_string(const char* command)
{ {
const char* str = NULL; const char* str = NULL;
config_setting_t* info; config_setting_t* info;
if( *name == atcommand_symbol || *name == charcommand_symbol ) if( *command == atcommand_symbol || *command == charcommand_symbol )
{// remove the prefix symbol for the raw name of the command {// remove the prefix symbol for the raw name of the command
name ++; command ++;
} }
// convert alias to the real command name
command = atcommand_checkalias(command);
// attept to find the first default help command // attept to find the first default help command
info = config_lookup(&atcommand_config, "help"); info = config_lookup(&atcommand_config, "help");
@ -191,7 +194,7 @@ static const char* atcommand_help_string(const char* name)
return NULL; return NULL;
} }
if( !config_setting_lookup_string( info, name, &str ) ) if( !config_setting_lookup_string( info, command, &str ) )
{// failed to find the matching help string {// failed to find the matching help string
return NULL; return NULL;
} }
@ -991,6 +994,7 @@ ACMD_FUNC(jobchange)
{ {
//FIXME: redundancy, potentially wrong code, should use job_name() or similar instead of hardcoding the table [ultramage] //FIXME: redundancy, potentially wrong code, should use job_name() or similar instead of hardcoding the table [ultramage]
int job = 0, upper = 0; int job = 0, upper = 0;
const char* text;
nullpo_retr(-1, sd); nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1)
@ -1137,13 +1141,9 @@ ACMD_FUNC(jobchange)
} }
} }
// TODO: convert this to use atcommand_help_string()
if (!found) { if (!found) {
int i; text = atcommand_help_string(command);
for (i = 922; i <= 966; ++i) if (text) clif_displaymessage(fd, text);
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 -1;
} }
} }
@ -1163,12 +1163,8 @@ ACMD_FUNC(jobchange)
return -1; return -1;
} }
} else { } else {
// TODO: convert this to use atcommand_help_string() text = atcommand_help_string(command);
int i; if (text) clif_displaymessage(fd, text);
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 -1;
} }