From 861ce796764e45d11c335f03af1126d8ffa45056 Mon Sep 17 00:00:00 2001 From: brianluau Date: Fri, 31 Aug 2012 06:24:39 +0000 Subject: - Moved 400+ hard-coded messages to msg_athena.conf for easier translating. Thanks mkbu95! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16724 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 1029 +++++++++++++++++++++++---------------------------- 1 file changed, 469 insertions(+), 560 deletions(-) (limited to 'src') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 73fa670fb..3cd9bc582 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -52,7 +52,7 @@ #define ATCOMMAND_LENGTH 50 #define ACMD_FUNC(x) static int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message) -#define MAX_MSG 1000 +#define MAX_MSG 1400 typedef struct AtCommandInfo AtCommandInfo; @@ -214,10 +214,9 @@ ACMD_FUNC(send) !((sscanf(message, "len %x", &type)==1 && (len=1)) || sscanf(message, "%x", &type)==1) ) { - clif_displaymessage(fd, "Usage:"); - clif_displaymessage(fd, " @send len "); - clif_displaymessage(fd, " @send {}*"); - clif_displaymessage(fd, " Value: or S\"\""); + int i; + for (i = 0; i < 4; ++i) + clif_displaymessage(fd, msg_txt(900 + i)); return -1; } @@ -256,7 +255,7 @@ ACMD_FUNC(send) if(len) {// show packet length - sprintf(atcmd_output, "Packet 0x%x length: %d", type, packet_db[sd->packet_ver][type].len); + sprintf(atcmd_output, msg_txt(904), type, packet_db[sd->packet_ver][type].len); clif_displaymessage(fd, atcmd_output); return 0; } @@ -265,7 +264,7 @@ ACMD_FUNC(send) off=2; if(len == 0) {// unknown packet - ERROR - sprintf(atcmd_output, "Unknown packet: 0x%x", type); + sprintf(atcmd_output, msg_txt(905), type); clif_displaymessage(fd, atcmd_output); return -1; } else if(len == -1) @@ -313,7 +312,7 @@ ACMD_FUNC(send) while(*message != '"') {// find start of string if(*message == 0 || ISSPACE(*message)){ - PARSE_ERROR("Not a string:",message); + PARSE_ERROR(msg_txt(906),message); return -1; } ++message; @@ -343,7 +342,7 @@ ACMD_FUNC(send) ++message; CHECK_EOS(message); if(!ISXDIGIT(*message)){ - PARSE_ERROR("Not a hexadecimal digit:",message); + PARSE_ERROR(msg_txt(907),message); return -1; } num=(ISDIGIT(*message)?*message-'0':TOLOWER(*message)-'a'+10); @@ -406,7 +405,7 @@ ACMD_FUNC(send) } } else {// unknown - PARSE_ERROR("Unknown type of value in:",message); + PARSE_ERROR(msg_txt(908),message); return -1; } SKIP_VALUE(message); @@ -453,7 +452,7 @@ ACMD_FUNC(mapmove) (sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 && sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) { - clif_displaymessage(fd, "Please, enter a map (usage: @warp/@rura/@mapmove )."); + clif_displaymessage(fd, msg_txt(909)); // Please, enter a map (usage: @warp/@rura/@mapmove ). return -1; } @@ -500,7 +499,7 @@ ACMD_FUNC(where) memset(atcmd_player_name, '\0', sizeof atcmd_player_name); if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { - clif_displaymessage(fd, "Please, enter a player name (usage: @where )."); + clif_displaymessage(fd, msg_txt(910)); // Please, enter a player name (usage: @where ). return -1; } @@ -529,7 +528,7 @@ ACMD_FUNC(jumpto) nullpo_retr(-1, sd); if (!message || !*message) { - clif_displaymessage(fd, "Please, enter a player name (usage: @jumpto/@warpto/@goto )."); + clif_displaymessage(fd, msg_txt(911)); // Please, enter a player name (usage: @jumpto/@warpto/@goto ). return -1; } @@ -656,7 +655,7 @@ ACMD_FUNC(who) } case 3: { if (pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) - StringBuf_Printf(&buf, "(CID:%d/AID:%d) ", pl_sd->status.char_id, pl_sd->status.account_id); + StringBuf_Printf(&buf, msg_txt(912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) " StringBuf_Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s " if (pc_get_group_id(pl_sd) > 0) // Player title, if exists StringBuf_Printf(&buf, msg_txt(344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) " @@ -751,18 +750,18 @@ ACMD_FUNC(whogm) if (pl_level > level) { if (pl_sd->sc.option & OPTION_INVISIBLE) continue; - sprintf(atcmd_output, "Name: %s (GM)", pl_sd->status.name); + sprintf(atcmd_output, msg_txt(913), pl_sd->status.name); // Name: %s (GM) clif_displaymessage(fd, atcmd_output); count++; continue; } - sprintf(atcmd_output, "Name: %s (GM:%d) | Location: %s %d %d", + sprintf(atcmd_output, msg_txt(914), // Name: %s (GM:%d) | Location: %s %d %d pl_sd->status.name, pl_level, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, " BLvl: %d | Job: %s (Lvl: %d)", + sprintf(atcmd_output, msg_txt(915), // BLvl: %d | Job: %s (Lvl: %d) pl_sd->status.base_level, job_name(pl_sd->status.class_), pl_sd->status.job_level); clif_displaymessage(fd, atcmd_output); @@ -770,8 +769,8 @@ ACMD_FUNC(whogm) p = party_search(pl_sd->status.party_id); g = guild_search(pl_sd->status.guild_id); - sprintf(atcmd_output," Party: '%s' | Guild: '%s'", - p?p->party.name:"None", g?g->name:"None"); + sprintf(atcmd_output,msg_txt(916), // Party: '%s' | Guild: '%s' + p?p->party.name:msg_txt(917), g?g->name:msg_txt(917)); // None. clif_displaymessage(fd, atcmd_output); count++; @@ -845,7 +844,7 @@ ACMD_FUNC(speed) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &speed) < 1) { - sprintf(atcmd_output, "Please, enter a speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED); + sprintf(atcmd_output, msg_txt(918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please, enter a speed value (usage: @speed <%d-%d>). clif_displaymessage(fd, atcmd_output); return -1; } @@ -872,7 +871,7 @@ ACMD_FUNC(storage) return -1; } - clif_displaymessage(fd, "Storage opened."); + clif_displaymessage(fd, msg_txt(918)); // Storage opened. return 0; } @@ -904,7 +903,7 @@ ACMD_FUNC(guildstorage) } storage_guild_storageopen(sd); - clif_displaymessage(fd, "Guild storage opened."); + clif_displaymessage(fd, msg_txt(919)); // Guild storage opened. return 0; } @@ -924,7 +923,7 @@ ACMD_FUNC(option) text = atcommand_help_string( command ); // notify the user of the requirement to enter an option - clif_displaymessage(fd, "Please, enter at least one option.."); + clif_displaymessage(fd, msg_txt(921)); // Please, enter at least one option.. if( text ) {// send the help text associated with this command @@ -1140,53 +1139,11 @@ ACMD_FUNC(jobchange) // TODO: convert this to use atcommand_help_string() if (!found) { - clif_displaymessage(fd, "Please, enter a job ID (usage: @job/@jobchange )."); - clif_displaymessage(fd, "----- Novice / 1st Class -----"); - clif_displaymessage(fd, " 0 Novice 1 Swordman 2 Magician 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 Magician 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) -----"); - 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) -----"); - clif_displaymessage(fd, "4060 Rune Knight 4061 Warlock 4062 Ranger 4063 Arch Bishop"); - clif_displaymessage(fd, "4064 Mechanic 4065 Guillotine Cross 4073 Royal Guard 4074 Sorcerer"); - clif_displaymessage(fd, "4075 Minstrel 4076 Wanderer 4077 Sura 4078 Genetic"); - clif_displaymessage(fd, "4079 Shadow Chaser"); - clif_displaymessage(fd, "----- Expanded Class -----"); - clif_displaymessage(fd, " 23 Super Novice 24 Gunslinger 25 Ninja 4045 Super Baby"); - clif_displaymessage(fd, "4046 Taekwon 4047 Star Gladiator 4049 Soul Linker 4050 Gangsi"); - clif_displaymessage(fd, "4051 Death Knight 4052 Dark Collector 4190 Ex. Super Novice 4191 Ex. Super Baby"); - clif_displaymessage(fd, "4211 Kagerou 4212 Oboro"); - clif_displaymessage(fd, "----- Baby Novice And Baby 1st Class -----"); - clif_displaymessage(fd, "4023 Baby Novice 4024 Baby Swordman 4025 Baby Magician 4026 Baby Archer"); - clif_displaymessage(fd, "4027 Baby Acolyte 4028 Baby Merchant 4029 Baby Thief"); - clif_displaymessage(fd, "---- Baby 2nd Class ----"); - clif_displaymessage(fd, "4030 Baby Knight 4031 Baby Priest 4032 Baby Wizard 4033 Baby Blacksmith"); - clif_displaymessage(fd, "4034 Baby Hunter 4035 Baby Assassin 4037 Baby Crusader 4038 Baby Monk"); - clif_displaymessage(fd, "4039 Baby Sage 4040 Baby Rogue 4041 Baby Alchemist 4042 Baby Bard"); - clif_displaymessage(fd, "4043 Baby Dancer"); - clif_displaymessage(fd, "---- Baby 3rd Class ----"); - clif_displaymessage(fd, "4096 Baby Rune Knight 4097 Baby Warlock 4098 Baby Ranger 4099 Baby Arch Bishop"); - clif_displaymessage(fd, "4100 Baby Mechanic 4101 Baby Glt. Cross 4102 Baby Royal Guard 4103 Baby Sorcerer"); - clif_displaymessage(fd, "4104 Baby Minstrel 4105 Baby Wanderer 4106 Baby Sura 4107 Baby Genetic"); - clif_displaymessage(fd, "4108 Baby Shadow Chaser"); - //clif_displaymessage(fd, "---- Modes And Others ----"); - //clif_displaymessage(fd, " 22 Wedding 26 Christmas 27 Summer 4048 Star Gladiator (Union)"); + int i; + for (i = 0; i < 45; ++i) + clif_displaymessage(fd, msg_txt(922 + 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; } } @@ -1206,54 +1163,12 @@ ACMD_FUNC(jobchange) return -1; } } else { - // TODO: convert this to use atcommand_help_string() - clif_displaymessage(fd, "Please enter a valid job ID (usage: @job/@jobchange )."); - clif_displaymessage(fd, "----- Novice / 1st Class -----"); - clif_displaymessage(fd, " 0 Novice 1 Swordman 2 Magician 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 Magician 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) -----"); - 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) -----"); - clif_displaymessage(fd, "4060 Rune Knight 4061 Warlock 4062 Ranger 4063 Arch Bishop"); - clif_displaymessage(fd, "4064 Mechanic 4065 Guillotine Cross 4073 Royal Guard 4074 Sorcerer"); - clif_displaymessage(fd, "4075 Minstrel 4076 Wanderer 4077 Sura 4078 Genetic"); - clif_displaymessage(fd, "4079 Shadow Chaser"); - clif_displaymessage(fd, "----- Expanded Class -----"); - clif_displaymessage(fd, " 23 Super Novice 24 Gunslinger 25 Ninja 4045 Super Baby"); - clif_displaymessage(fd, "4046 Taekwon 4047 Star Gladiator 4049 Soul Linker 4050 Gangsi"); - clif_displaymessage(fd, "4051 Death Knight 4052 Dark Collector 4190 Ex. Super Novice 4191 Ex. Super Baby"); - clif_displaymessage(fd, "4211 Kagerou 4212 Oboro"); - clif_displaymessage(fd, "----- Baby Novice And Baby 1st Class -----"); - clif_displaymessage(fd, "4023 Baby Novice 4024 Baby Swordman 4025 Baby Magician 4026 Baby Archer"); - clif_displaymessage(fd, "4027 Baby Acolyte 4028 Baby Merchant 4029 Baby Thief"); - clif_displaymessage(fd, "---- Baby 2nd Class ----"); - clif_displaymessage(fd, "4030 Baby Knight 4031 Baby Priest 4032 Baby Wizard 4033 Baby Blacksmith"); - clif_displaymessage(fd, "4034 Baby Hunter 4035 Baby Assassin 4037 Baby Crusader 4038 Baby Monk"); - clif_displaymessage(fd, "4039 Baby Sage 4040 Baby Rogue 4041 Baby Alchemist 4042 Baby Bard"); - clif_displaymessage(fd, "4043 Baby Dancer"); - clif_displaymessage(fd, "---- Baby 3rd Class ----"); - clif_displaymessage(fd, "4096 Baby Rune Knight 4097 Baby Warlock 4098 Baby Ranger 4099 Baby Arch Bishop"); - clif_displaymessage(fd, "4100 Baby Mechanic 4101 Baby Glt. Cross 4102 Baby Royal Guard 4103 Baby Sorcerer"); - clif_displaymessage(fd, "4104 Baby Minstrel 4105 Baby Wanderer 4106 Baby Sura 4107 Baby Genetic"); - clif_displaymessage(fd, "4108 Baby Shadow Chaser"); - //clif_displaymessage(fd, "---- Modes And Others ----"); - //clif_displaymessage(fd, " 22 Wedding 26 Christmas 27 Summer 4048 Star Gladiator (Union)"); + // TODO: convert this to use atcommand_help_string() + int i; + for (i = 0; i < 45; ++i) + clif_displaymessage(fd, msg_txt(922 + 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; } @@ -1301,7 +1216,7 @@ ACMD_FUNC(kami) if(*(command + 5) != 'c' && *(command + 5) != 'C') { if (!message || !*message) { - clif_displaymessage(fd, "Please, enter a message (usage: @kami )."); + clif_displaymessage(fd, msg_txt(980)); // Please, enter a message (usage: @kami ). return -1; } @@ -1312,12 +1227,12 @@ ACMD_FUNC(kami) intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0); } else { if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) { - clif_displaymessage(fd, "Please, enter color and message (usage: @kamic )."); + clif_displaymessage(fd, msg_txt(981)); // Please, enter color and message (usage: @kamic ). return -1; } if(color > 0xFFFFFF) { - clif_displaymessage(fd, "Invalid color."); + clif_displaymessage(fd, msg_txt(982)); // Invalid color. return -1; } intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); @@ -1401,7 +1316,7 @@ ACMD_FUNC(item) sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) { - clif_displaymessage(fd, "Please, enter an item name/id (usage: @item [quantity])."); + clif_displaymessage(fd, msg_txt(983)); // Please, enter an item name/id (usage: @item [quantity]). return -1; } @@ -1459,8 +1374,8 @@ ACMD_FUNC(item2) sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 && sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 )) { - clif_displaymessage(fd, "Please, enter all informations (usage: @item2 "); - clif_displaymessage(fd, " )."); + clif_displaymessage(fd, msg_txt(984)); // Please, enter all informations (usage: @item2 + clif_displaymessage(fd, msg_txt(985)); // ). return -1; } @@ -1543,7 +1458,7 @@ ACMD_FUNC(baselevelup) level = atoi(message); if (!message || !*message || !level) { - clif_displaymessage(fd, "Please, enter a level adjustment (usage: @lvup/@blevel/@baselvlup )."); + clif_displaymessage(fd, msg_txt(986)); // Please, enter a level adjustment (usage: @lvup/@blevel/@baselvlup ). return -1; } @@ -1604,7 +1519,7 @@ ACMD_FUNC(joblevelup) level = atoi(message); if (!message || !*message || !level) { - clif_displaymessage(fd, "Please, enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup )."); + clif_displaymessage(fd, msg_txt(987)); // Please, enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup ). return -1; } if (level > 0) { @@ -1679,12 +1594,12 @@ ACMD_FUNC(help) } if (!config_setting_lookup_string(help, command_name, &text)) { - clif_displaymessage(fd, "There is no help for this command_name."); + clif_displaymessage(fd, msg_txt(988)); // There is no help for this command_name. atcommand_get_suggestions(sd, command_name, true); return -1; } - sprintf(atcmd_output, "Help for command %c%s:", atcommand_symbol, command_name); + sprintf(atcmd_output, msg_txt(989), atcommand_symbol, command_name); // Help for command %c%s: clif_displaymessage(fd, atcmd_output); { // Display aliases @@ -1695,7 +1610,7 @@ ACMD_FUNC(help) bool has_aliases = false; StringBuf_Init(&buf); - StringBuf_AppendStr(&buf, "Available aliases:"); + StringBuf_AppendStr(&buf, msg_txt(990)); // Available aliases: command_info = get_atcommandinfo_byname(command_name); iter = db_iterator(atcommand_alias_db); for (alias_info = dbi_first(iter); dbi_exists(iter); alias_info = dbi_next(iter)) { @@ -1850,7 +1765,7 @@ ACMD_FUNC(model) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d %d %d", &hair_style, &hair_color, &cloth_color) < 1) { - sprintf(atcmd_output, "Please, enter at least a value (usage: @model ).", + sprintf(atcmd_output, msg_txt(991), // Please, enter at least a value (usage: @model ). MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); clif_displaymessage(fd, atcmd_output); return -1; @@ -1882,7 +1797,7 @@ ACMD_FUNC(dye) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) { - sprintf(atcmd_output, "Please, enter a clothes color (usage: @dye/@ccolor ).", MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); + sprintf(atcmd_output, msg_txt(992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please, enter a clothes color (usage: @dye/@ccolor ). clif_displaymessage(fd, atcmd_output); return -1; } @@ -1909,7 +1824,7 @@ ACMD_FUNC(hair_style) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) { - sprintf(atcmd_output, "Please, enter a hair style (usage: @hairstyle/@hstyle ).", MIN_HAIR_STYLE, MAX_HAIR_STYLE); + sprintf(atcmd_output, msg_txt(993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please, enter a hair style (usage: @hairstyle/@hstyle ). clif_displaymessage(fd, atcmd_output); return -1; } @@ -1936,7 +1851,7 @@ ACMD_FUNC(hair_color) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) { - sprintf(atcmd_output, "Please, enter a hair color (usage: @haircolor/@hcolor ).", MIN_HAIR_COLOR, MAX_HAIR_COLOR); + sprintf(atcmd_output, msg_txt(994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please, enter a hair color (usage: @haircolor/@hcolor ). clif_displaymessage(fd, atcmd_output); return -1; } @@ -2011,7 +1926,7 @@ ACMD_FUNC(go) nullpo_retr(-1, sd); if( map[sd->bl.m].flag.nogo && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) { - clif_displaymessage(sd->fd,"You can not use @go on this map."); + clif_displaymessage(sd->fd,msg_txt(995)); // You can not use @go on this map. return 0; } @@ -2319,26 +2234,26 @@ ACMD_FUNC(refine) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d %d", &position, &refine) < 2) { - clif_displaymessage(fd, "Please, enter a position and an amount (usage: @refine <+/- amount>)."); - sprintf(atcmd_output, "%d: Lower Headgear", EQP_HEAD_LOW); + clif_displaymessage(fd, msg_txt(996)); // Please, enter a position and an amount (usage: @refine <+/- amount>). + sprintf(atcmd_output, msg_txt(997), EQP_HEAD_LOW); // %d: Lower Headgear clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Right Hand", EQP_HAND_R); + sprintf(atcmd_output, msg_txt(998), EQP_HAND_R); // %d: Right Hand clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Garment", EQP_GARMENT); + sprintf(atcmd_output, msg_txt(999), EQP_GARMENT); // %d: Garment clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Left Accessory", EQP_ACC_L); + sprintf(atcmd_output, msg_txt(1000), EQP_ACC_L); // %d: Left Accessory clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Body Armor", EQP_ARMOR); + sprintf(atcmd_output, msg_txt(1001), EQP_ARMOR); // %d: Body Armor clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Left Hand", EQP_HAND_L); + sprintf(atcmd_output, msg_txt(1002), EQP_HAND_L); // %d: Left Hand clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Shoes", EQP_SHOES); + sprintf(atcmd_output, msg_txt(1003), EQP_SHOES); // %d: Shoes clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Right Accessory", EQP_ACC_R); + sprintf(atcmd_output, msg_txt(1004), EQP_ACC_R); // %d: Right Accessory clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Top Headgear", EQP_HEAD_TOP); + sprintf(atcmd_output, msg_txt(1005), EQP_HEAD_TOP); // %d: Top Headgear clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "%d: Mid Headgear", EQP_HEAD_MID); + sprintf(atcmd_output, msg_txt(1006), EQP_HEAD_MID); // %d: Mid Headgear clif_displaymessage(fd, atcmd_output); return -1; } @@ -2404,7 +2319,7 @@ ACMD_FUNC(produce) sscanf(message, "\"%99[^\"]\" %d %d", item_name, &attribute, &star) < 1 && sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1 )) { - clif_displaymessage(fd, "Please, enter at least an item name/id (usage: @produce <# of very's>)."); + clif_displaymessage(fd, msg_txt(1007)); // Please, enter at least an item name/id (usage: @produce <# of very's>). return -1; } @@ -2471,7 +2386,7 @@ ACMD_FUNC(memo) if( position < 0 || position >= MAX_MEMOPOINTS ) { - sprintf(atcmd_output, "Please, enter a valid position (usage: @memo ).", 0, MAX_MEMOPOINTS-1); + sprintf(atcmd_output, msg_txt(1008), 0, MAX_MEMOPOINTS-1); // Please, enter a valid position (usage: @memo ). clif_displaymessage(fd, atcmd_output); return -1; } @@ -2514,7 +2429,7 @@ ACMD_FUNC(displaystatus) nullpo_retr(-1, sd); if (!message || !*message || (i = sscanf(message, "%d %d %d %d %d %d", &type, &flag, &tick, &val1, &val2, &val3)) < 1) { - clif_displaymessage(fd, "Please, enter a status type/flag (usage: @displaystatus { { {}}})."); + clif_displaymessage(fd, msg_txt(1009)); // Please, enter a status type/flag (usage: @displaystatus { { {}}}). return -1; } if (i < 2) flag = 1; @@ -2534,7 +2449,7 @@ ACMD_FUNC(statuspoint) unsigned int new_status_point; if (!message || !*message || (point = atoi(message)) == 0) { - clif_displaymessage(fd, "Please, enter a number (usage: @stpoint )."); + clif_displaymessage(fd, msg_txt(1010)); // Please, enter a number (usage: @stpoint ). return -1; } @@ -2583,7 +2498,7 @@ ACMD_FUNC(skillpoint) nullpo_retr(-1, sd); if (!message || !*message || (point = atoi(message)) == 0) { - clif_displaymessage(fd, "Please, enter a number (usage: @skpoint )."); + clif_displaymessage(fd, msg_txt(1011)); // Please, enter a number (usage: @skpoint ). return -1; } @@ -2631,7 +2546,7 @@ ACMD_FUNC(zeny) nullpo_retr(-1, sd); if (!message || !*message || (zeny = atoi(message)) == 0) { - clif_displaymessage(fd, "Please, enter an amount (usage: @zeny )."); + clif_displaymessage(fd, msg_txt(1012)); // Please, enter an amount (usage: @zeny ). return -1; } @@ -2670,16 +2585,14 @@ ACMD_FUNC(param) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) { - sprintf(atcmd_output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustment>)."); - clif_displaymessage(fd, atcmd_output); + clif_displaymessage(fd, msg_txt(1013)); // Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustment>). return -1; } ARR_FIND( 0, ARRAYLENGTH(param), i, strcmpi(command+1, param[i]) == 0 ); if( i == ARRAYLENGTH(param) || i > MAX_STATUS_TYPE) { // normally impossible... - sprintf(atcmd_output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustment>)."); - clif_displaymessage(fd, atcmd_output); + clif_displaymessage(fd, msg_txt(1013)); // Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustment>). return -1; } @@ -2790,7 +2703,7 @@ ACMD_FUNC(guildlevelup) nullpo_retr(-1, sd); if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) { - clif_displaymessage(fd, "Please, enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>)."); + clif_displaymessage(fd, msg_txt(1014)); // Please, enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>). return -1; } @@ -2830,7 +2743,7 @@ ACMD_FUNC(makeegg) nullpo_retr(-1, sd); if (!message || !*message) { - clif_displaymessage(fd, "Please, enter a monster/egg name/id (usage: @makeegg )."); + clif_displaymessage(fd, msg_txt(1015)); // Please, enter a monster/egg name/id (usage: @makeegg ). return -1; } @@ -2886,7 +2799,7 @@ ACMD_FUNC(petfriendly) nullpo_retr(-1, sd); if (!message || !*message || (friendly = atoi(message)) < 0) { - clif_displaymessage(fd, "Please, enter a valid value (usage: @petfriendly <0-1000>)."); + clif_displaymessage(fd, msg_txt(1016)); // Please, enter a valid value (usage: @petfriendly <0-1000>). return -1; } @@ -2923,7 +2836,7 @@ ACMD_FUNC(pethungry) nullpo_retr(-1, sd); if (!message || !*message || (hungry = atoi(message)) < 0) { - clif_displaymessage(fd, "Please, enter a valid number (usage: @pethungry <0-100>)."); + clif_displaymessage(fd, msg_txt(1017)); // Please, enter a valid number (usage: @pethungry <0-100>). return -1; } @@ -2982,7 +2895,7 @@ ACMD_FUNC(recall) { nullpo_retr(-1, sd); if (!message || !*message) { - clif_displaymessage(fd, "Please, enter a player name (usage: @recall )."); + clif_displaymessage(fd, msg_txt(1018)); // Please, enter a player name (usage: @recall ). return -1; } @@ -2999,11 +2912,11 @@ ACMD_FUNC(recall) { } if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif_displaymessage(fd, "You are not authorised to warp someone to your actual map."); + clif_displaymessage(fd, msg_txt(1019)); // You are not authorised to warp someone to your actual map. return -1; } if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif_displaymessage(fd, "You are not authorized to warp this player from its actual map."); + clif_displaymessage(fd, msg_txt(1020)); // You are not authorized to warp this player from its actual map. return -1; } pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN); @@ -3024,7 +2937,7 @@ ACMD_FUNC(char_block) memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { - clif_displaymessage(fd, "Please, enter a player name (usage: @charblock/@block )."); + clif_displaymessage(fd, msg_txt(1021)); // Please, enter a player name (usage: @charblock/@block ). return -1; } @@ -3061,7 +2974,7 @@ ACMD_FUNC(char_ban) memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!message || !*message || sscanf(message, "%s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { - clif_displaymessage(fd, "Please, enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish