From 330e31cc71ece055908acb1eb967b4009ebc9c46 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 23 Feb 2015 14:24:36 -0300 Subject: Hercules Ultimate Localization Design Servers can now run on any number of languages, without editing npc files. Designed by Haruna and Ind http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/ Signed-off-by: shennetsind --- src/map/atcommand.c | 2070 +++++++++++++++++++++++++------------------------ src/map/atcommand.h | 14 +- src/map/buyingstore.c | 14 +- src/map/channel.c | 6 +- src/map/chat.c | 6 +- src/map/chrif.c | 24 +- src/map/clif.c | 76 +- src/map/duel.c | 16 +- src/map/guild.c | 8 +- src/map/homunculus.c | 2 +- src/map/intif.c | 2 +- src/map/map.c | 22 + src/map/map.h | 2 + src/map/npc.c | 28 +- src/map/party.c | 10 +- src/map/pc.c | 32 +- src/map/pc.h | 2 + src/map/pet.c | 4 +- src/map/script.c | 618 ++++++++++++++- src/map/script.h | 52 ++ src/map/skill.c | 6 +- src/map/storage.c | 12 +- src/map/trade.c | 10 +- src/map/vending.c | 6 +- 24 files changed, 1913 insertions(+), 1129 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a6e4d7265..560848c5b 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -74,13 +74,34 @@ struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { return ( i < atcommand->binding_count ) ? atcommand->binding[i] : NULL; } +const char* atcommand_msgsd(struct map_session_data *sd, int msg_number) { + if( !(msg_number >= 0 && msg_number < MAX_MSG) ) + return "??"; + if( !sd || sd->lang_id >= atcommand->max_message_table || !atcommand->msg_table[sd->lang_id][msg_number] ) + return atcommand->msg_table[0][msg_number]; + return atcommand->msg_table[sd->lang_id][msg_number]; +} + +const char* atcommand_msgfd(int fd, int msg_number) { + struct map_session_data *sd = session_isValid(fd) ? session[fd]->session_data : NULL; + if( !(msg_number >= 0 && msg_number < MAX_MSG) ) + return "??"; + if( !sd || sd->lang_id >= atcommand->max_message_table || !atcommand->msg_table[sd->lang_id][msg_number] ) + return atcommand->msg_table[0][msg_number]; + return atcommand->msg_table[sd->lang_id][msg_number]; +} + //----------------------------------------------------------- // Return the message string of the specified number by [Yor] //----------------------------------------------------------- const char* atcommand_msg(int msg_number) { - if (msg_number >= 0 && msg_number < MAX_MSG && - atcommand->msg_table[msg_number] != NULL && atcommand->msg_table[msg_number][0] != '\0') - return atcommand->msg_table[msg_number]; + if (msg_number >= 0 && msg_number < MAX_MSG) { + if(atcommand->msg_table[map->default_lang_id][msg_number] != NULL && atcommand->msg_table[map->default_lang_id][msg_number][0] != '\0') + return atcommand->msg_table[map->default_lang_id][msg_number]; + + if(atcommand->msg_table[0][msg_number] != NULL && atcommand->msg_table[0][msg_number][0] != '\0') + return atcommand->msg_table[0][msg_number]; + } return "??"; } @@ -102,9 +123,9 @@ bool msg_config_read(const char *cfg_name, bool allow_override) { ShowError("Messages file not found: %s\n", cfg_name); return false; } - - if ((--called) == 0) - memset(atcommand->msg_table, 0, sizeof(atcommand->msg_table[0]) * MAX_MSG); + + if( !atcommand->max_message_table ) + atcommand->expand_message_table(); while(fgets(line, sizeof(line), fp)) { if (line[0] == '/' && line[1] == '/') @@ -117,22 +138,37 @@ bool msg_config_read(const char *cfg_name, bool allow_override) { } else { msg_number = atoi(w1); if (msg_number >= 0 && msg_number < MAX_MSG) { - if (atcommand->msg_table[msg_number] != NULL) { + if (atcommand->msg_table[0][msg_number] != NULL) { if (!allow_override) { ShowError("Duplicate message: ID '%d' was already used for '%s'. Message '%s' will be ignored.\n", - msg_number, w2, atcommand->msg_table[msg_number]); + msg_number, w2, atcommand->msg_table[0][msg_number]); continue; } - aFree(atcommand->msg_table[msg_number]); + aFree(atcommand->msg_table[0][msg_number]); } /* this could easily become consecutive memory like get_str() and save the malloc overhead for over 1k calls [Ind] */ - atcommand->msg_table[msg_number] = (char *)aMalloc((strlen(w2) + 1)*sizeof (char)); - strcpy(atcommand->msg_table[msg_number],w2); + atcommand->msg_table[0][msg_number] = (char *)aMalloc((strlen(w2) + 1)*sizeof (char)); + strcpy(atcommand->msg_table[0][msg_number],w2); } } } fclose(fp); + + if( ++called == 1 ) { //Original + if( script->lang_export_fp ) { + int i; + for(i = 0; i < MAX_MSG;i++) { + if( atcommand->msg_table[0][i] != NULL ) { + fprintf(script->lang_export_fp, "msgctxt \"messages.conf\"\n" + "msgid \"%s\"\n" + "msgstr \"\"\n", + atcommand->msg_table[0][i] + ); + } + } + } + } return true; } @@ -140,11 +176,19 @@ bool msg_config_read(const char *cfg_name, bool allow_override) { /*========================================== * Cleanup Message Data *------------------------------------------*/ -void do_final_msg(void) -{ - int i; - for (i = 0; i < MAX_MSG; i++) +void do_final_msg(void) { + int i, j; + + for(i = 0; i < atcommand->max_message_table; i++) { + for (j = 0; j < MAX_MSG; j++) { + if( atcommand->msg_table[i][j] ) + aFree(atcommand->msg_table[i][j]); + } aFree(atcommand->msg_table[i]); + } + + if( atcommand->msg_table ) + aFree(atcommand->msg_table); } /** @@ -168,10 +212,10 @@ ACMD(send) if(!message || !*message || !((sscanf(message, "len %x", &type)==1 && (len=1)) || sscanf(message, "%x", &type)==1) ) { - clif->message(fd, msg_txt(900)); // Usage: - clif->message(fd, msg_txt(901)); // @send len - clif->message(fd, msg_txt(902)); // @send {}* - clif->message(fd, msg_txt(903)); // Value: or S"" + clif->message(fd, msg_fd(fd,900)); // Usage: + clif->message(fd, msg_fd(fd,901)); // @send len + clif->message(fd, msg_fd(fd,902)); // @send {}* + clif->message(fd, msg_fd(fd,903)); // Value: or S"" return false; } @@ -204,7 +248,7 @@ ACMD(send) int off = 2; if (len) { // show packet length - sprintf(atcmd_output, msg_txt(904), type, packet_db[type].len); // Packet 0x%x length: %d + sprintf(atcmd_output, msg_fd(fd,904), type, packet_db[type].len); // Packet 0x%x length: %d clif->message(fd, atcmd_output); return true; } @@ -212,7 +256,7 @@ ACMD(send) len=packet_db[type].len; if (len == 0) { // unknown packet - ERROR - sprintf(atcmd_output, msg_txt(905), type); // Unknown packet: 0x%x + sprintf(atcmd_output, msg_fd(fd,905), type); // Unknown packet: 0x%x clif->message(fd, atcmd_output); return false; } else if (len == -1) { @@ -261,7 +305,7 @@ ACMD(send) while(*message != '"') {// find start of string if(*message == 0 || ISSPACE(*message)){ - PARSE_ERROR(msg_txt(906),message); // Not a string: + PARSE_ERROR(msg_fd(fd,906),message); // Not a string: return false; } ++message; @@ -291,7 +335,7 @@ ACMD(send) ++message; CHECK_EOS(message); if(!ISXDIGIT(*message)){ - PARSE_ERROR(msg_txt(907),message); // Not a hexadecimal digit: + PARSE_ERROR(msg_fd(fd,907),message); // Not a hexadecimal digit: return false; } num=(ISDIGIT(*message)?*message-'0':TOLOWER(*message)-'a'+10); @@ -354,7 +398,7 @@ ACMD(send) } } else {// unknown - PARSE_ERROR(msg_txt(908),message); // Unknown type of value in: + PARSE_ERROR(msg_fd(fd,908),message); // Unknown type of value in: return false; } SKIP_VALUE(message); @@ -369,10 +413,10 @@ ACMD(send) WFIFOSET(sd->fd,len); } } else { - clif->message(fd, msg_txt(259)); // Invalid packet + clif->message(fd, msg_fd(fd,259)); // Invalid packet return false; } - sprintf (atcmd_output, msg_txt(258), type, type); // Sent packet 0x%x (%d) + sprintf (atcmd_output, msg_fd(fd,258), type, type); // Sent packet 0x%x (%d) clif->message(fd, atcmd_output); return true; #undef PARSE_ERROR @@ -395,7 +439,7 @@ ACMD(mapmove) { if (!message || !*message || (sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 && sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) { - clif->message(fd, msg_txt(909)); // Please enter a map (usage: @warp/@rura/@mapmove ). + clif->message(fd, msg_fd(fd,909)); // Please enter a map (usage: @warp/@rura/@mapmove ). return false; } @@ -404,35 +448,35 @@ ACMD(mapmove) { m = map->mapindex2mapid(map_index); if (!map_index || m < 0) { // m < 0 means on different server or that map is disabled! [Kevin] - clif->message(fd, msg_txt(1)); // Map not found. + clif->message(fd, msg_fd(fd,1)); // Map not found. return false; } if( sd->bl.m == m && sd->bl.x == x && sd->bl.y == y ) { - clif->message(fd, msg_txt(253)); // You already are at your destination! + clif->message(fd, msg_fd(fd,253)); // You already are at your destination! return false; } if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) { //This is to prevent the pc->setpos call from printing an error. - clif->message(fd, msg_txt(2)); + clif->message(fd, msg_fd(fd,2)); if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1)) x = y = 0; //Invalid cell, use random spot. } if (map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(247)); + clif->message(fd, msg_fd(fd,247)); return false; } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(248)); + clif->message(fd, msg_fd(fd,248)); return false; } if (pc->setpos(sd, map_index, x, y, CLR_TELEPORT) != 0) { - clif->message(fd, msg_txt(1)); // Map not found. + clif->message(fd, msg_fd(fd,1)); // Map not found. return false; } - clif->message(fd, msg_txt(0)); // Warped. + clif->message(fd, msg_fd(fd,0)); // Warped. return true; } @@ -445,7 +489,7 @@ ACMD(where) { memset(atcmd_player_name, '\0', sizeof atcmd_player_name); if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { - clif->message(fd, msg_txt(910)); // Please enter a player name (usage: @where ). + clif->message(fd, msg_fd(fd,910)); // Please enter a player name (usage: @where ). return false; } @@ -454,7 +498,7 @@ ACMD(where) { strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 || (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) ) { - clif->message(fd, msg_txt(3)); // Character not found. + clif->message(fd, msg_fd(fd,3)); // Character not found. return false; } @@ -471,37 +515,37 @@ ACMD(jumpto) { struct map_session_data *pl_sd = NULL; if (!message || !*message) { - clif->message(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto ). + clif->message(fd, msg_fd(fd,911)); // Please enter a player name (usage: @jumpto/@warpto/@goto ). return false; } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. + clif->message(fd, msg_fd(fd,248)); // You are not authorized to warp from your current map. return false; } if( pc_isdead(sd) ) { - clif->message(fd, msg_txt(864)); // "You cannot use this command when dead." + clif->message(fd, msg_fd(fd,864)); // "You cannot use this command when dead." return false; } if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { - clif->message(fd, msg_txt(3)); // Character not found. + clif->message(fd, msg_fd(fd,3)); // Character not found. return false; } if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(247)); // You are not authorized to warp to this map. + clif->message(fd, msg_fd(fd,247)); // You are not authorized to warp to this map. return false; } if( pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y ) { - clif->message(fd, msg_txt(253)); // You already are at your destination! + clif->message(fd, msg_fd(fd,253)); // You already are at your destination! return false; } pc->setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT); - sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s + sprintf(atcmd_output, msg_fd(fd,4), pl_sd->status.name); // Jumped to %s clif->message(fd, atcmd_output); return true; @@ -519,29 +563,29 @@ ACMD(jump) sscanf(message, "%hd %hd", &x, &y); if (map->list[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. + clif->message(fd, msg_fd(fd,248)); // You are not authorized to warp from your current map. return false; } if( pc_isdead(sd) ) { - clif->message(fd, msg_txt(864)); // "You cannot use this command when dead." + clif->message(fd, msg_fd(fd,864)); // "You cannot use this command when dead." return false; } if ((x || y) && map->getcell(sd->bl.m, x, y, CELL_CHKNOPASS)) { //This is to prevent the pc->setpos call from printing an error. - clif->message(fd, msg_txt(2)); + clif->message(fd, msg_fd(fd,2)); if (!map->search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1)) x = y = 0; //Invalid cell, use random spot. } if( x && y && sd->bl.x == x && sd->bl.y == y ) { - clif->message(fd, msg_txt(253)); // You already are at your destination! + clif->message(fd, msg_fd(fd,253)); // You already are at your destination! return false; } pc->setpos(sd, sd->mapindex, x, y, CLR_TELEPORT); - sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d + sprintf(atcmd_output, msg_fd(fd,5), sd->bl.x, sd->bl.y); // Jumped to %d %d clif->message(fd, atcmd_output); return true; } @@ -589,33 +633,33 @@ ACMD(who) { continue; switch (display_type) { case 2: { - StrBuf->Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s " + StrBuf->Printf(&buf, msg_fd(fd,343), pl_sd->status.name); // "Name: %s " if (pc_get_group_id(pl_sd) > 0) // Player title, if exists - StrBuf->Printf(&buf, msg_txt(344), pcg->get_name(pl_sd->group)); // "(%s) " - StrBuf->Printf(&buf, msg_txt(347), pl_sd->status.base_level, pl_sd->status.job_level, + StrBuf->Printf(&buf, msg_fd(fd,344), pcg->get_name(pl_sd->group)); // "(%s) " + StrBuf->Printf(&buf, msg_fd(fd,347), pl_sd->status.base_level, pl_sd->status.job_level, pc->job_name(pl_sd->status.class_)); // "| Lv:%d/%d | Job: %s" break; } case 3: { if (pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) - StrBuf->Printf(&buf, msg_txt(912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) " - StrBuf->Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s " + StrBuf->Printf(&buf, msg_fd(fd,912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) " + StrBuf->Printf(&buf, msg_fd(fd,343), pl_sd->status.name); // "Name: %s " if (pc_get_group_id(pl_sd) > 0) // Player title, if exists - StrBuf->Printf(&buf, msg_txt(344), pcg->get_name(pl_sd->group)); // "(%s) " - StrBuf->Printf(&buf, msg_txt(348), mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); // "| Location: %s %d %d" + StrBuf->Printf(&buf, msg_fd(fd,344), pcg->get_name(pl_sd->group)); // "(%s) " + StrBuf->Printf(&buf, msg_fd(fd,348), mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); // "| Location: %s %d %d" break; } default: { struct party_data *p = party->search(pl_sd->status.party_id); struct guild *g = pl_sd->guild; - StrBuf->Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s " + StrBuf->Printf(&buf, msg_fd(fd,343), pl_sd->status.name); // "Name: %s " if (pc_get_group_id(pl_sd) > 0) // Player title, if exists - StrBuf->Printf(&buf, msg_txt(344), pcg->get_name(pl_sd->group)); // "(%s) " + StrBuf->Printf(&buf, msg_fd(fd,344), pcg->get_name(pl_sd->group)); // "(%s) " if (p != NULL) - StrBuf->Printf(&buf, msg_txt(345), p->party.name); // " | Party: '%s'" + StrBuf->Printf(&buf, msg_fd(fd,345), p->party.name); // " | Party: '%s'" if (g != NULL) - StrBuf->Printf(&buf, msg_txt(346), g->name); // " | Guild: '%s'" + StrBuf->Printf(&buf, msg_fd(fd,346), g->name); // " | Guild: '%s'" break; } } @@ -628,18 +672,18 @@ ACMD(who) { if (map_id < 0) { if (count == 0) - StrBuf->AppendStr(&buf, msg_txt(28)); // No player found. + StrBuf->AppendStr(&buf, msg_fd(fd,28)); // No player found. else if (count == 1) - StrBuf->AppendStr(&buf, msg_txt(29)); // 1 player found. + StrBuf->AppendStr(&buf, msg_fd(fd,29)); // 1 player found. else - StrBuf->Printf(&buf, msg_txt(30), count); // %d players found. + StrBuf->Printf(&buf, msg_fd(fd,30), count); // %d players found. } else { if (count == 0) - StrBuf->Printf(&buf, msg_txt(54), map->list[map_id].name); // No player found in map '%s'. + StrBuf->Printf(&buf, msg_fd(fd,54), map->list[map_id].name); // No player found in map '%s'. else if (count == 1) - StrBuf->Printf(&buf, msg_txt(55), map->list[map_id].name); // 1 player found in map '%s'. + StrBuf->Printf(&buf, msg_fd(fd,55), map->list[map_id].name); // 1 player found in map '%s'. else - StrBuf->Printf(&buf, msg_txt(56), count, map->list[map_id].name); // %d players found in map '%s'. + StrBuf->Printf(&buf, msg_fd(fd,56), count, map->list[map_id].name); // %d players found in map '%s'. } clif->message(fd, StrBuf->Value(&buf)); StrBuf->Destroy(&buf); @@ -689,18 +733,18 @@ ACMD(whogm) if (pl_level > level) { if (pc_isinvisible(pl_sd)) continue; - sprintf(atcmd_output, msg_txt(913), pl_sd->status.name); // Name: %s (GM) + sprintf(atcmd_output, msg_fd(fd,913), pl_sd->status.name); // Name: %s (GM) clif->message(fd, atcmd_output); count++; continue; } - sprintf(atcmd_output, msg_txt(914), // Name: %s (GM:%d) | Location: %s %d %d + sprintf(atcmd_output, msg_fd(fd,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->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(915), // BLvl: %d | Job: %s (Lvl: %d) + sprintf(atcmd_output, msg_fd(fd,915), // BLvl: %d | Job: %s (Lvl: %d) pl_sd->status.base_level, pc->job_name(pl_sd->status.class_), pl_sd->status.job_level); clif->message(fd, atcmd_output); @@ -708,8 +752,8 @@ ACMD(whogm) p = party->search(pl_sd->status.party_id); g = pl_sd->guild; - sprintf(atcmd_output,msg_txt(916), // Party: '%s' | Guild: '%s' - p?p->party.name:msg_txt(917), g?g->name:msg_txt(917)); // None. + sprintf(atcmd_output,msg_fd(fd,916), // Party: '%s' | Guild: '%s' + p?p->party.name:msg_fd(fd,917), g?g->name:msg_fd(fd,917)); // None. clif->message(fd, atcmd_output); count++; @@ -717,11 +761,11 @@ ACMD(whogm) mapit->free(iter); if (count == 0) - clif->message(fd, msg_txt(150)); // No GM found. + clif->message(fd, msg_fd(fd,150)); // No GM found. else if (count == 1) - clif->message(fd, msg_txt(151)); // 1 GM found. + clif->message(fd, msg_fd(fd,151)); // 1 GM found. else { - sprintf(atcmd_output, msg_txt(152), count); // %d GMs found. + sprintf(atcmd_output, msg_fd(fd,152), count); // %d GMs found. clif->message(fd, atcmd_output); } @@ -739,7 +783,7 @@ ACMD(save) chrif->save(sd,0); - clif->message(fd, msg_txt(6)); // Your save point has been changed. + clif->message(fd, msg_fd(fd,6)); // Your save point has been changed. return true; } @@ -752,16 +796,16 @@ ACMD(load) { m = map->mapindex2mapid(sd->status.save_point.map); if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(249)); // You are not authorized to warp to your save map. + clif->message(fd, msg_fd(fd,249)); // You are not authorized to warp to your save map. return false; } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. + clif->message(fd, msg_fd(fd,248)); // You are not authorized to warp from your current map. return false; } pc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT); - clif->message(fd, msg_txt(7)); // Warping to save point.. + clif->message(fd, msg_fd(fd,7)); // Warping to save point.. return true; } @@ -776,7 +820,7 @@ ACMD(speed) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &speed) < 1) { - sprintf(atcmd_output, msg_txt(918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please enter a speed value (usage: @speed <%d-%d>). + sprintf(atcmd_output, msg_fd(fd,918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please enter a speed value (usage: @speed <%d-%d>). clif->message(fd, atcmd_output); return false; } @@ -790,9 +834,9 @@ ACMD(speed) if( sd->base_status.speed != DEFAULT_WALK_SPEED ) { sd->state.permanent_speed = 1; // Set lock when set to non-default speed. - clif->message(fd, msg_txt(8)); // Speed changed. + clif->message(fd, msg_fd(fd,8)); // Speed changed. } else - clif->message(fd, msg_txt(172)); //Speed returned to normal. + clif->message(fd, msg_fd(fd,172)); //Speed returned to normal. status_calc_bl(&sd->bl, SCB_SPEED); @@ -808,11 +852,11 @@ ACMD(storage) return false; if (storage->open(sd) == 1) { //Already open. - clif->message(fd, msg_txt(250)); + clif->message(fd, msg_fd(fd,250)); return false; } - clif->message(fd, msg_txt(919)); // Storage opened. + clif->message(fd, msg_fd(fd,919)); // Storage opened. return true; } @@ -824,7 +868,7 @@ ACMD(storage) ACMD(guildstorage) { if (!sd->status.guild_id) { - clif->message(fd, msg_txt(252)); + clif->message(fd, msg_fd(fd,252)); return false; } @@ -832,21 +876,21 @@ ACMD(guildstorage) return false; if (sd->state.storage_flag == 1) { - clif->message(fd, msg_txt(250)); + clif->message(fd, msg_fd(fd,250)); return false; } if (sd->state.storage_flag == 2) { - clif->message(fd, msg_txt(251)); + clif->message(fd, msg_fd(fd,251)); return false; } if( gstorage->open(sd) ) { - clif->message(fd, msg_txt(1201)); // Your guild's storage has already been opened by another member, try again later. + clif->message(fd, msg_fd(fd,1201)); // Your guild's storage has already been opened by another member, try again later. return false; } - clif->message(fd, msg_txt(920)); // Guild storage opened. + clif->message(fd, msg_fd(fd,920)); // Guild storage opened. return true; } @@ -865,7 +909,7 @@ ACMD(option) text = atcommand_help_string( info ); // notify the user of the requirement to enter an option - clif->message(fd, msg_txt(921)); // Please enter at least one option. + clif->message(fd, msg_fd(fd,921)); // Please enter at least one option. if( text ) {// send the help text associated with this command clif->messageln( fd, text ); @@ -878,7 +922,7 @@ ACMD(option) sd->sc.opt2 = param2; pc->setoption(sd, param3); - clif->message(fd, msg_txt(9)); // Options changed. + clif->message(fd, msg_fd(fd,9)); // Options changed. return true; } @@ -893,7 +937,7 @@ ACMD(hide) { status->set_viewdata(&sd->bl, sd->disguise); else status->set_viewdata(&sd->bl, sd->status.class_); - clif->message(fd, msg_txt(10)); // Invisible: Off + clif->message(fd, msg_fd(fd,10)); // Invisible: Off // increment the number of pvp players on the map map->list[sd->bl.m].users_pvp++; @@ -907,7 +951,7 @@ ACMD(hide) { } else { sd->sc.option |= OPTION_INVISIBLE; sd->vd.class_ = INVISIBLE_CLASS; - clif->message(fd, msg_txt(11)); // Invisible: On + clif->message(fd, msg_fd(fd,11)); // Invisible: On // decrement the number of pvp players on the map map->list[sd->bl.m].users_pvp--; @@ -967,15 +1011,15 @@ ACMD(jobchange) { || job == JOB_LORD_KNIGHT2 || job == JOB_PALADIN2 || job == JOB_BABY_KNIGHT2 || job == JOB_BABY_CRUSADER2 || job == JOB_STAR_GLADIATOR2 || (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2) ) { - clif->message(fd, msg_txt(923)); //"You can not change to this job by command." + clif->message(fd, msg_fd(fd,923)); //"You can not change to this job by command." return true; } if (pc->db_checkid(job)) { if (pc->jobchange(sd, job, upper) == 0) - clif->message(fd, msg_txt(12)); // Your job has been changed. + clif->message(fd, msg_fd(fd,12)); // Your job has been changed. else { - clif->message(fd, msg_txt(155)); // You are unable to change your job. + clif->message(fd, msg_fd(fd,155)); // You are unable to change your job. return false; } } else { @@ -994,9 +1038,9 @@ ACMD(jobchange) { ACMD(kill) { status_kill(&sd->bl); - clif->message(sd->fd, msg_txt(13)); // A pity! You've died. + clif->message(sd->fd, msg_fd(fd,13)); // A pity! You've died. if (fd != sd->fd) - clif->message(fd, msg_txt(14)); // Character killed. + clif->message(fd, msg_fd(fd,14)); // Character killed. return true; } @@ -1006,11 +1050,11 @@ ACMD(kill) ACMD(alive) { if (!status->revive(&sd->bl, 100, 100)) { - clif->message(fd, msg_txt(867)); // "You're not dead." + clif->message(fd, msg_fd(fd,867)); // "You're not dead." return false; } clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1); - clif->message(fd, msg_txt(16)); // You've been revived! It's a miracle! + clif->message(fd, msg_fd(fd,16)); // You've been revived! It's a miracle! return true; } @@ -1025,7 +1069,7 @@ ACMD(kami) if(*(info->command + 4) != 'c' && *(info->command + 4) != 'C') { if (!message || !*message) { - clif->message(fd, msg_txt(980)); // Please enter a message (usage: @kami ). + clif->message(fd, msg_fd(fd,980)); // Please enter a message (usage: @kami ). return false; } @@ -1036,12 +1080,12 @@ ACMD(kami) intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(info->command + 4) == 'b' || *(info->command + 4) == 'B') ? BC_BLUE : BC_YELLOW); } else { if(!message || !*message || (sscanf(message, "%u %199[^\n]", &color, atcmd_output) < 2)) { - clif->message(fd, msg_txt(981)); // Please enter color and message (usage: @kamic ). + clif->message(fd, msg_fd(fd,981)); // Please enter color and message (usage: @kamic ). return false; } if(color > 0xFFFFFF) { - clif->message(fd, msg_txt(982)); // Invalid color. + clif->message(fd, msg_fd(fd,982)); // Invalid color. return false; } intif->broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); @@ -1061,27 +1105,27 @@ ACMD(heal) // some overflow checks if( hp == INT_MIN ) hp++; if( sp == INT_MIN ) sp++; - + if ( hp == 0 && sp == 0 ) { if (!status_percent_heal(&sd->bl, 100, 100)) - clif->message(fd, msg_txt(157)); // HP and SP have already been recovered. + clif->message(fd, msg_fd(fd,157)); // HP and SP have already been recovered. else - clif->message(fd, msg_txt(17)); // HP, SP recovered. + clif->message(fd, msg_fd(fd,17)); // HP, SP recovered. return true; } if ( hp > 0 && sp >= 0 ) { if(!status->heal(&sd->bl, hp, sp, 0)) - clif->message(fd, msg_txt(157)); // HP and SP are already with the good value. + clif->message(fd, msg_fd(fd,157)); // HP and SP are already with the good value. else - clif->message(fd, msg_txt(17)); // HP, SP recovered. + clif->message(fd, msg_fd(fd,17)); // HP, SP recovered. return true; } if ( hp < 0 && sp <= 0 ) { status->damage(NULL, &sd->bl, -hp, -sp, 0, 0); clif->damage(&sd->bl,&sd->bl, 0, 0, -hp, 0, 4, 0); - clif->message(fd, msg_txt(156)); // HP or/and SP modified. + clif->message(fd, msg_fd(fd,156)); // HP or/and SP modified. return true; } @@ -1102,7 +1146,7 @@ ACMD(heal) status->damage(NULL, &sd->bl, 0, -sp, 0, 0); } - clif->message(fd, msg_txt(156)); // HP or/and SP modified. + clif->message(fd, msg_fd(fd,156)); // HP or/and SP modified. return true; } @@ -1124,13 +1168,13 @@ ACMD(item) sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 && sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2 ))) { - clif->message(fd, msg_txt(295)); // Please enter an item name or ID (usage: @itembound ). + clif->message(fd, msg_fd(fd,295)); // Please enter an item name or ID (usage: @itembound ). return false; } else if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) { - clif->message(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item ). + clif->message(fd, msg_fd(fd,983)); // Please enter an item name or ID (usage: @item ). return false; } @@ -1140,13 +1184,13 @@ ACMD(item) if ((item_data = itemdb->search_name(item_name)) == NULL && (item_data = itemdb->exists(atoi(item_name))) == NULL) { - clif->message(fd, msg_txt(19)); // Invalid item ID or name. + clif->message(fd, msg_fd(fd,19)); // Invalid item ID or name. return false; } if(!strcmpi(info->command,"itembound") ) { if( !(bound >= IBT_MIN && bound <= IBT_MAX) ) { - clif->message(fd, msg_txt(298)); // Invalid bound type + clif->message(fd, msg_fd(fd,298)); // Invalid bound type return false; } switch( (enum e_item_bound_type)bound ) { @@ -1155,13 +1199,13 @@ ACMD(item) break; /* no restrictions */ case IBT_PARTY: if( !sd->status.party_id ) { - clif->message(fd, msg_txt(1498)); //You can't add a party bound item to a character without party! + clif->message(fd, msg_fd(fd,1498)); //You can't add a party bound item to a character without party! return false; } break; case IBT_GUILD: if( !sd->status.guild_id ) { - clif->message(fd, msg_txt(1499)); //You can't add a guild bound item to a character without guild! + clif->message(fd, msg_fd(fd,1499)); //You can't add a guild bound item to a character without guild! return false; } break; @@ -1173,7 +1217,7 @@ ACMD(item) //Check if it's stackable. if (!itemdb->isstackable2(item_data)) { if( bound && (item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) ) { - clif->message(fd, msg_txt(498)); // Cannot create bounded pet eggs or pet armors. + clif->message(fd, msg_fd(fd,498)); // Cannot create bounded pet eggs or pet armors. return false; } get_count = 1; @@ -1193,7 +1237,7 @@ ACMD(item) } if (flag == 0) - clif->message(fd, msg_txt(18)); // Item created. + clif->message(fd, msg_fd(fd,18)); // Item created. return true; } @@ -1214,15 +1258,15 @@ ACMD(item2) if (!strcmpi(info->command,"itembound2") && (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4, &bound) < 10 && sscanf(message, "%99s %d %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4, &bound) < 10 ))) { - clif->message(fd, msg_txt(296)); // Please enter all parameters (usage: @itembound2 - clif->message(fd, msg_txt(297)); // ). + clif->message(fd, msg_fd(fd,296)); // Please enter all parameters (usage: @itembound2 + clif->message(fd, msg_fd(fd,297)); // ). return false; } else if ( !message || !*message || ( 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->message(fd, msg_txt(984)); // Please enter all parameters (usage: @item2 - clif->message(fd, msg_txt(985)); // ). + clif->message(fd, msg_fd(fd,984)); // Please enter all parameters (usage: @item2 + clif->message(fd, msg_fd(fd,985)); // ). return false; } @@ -1230,7 +1274,7 @@ ACMD(item2) number = 1; if( !strcmpi(info->command,"itembound2") && !(bound >= IBT_MIN && bound <= IBT_MAX) ) { - clif->message(fd, msg_txt(298)); // Invalid bound type + clif->message(fd, msg_fd(fd,298)); // Invalid bound type return false; } @@ -1248,7 +1292,7 @@ ACMD(item2) bound = 1; if( !itemdb->isstackable2(item_data) ) { if( bound && (item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) ) { - clif->message(fd, msg_txt(498)); // Cannot create bounded pet eggs or pet armors. + clif->message(fd, msg_fd(fd,498)); // Cannot create bounded pet eggs or pet armors. return false; } loop = number; @@ -1282,9 +1326,9 @@ ACMD(item2) } if (flag == 0) - clif->message(fd, msg_txt(18)); // Item created. + clif->message(fd, msg_fd(fd,18)); // Item created. } else { - clif->message(fd, msg_txt(19)); // Invalid item ID or name. + clif->message(fd, msg_fd(fd,19)); // Invalid item ID or name. return false; } @@ -1303,7 +1347,7 @@ ACMD(itemreset) pc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND); } } - clif->message(fd, msg_txt(20)); // All of your items have been removed. + clif->message(fd, msg_fd(fd,20)); // All of your items have been removed. return true; } @@ -1316,13 +1360,13 @@ ACMD(baselevelup) int level=0, i=0, status_point=0; if (!message || !*message || !(level = atoi(message))) { - clif->message(fd, msg_txt(986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup ). + clif->message(fd, msg_fd(fd,986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup ). return false; } if (level > 0) { if (sd->status.base_level >= pc->maxbaselv(sd)) { // check for max level by Valaris - clif->message(fd, msg_txt(47)); // Base level can't go any higher. + clif->message(fd, msg_fd(fd,47)); // Base level can't go any higher. return false; } // End Addition if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positive overflow @@ -1335,10 +1379,10 @@ ACMD(baselevelup) status_calc_pc(sd, SCO_FORCE); status_percent_heal(&sd->bl, 100, 100); clif->misceffect(&sd->bl, 0); - clif->message(fd, msg_txt(21)); // Base level raised. + clif->message(fd, msg_fd(fd,21)); // Base level raised. } else { if (sd->status.base_level == 1) { - clif->message(fd, msg_txt(158)); // Base level can't go any lower. + clif->message(fd, msg_fd(fd,158)); // Base level can't go any lower. return false; } level*=-1; @@ -1353,7 +1397,7 @@ ACMD(baselevelup) else sd->status.status_point -= status_point; sd->status.base_level -= (unsigned int)level; - clif->message(fd, msg_txt(22)); // Base level lowered. + clif->message(fd, msg_fd(fd,22)); // Base level lowered. status_calc_pc(sd, SCO_FORCE); } sd->status.base_exp = 0; @@ -1375,12 +1419,12 @@ ACMD(joblevelup) int level=0; if (!message || !*message || !(level = atoi(message))) { - clif->message(fd, msg_txt(987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup ). + clif->message(fd, msg_fd(fd,987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup ). return false; } if (level > 0) { if (sd->status.job_level >= pc->maxjoblv(sd)) { - clif->message(fd, msg_txt(23)); // Job level can't go any higher. + clif->message(fd, msg_fd(fd,23)); // Job level can't go any higher. return false; } if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positive overflow @@ -1388,10 +1432,10 @@ ACMD(joblevelup) sd->status.job_level += (unsigned int)level; sd->status.skill_point += level; clif->misceffect(&sd->bl, 1); - clif->message(fd, msg_txt(24)); // Job level raised. + clif->message(fd, msg_fd(fd,24)); // Job level raised. } else { if (sd->status.job_level == 1) { - clif->message(fd, msg_txt(159)); // Job level can't go any lower. + clif->message(fd, msg_fd(fd,159)); // Job level can't go any lower. return false; } level *=-1; @@ -1404,7 +1448,7 @@ ACMD(joblevelup) sd->status.skill_point = 0; else sd->status.skill_point -= level; - clif->message(fd, msg_txt(25)); // Job level lowered. + clif->message(fd, msg_fd(fd,25)); // Job level lowered. } sd->status.job_exp = 0; clif->updatestatus(sd, SP_JOBLEVEL); @@ -1433,7 +1477,7 @@ ACMD(help) { } if (!atcommand->can_use2(sd, command_name, COMMAND_ATCOMMAND)) { - sprintf(atcmd_output, msg_txt(153), message); // "%s is Unknown Command" + sprintf(atcmd_output, msg_fd(fd,153), message); // "%s is Unknown Command" clif->message(fd, atcmd_output); atcommand->get_suggestions(sd, command_name, true); return false; @@ -1442,13 +1486,13 @@ ACMD(help) { tinfo = atcommand->get_info_byname(atcommand->check_alias(command_name)); if ( !tinfo || tinfo->help == NULL ) { - sprintf(atcmd_output, msg_txt(988), atcommand->at_symbol, command_name); // There is no help for %c%s. + sprintf(atcmd_output, msg_fd(fd,988), atcommand->at_symbol, command_name); // There is no help for %c%s. clif->message(fd, atcmd_output); atcommand->get_suggestions(sd, command_name, true); return false; } - sprintf(atcmd_output, msg_txt(989), atcommand->at_symbol, command_name); // Help for command %c%s: + sprintf(atcmd_output, msg_fd(fd,989), atcommand->at_symbol, command_name); // Help for command %c%s: clif->message(fd, atcmd_output); { // Display aliases @@ -1459,7 +1503,7 @@ ACMD(help) { bool has_aliases = false; StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, msg_txt(990)); // Available aliases: + StrBuf->AppendStr(&buf, msg_fd(fd,990)); // Available aliases: command_info = atcommand->get_info_byname(command_name); iter = db_iterator(atcommand->alias_db); for (alias_info = dbi_first(iter); dbi_exists(iter); alias_info = dbi_next(iter)) { @@ -1509,7 +1553,7 @@ int atcommand_pvpoff_sub(struct block_list *bl,va_list ap) ACMD(pvpoff) { if (!map->list[sd->bl.m].flag.pvp) { - clif->message(fd, msg_txt(160)); // PvP is already Off. + clif->message(fd, msg_fd(fd,160)); // PvP is already Off. return false; } @@ -1522,7 +1566,7 @@ ACMD(pvpoff) } map->foreachinmap(atcommand->pvpoff_sub,sd->bl.m, BL_PC); map->foreachinmap(atcommand->stopattack,sd->bl.m, BL_CHAR, 0); - clif->message(fd, msg_txt(31)); // PvP: Off. + clif->message(fd, msg_fd(fd,31)); // PvP: Off. return true; } @@ -1546,7 +1590,7 @@ int atcommand_pvpon_sub(struct block_list *bl,va_list ap) ACMD(pvpon) { if (map->list[sd->bl.m].flag.pvp) { - clif->message(fd, msg_txt(161)); // PvP is already On. + clif->message(fd, msg_fd(fd,161)); // PvP is already On. return false; } @@ -1559,7 +1603,7 @@ ACMD(pvpon) map->foreachinmap(atcommand->pvpon_sub,sd->bl.m, BL_PC); } - clif->message(fd, msg_txt(32)); // PvP: On. + clif->message(fd, msg_fd(fd,32)); // PvP: On. return true; } @@ -1570,7 +1614,7 @@ ACMD(pvpon) ACMD(gvgoff) { if (!map->list[sd->bl.m].flag.gvg) { - clif->message(fd, msg_txt(162)); // GvG is already Off. + clif->message(fd, msg_fd(fd,162)); // GvG is already Off. return false; } @@ -1579,7 +1623,7 @@ ACMD(gvgoff) { clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); map->foreachinmap(atcommand->stopattack,sd->bl.m, BL_CHAR, 0); - clif->message(fd, msg_txt(33)); // GvG: Off. + clif->message(fd, msg_fd(fd,33)); // GvG: Off. return true; } @@ -1590,7 +1634,7 @@ ACMD(gvgoff) { ACMD(gvgon) { if (map->list[sd->bl.m].flag.gvg) { - clif->message(fd, msg_txt(163)); // GvG is already On. + clif->message(fd, msg_fd(fd,163)); // GvG is already On. return false; } @@ -1598,7 +1642,7 @@ ACMD(gvgon) map->list[sd->bl.m].flag.gvg = 1; clif->map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); - clif->message(fd, msg_txt(34)); // GvG: On. + clif->message(fd, msg_fd(fd,34)); // GvG: On. return true; } @@ -1613,7 +1657,7 @@ ACMD(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, msg_txt(991), // Please enter at least one value (usage: @model ). + sprintf(atcmd_output, msg_fd(fd,991), // Please enter at least one value (usage: @model ). MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); clif->message(fd, atcmd_output); return false; @@ -1625,9 +1669,9 @@ ACMD(model) pc->changelook(sd, LOOK_HAIR, hair_style); pc->changelook(sd, LOOK_HAIR_COLOR, hair_color); pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearance changed. + clif->message(fd, msg_fd(fd,36)); // Appearance changed. } else { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd,37)); // An invalid number was specified. return false; } @@ -1644,16 +1688,16 @@ ACMD(dye) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) { - sprintf(atcmd_output, msg_txt(992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please enter a clothes color (usage: @dye/@ccolor ). + sprintf(atcmd_output, msg_fd(fd,992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please enter a clothes color (usage: @dye/@ccolor ). clif->message(fd, atcmd_output); return false; } if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) { pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearance changed. + clif->message(fd, msg_fd(fd,36)); // Appearance changed. } else { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd,37)); // An invalid number was specified. return false; } @@ -1670,16 +1714,16 @@ ACMD(hair_style) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) { - sprintf(atcmd_output, msg_txt(993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please enter a hair style (usage: @hairstyle/@hstyle ). + sprintf(atcmd_output, msg_fd(fd,993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please enter a hair style (usage: @hairstyle/@hstyle ). clif->message(fd, atcmd_output); return false; } if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) { pc->changelook(sd, LOOK_HAIR, hair_style); - clif->message(fd, msg_txt(36)); // Appearance changed. + clif->message(fd, msg_fd(fd,36)); // Appearance changed. } else { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd,37)); // An invalid number was specified. return false; } @@ -1696,16 +1740,16 @@ ACMD(hair_color) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) { - sprintf(atcmd_output, msg_txt(994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please enter a hair color (usage: @haircolor/@hcolor ). + sprintf(atcmd_output, msg_fd(fd,994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please enter a hair color (usage: @haircolor/@hcolor ). clif->message(fd, atcmd_output); return false; } if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) { pc->changelook(sd, LOOK_HAIR_COLOR, hair_color); - clif->message(fd, msg_txt(36)); // Appearance changed. + clif->message(fd, msg_fd(fd,36)); // Appearance changed. } else { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd,37)); // An invalid number was specified. return false; } @@ -1776,7 +1820,7 @@ ACMD(go) { // attempt to find the text help string text = atcommand_help_string( info ); - clif->message(fd, msg_txt(38)); // Invalid location number, or name. + clif->message(fd, msg_fd(fd,38)); // Invalid location number, or name. if( text ) {// send the text to the client clif->messageln( fd, text ); @@ -1829,21 +1873,21 @@ ACMD(go) { if (town >= 0 && town < ARRAYLENGTH(data)) { int16 m = map->mapname2mapid(data[town].map); if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(247)); + clif->message(fd, msg_fd(fd,247)); return false; } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(248)); + clif->message(fd, msg_fd(fd,248)); return false; } if (pc->setpos(sd, mapindex->name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) { - clif->message(fd, msg_txt(0)); // Warped. + clif->message(fd, msg_fd(fd,0)); // Warped. } else { - clif->message(fd, msg_txt(1)); // Map not found. + clif->message(fd, msg_fd(fd,1)); // Map not found. return false; } } else { - clif->message(fd, msg_txt(38)); // Invalid location number or name. + clif->message(fd, msg_fd(fd,38)); // Invalid location number or name. return false; } @@ -1870,7 +1914,7 @@ ACMD(monster) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message) { - clif->message(fd, msg_txt(80)); // Please specify a display name or monster name/id. + clif->message(fd, msg_fd(fd,80)); // Please specify a display name or monster name/id. return false; } if (sscanf(message, "\"%23[^\"]\" %23s %d", name, monster, &number) > 1 || @@ -1886,7 +1930,7 @@ ACMD(monster) //As before, name may be already filled. name[0] = '\0'; } else { - clif->message(fd, msg_txt(80)); // Give a display name and monster name/id please. + clif->message(fd, msg_fd(fd,80)); // Give a display name and monster name/id please. return false; } @@ -1894,7 +1938,7 @@ ACMD(monster) mob_id = mob->db_checkid(atoi(monster)); if (mob_id == 0) { - clif->message(fd, msg_txt(40)); // Invalid monster ID or name. + clif->message(fd, msg_fd(fd,40)); // Invalid monster ID or name. return false; } @@ -1929,13 +1973,13 @@ ACMD(monster) if (count != 0) if (number == count) - clif->message(fd, msg_txt(39)); // All monster summoned! + clif->message(fd, msg_fd(fd,39)); // All monster summoned! else { - sprintf(atcmd_output, msg_txt(240), count); // %d monster(s) summoned! + sprintf(atcmd_output, msg_fd(fd,240), count); // %d monster(s) summoned! clif->message(fd, atcmd_output); } else { - clif->message(fd, msg_txt(40)); // Invalid monster ID or name. + clif->message(fd, msg_fd(fd,40)); // Invalid monster ID or name. return false; } @@ -1980,7 +2024,7 @@ ACMD(killmonster) { map->foreachinmap(atcommand->atkillmonster_sub, map_id, BL_MOB, -drop_flag); - clif->message(fd, msg_txt(165)); // All monsters killed! + clif->message(fd, msg_fd(fd,165)); // All monsters killed! return true; } @@ -1996,26 +2040,26 @@ ACMD(refine) memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d %d", &position, &refine) < 2) { - clif->message(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->message(fd, msg_fd(fd,996)); // Please enter a position and an amount (usage: @refine <+/- amount>). + sprintf(atcmd_output, msg_fd(fd,997), EQP_HEAD_LOW); // %d: Lower Headgear clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(998), EQP_HAND_R); // %d: Right Hand + sprintf(atcmd_output, msg_fd(fd,998), EQP_HAND_R); // %d: Right Hand clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(999), EQP_GARMENT); // %d: Garment + sprintf(atcmd_output, msg_fd(fd,999), EQP_GARMENT); // %d: Garment clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1000), EQP_ACC_L); // %d: Left Accessory + sprintf(atcmd_output, msg_fd(fd,1000), EQP_ACC_L); // %d: Left Accessory clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1001), EQP_ARMOR); // %d: Body Armor + sprintf(atcmd_output, msg_fd(fd,1001), EQP_ARMOR); // %d: Body Armor clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1002), EQP_HAND_L); // %d: Left Hand + sprintf(atcmd_output, msg_fd(fd,1002), EQP_HAND_L); // %d: Left Hand clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1003), EQP_SHOES); // %d: Shoes + sprintf(atcmd_output, msg_fd(fd,1003), EQP_SHOES); // %d: Shoes clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1004), EQP_ACC_R); // %d: Right Accessory + sprintf(atcmd_output, msg_fd(fd,1004), EQP_ACC_R); // %d: Right Accessory clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1005), EQP_HEAD_TOP); // %d: Top Headgear + sprintf(atcmd_output, msg_fd(fd,1005), EQP_HEAD_TOP); // %d: Top Headgear clif->message(fd, atcmd_output); - sprintf(atcmd_output, msg_txt(1006), EQP_HEAD_MID); // %d: Mid Headgear + sprintf(atcmd_output, msg_fd(fd,1006), EQP_HEAD_MID); // %d: Mid Headgear clif->message(fd, atcmd_output); return false; } @@ -2053,11 +2097,11 @@ ACMD(refine) } if (count == 0) - clif->message(fd, msg_txt(166)); // No item has been refined. + clif->message(fd, msg_fd(fd,166)); // No item has been refined. else if (count == 1) - clif->message(fd, msg_txt(167)); // 1 item has been refined. + clif->message(fd, msg_fd(fd,167)); // 1 item has been refined. else { - sprintf(atcmd_output, msg_txt(168), count); // %d items have been refined. + sprintf(atcmd_output, msg_fd(fd,168), count); // %d items have been refined. clif->message(fd, atcmd_output); } @@ -2081,13 +2125,13 @@ ACMD(produce) sscanf(message, "\"%99[^\"]\" %d %d", item_name, &attribute, &star) < 1 && sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1 )) { - clif->message(fd, msg_txt(1007)); // Please enter at least one item name/ID (usage: @produce <# of very's>). + clif->message(fd, msg_fd(fd,1007)); // Please enter at least one item name/ID (usage: @produce <# of very's>). return false; } if ( (item_data = itemdb->search_name(item_name)) == NULL && (item_data = itemdb->exists(atoi(item_name))) == NULL ) { - clif->message(fd, msg_txt(170)); //This item is not an equipment. + clif->message(fd, msg_fd(fd,170)); //This item is not an equipment. return false; } @@ -2114,7 +2158,7 @@ ACMD(produce) if ((flag = pc->additem(sd, &tmp_item, 1, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); } else { - sprintf(atcmd_output, msg_txt(169), item_id, item_data->name); // The item (%d: '%s') is not equipable. + sprintf(atcmd_output, msg_fd(fd,169), item_id, item_data->name); // The item (%d: '%s') is not equipable. clif->message(fd, atcmd_output); return false; } @@ -2134,13 +2178,13 @@ ACMD(memo) if( !message || !*message || sscanf(message, "%d", &position) < 1 ) { int i; - clif->message(sd->fd, msg_txt(868)); // "Your current memo positions are:" + clif->message(sd->fd, msg_fd(fd,868)); // "Your current memo positions are:" for( i = 0; i < MAX_MEMOPOINTS; i++ ) { if( sd->status.memo_point[i].map ) sprintf(atcmd_output, "%d - %s (%d,%d)", i, mapindex_id2name(sd->status.memo_point[i].map), sd->status.memo_point[i].x, sd->status.memo_point[i].y); else - sprintf(atcmd_output, msg_txt(171), i); // %d - void + sprintf(atcmd_output, msg_fd(fd,171), i); // %d - void clif->message(sd->fd, atcmd_output); } return true; @@ -2148,7 +2192,7 @@ ACMD(memo) if( position < 0 || position >= MAX_MEMOPOINTS ) { - sprintf(atcmd_output, msg_txt(1008), 0, MAX_MEMOPOINTS-1); // Please enter a valid position (usage: @memo ). + sprintf(atcmd_output, msg_fd(fd,1008), 0, MAX_MEMOPOINTS-1); // Please enter a valid position (usage: @memo ). clif->message(fd, atcmd_output); return false; } @@ -2188,7 +2232,7 @@ ACMD(displaystatus) int i, type, flag, tick, val1 = 0, val2 = 0, val3 = 0; if (!message || !*message || (i = sscanf(message, "%d %d %d %d %d %d", &type, &flag, &tick, &val1, &val2, &val3)) < 1) { - clif->message(fd, msg_txt(1009)); // Please enter a status type/flag (usage: @displaystatus { { {}}}). + clif->message(fd, msg_fd(fd,1009)); // Please enter a status type/flag (usage: @displaystatus { { {}}}). return false; } if (i < 2) flag = 1; @@ -2211,7 +2255,7 @@ ACMD(statuspoint) unsigned int new_status_point; if (!message || !*message || (point = atoi(message)) == 0) { - clif->message(fd, msg_txt(1010)); // Please enter a number (usage: @stpoint ). + clif->message(fd, msg_fd(fd,1010)); // Please enter a number (usage: @stpoint ). return false; } @@ -2238,12 +2282,12 @@ ACMD(statuspoint) if (new_status_point != sd->status.status_point) { sd->status.status_point = new_status_point; clif->updatestatus(sd, SP_STATUSPOINT); - clif->message(fd, msg_txt(174)); // Number of status points changed. + clif->message(fd, msg_fd(fd,174)); // Number of status points changed. } else { if (point < 0) - clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. + clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value. else - clif->message(fd, msg_txt(149)); // Unable to increase the number/value. + clif->message(fd, msg_fd(fd,149)); // Unable to increase the number/value. return false; } @@ -2259,7 +2303,7 @@ ACMD(skillpoint) unsigned int new_skill_point; if (!message || !*message || (point = atoi(message)) == 0) { - clif->message(fd, msg_txt(1011)); // Please enter a number (usage: @skpoint ). + clif->message(fd, msg_fd(fd,1011)); // Please enter a number (usage: @skpoint ). return false; } @@ -2286,12 +2330,12 @@ ACMD(skillpoint) if (new_skill_point != sd->status.skill_point) { sd->status.skill_point = new_skill_point; clif->updatestatus(sd, SP_SKILLPOINT); - clif->message(fd, msg_txt(175)); // Number of skill points changed. + clif->message(fd, msg_fd(fd,175)); // Number of skill points changed. } else { if (point < 0) - clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. + clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value. else - clif->message(fd, msg_txt(149)); // Unable to increase the number/value. + clif->message(fd, msg_fd(fd,149)); // Unable to increase the number/value. return false; } @@ -2306,24 +2350,24 @@ ACMD(zeny) int zeny=0, ret=-1; if (!message || !*message || (zeny = atoi(message)) == 0) { - clif->message(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny ). + clif->message(fd, msg_fd(fd,1012)); // Please enter an amount (usage: @zeny ). return false; } if(zeny > 0){ if((ret=pc->getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL)) == 1) - clif->message(fd, msg_txt(149)); // Unable to increase the number/value. + clif->message(fd, msg_fd(fd,149)); // Unable to increase the number/value. } else { if( sd->status.zeny < -zeny ) zeny = -sd->status.zeny; if((ret=pc->payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1) - clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. + clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value. } if( ret ) //ret != 0 means cmd failure return false; - clif->message(fd, msg_txt(176)); + clif->message(fd, msg_fd(fd,176)); return true; } @@ -2339,14 +2383,14 @@ ACMD(param) { memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) { - clif->message(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). + clif->message(fd, msg_fd(fd,1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). return false; } ARR_FIND( 0, ARRAYLENGTH(param), i, strcmpi(info->command, param[i]) == 0 ); if( i == ARRAYLENGTH(param) || i > MAX_STATUS_TYPE) { // normally impossible... - clif->message(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). + clif->message(fd, msg_fd(fd,1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). return false; } @@ -2375,12 +2419,12 @@ ACMD(param) { clif->updatestatus(sd, SP_STR + i); clif->updatestatus(sd, SP_USTR + i); status_calc_pc(sd, SCO_FORCE); - clif->message(fd, msg_txt(42)); // Stat changed. + clif->message(fd, msg_fd(fd,42)); // Stat changed. } else { if (value < 0) - clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. + clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value. else - clif->message(fd, msg_txt(149)); // Unable to increase the number/value. + clif->message(fd, msg_fd(fd,149)); // Unable to increase the number/value. return false; } @@ -2431,12 +2475,12 @@ ACMD(stat_all) { if (count > 0) { // if at least 1 stat modified status_calc_pc(sd, SCO_FORCE); - clif->message(fd, msg_txt(84)); // All stats changed! + clif->message(fd, msg_fd(fd,84)); // All stats changed! } else { if (value < 0) - clif->message(fd, msg_txt(177)); // You cannot decrease that stat anymore. + clif->message(fd, msg_fd(fd,177)); // You cannot decrease that stat anymore. else - clif->message(fd, msg_txt(178)); // You cannot increase that stat anymore. + clif->message(fd, msg_fd(fd,178)); // You cannot increase that stat anymore. return false; } @@ -2452,17 +2496,17 @@ ACMD(guildlevelup) { struct guild *guild_info; if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) { - clif->message(fd, msg_txt(1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>). + clif->message(fd, msg_fd(fd,1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>). return false; } if (sd->status.guild_id <= 0 || (guild_info = sd->guild) == NULL) { - clif->message(fd, msg_txt(43)); // You're not in a guild. + clif->message(fd, msg_fd(fd,43)); // You're not in a guild. return false; } #if 0 // By enabling this, only the guild leader can use this command if (strcmp(sd->status.name, guild_info->master) != 0) { - clif->message(fd, msg_txt(44)); // You're not the master of your guild. + clif->message(fd, msg_fd(fd,44)); // You're not the master of your guild. return false; } #endif // 0 @@ -2475,9 +2519,9 @@ ACMD(guildlevelup) { if (added_level != 0) { intif->guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, sizeof(added_level)); - clif->message(fd, msg_txt(179)); // Guild level changed. + clif->message(fd, msg_fd(fd,179)); // Guild level changed. } else { - clif->message(fd, msg_txt(45)); // Guild level change failed. + clif->message(fd, msg_fd(fd,45)); // Guild level change failed. return false; } @@ -2493,7 +2537,7 @@ ACMD(makeegg) int id, pet_id; if (!message || !*message) { - clif->message(fd, msg_txt(1015)); // Please enter a monster/egg name/ID (usage: @makeegg ). + clif->message(fd, msg_fd(fd,1015)); // Please enter a monster/egg name/ID (usage: @makeegg ). return false; } @@ -2516,7 +2560,7 @@ ACMD(makeegg) (short)pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); } else { - clif->message(fd, msg_txt(180)); // The monster/egg name/id doesn't exist. + clif->message(fd, msg_fd(fd,180)); // The monster/egg name/id doesn't exist. return false; } @@ -2531,7 +2575,7 @@ ACMD(hatch) if (sd->status.pet_id <= 0) clif->sendegg(sd); else { - clif->message(fd, msg_txt(181)); // You already have a pet. + clif->message(fd, msg_fd(fd,181)); // You already have a pet. return false; } @@ -2547,30 +2591,30 @@ ACMD(petfriendly) struct pet_data *pd; if (!message || !*message || (friendly = atoi(message)) < 0) { - clif->message(fd, msg_txt(1016)); // Please enter a valid value (usage: @petfriendly <0-1000>). + clif->message(fd, msg_fd(fd,1016)); // Please enter a valid value (usage: @petfriendly <0-1000>). return false; } pd = sd->pd; if (!pd) { - clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. + clif->message(fd, msg_fd(fd,184)); // Sorry, but you have no pet. return false; } if (friendly < 0 || friendly > 1000) { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd,37)); // An invalid number was specified. return false; } if (friendly == pd->pet.intimate) { - clif->message(fd, msg_txt(183)); // Pet intimacy is already at maximum. + clif->message(fd, msg_fd(fd,183)); // Pet intimacy is already at maximum. return false; } pet->set_intimate(pd, friendly); clif->send_petstatus(sd); - clif->message(fd, msg_txt(182)); // Pet intimacy changed. + clif->message(fd, msg_fd(fd,182)); // Pet intimacy changed. return true; } @@ -2583,27 +2627,27 @@ ACMD(pethungry) struct pet_data *pd; if (!message || !*message || (hungry = atoi(message)) < 0) { - clif->message(fd, msg_txt(1017)); // Please enter a valid number (usage: @pethungry <0-100>). + clif->message(fd, msg_fd(fd,1017)); // Please enter a valid number (usage: @pethungry <0-100>). return false; } pd = sd->pd; if (!sd->status.pet_id || !pd) { - clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. + clif->message(fd, msg_fd(fd,184)); // Sorry, but you have no pet. return false; } if (hungry < 0 || hungry > 100) { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd,37)); // An invalid number was specified. return false; } if (hungry == pd->pet.hungry) { - clif->message(fd, msg_txt(186)); // Pet hunger is already at maximum. + clif->message(fd, msg_fd(fd,186)); // Pet hunger is already at maximum. return false; } pd->pet.hungry = hungry; clif->send_petstatus(sd); - clif->message(fd, msg_txt(185)); // Pet hunger changed. + clif->message(fd, msg_fd(fd,185)); // Pet hunger changed. return true; } @@ -2615,19 +2659,19 @@ ACMD(petrename) { struct pet_data *pd; if (!sd->status.pet_id || !sd->pd) { - clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. + clif->message(fd, msg_fd(fd,184)); // Sorry, but you have no pet. return false; } pd = sd->pd; if (!pd->pet.rename_flag) { - clif->message(fd, msg_txt(188)); // You can already rename your pet. + clif->message(fd, msg_fd(fd,188)); // You can already rename your pet. return false; } pd->pet.rename_flag = 0; intif->save_petdata(sd->status.account_id, &pd->pet); clif->send_petstatus(sd); - clif->message(fd, msg_txt(187)); // You can now rename your pet. + clif->message(fd, msg_fd(fd,187)); // You can now rename your pet. return true; } @@ -2639,34 +2683,34 @@ ACMD(recall) { struct map_session_data *pl_sd = NULL; if (!message || !*message) { - clif->message(fd, msg_txt(1018)); // Please enter a player name (usage: @recall ). + clif->message(fd, msg_fd(fd,1018)); // Please enter a player name (usage: @recall ). return false; } if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { - clif->message(fd, msg_txt(3)); // Character not found. + clif->message(fd, msg_fd(fd,3)); // Character not found. return false; } if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { - clif->message(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. + clif->message(fd, msg_fd(fd,81)); // Your GM level doesn't authorize you to preform this action on the specified player. return false; } if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1019)); // You are not authorized to warp someone to this map. + clif->message(fd, msg_fd(fd,1019)); // You are not authorized to warp someone to this map. return false; } if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { - clif->message(fd, msg_txt(1020)); // You are not authorized to warp this player from their map. + clif->message(fd, msg_fd(fd,1020)); // You are not authorized to warp this player from their map. return false; } if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) { return false; } pc->setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN); - sprintf(atcmd_output, msg_txt(46), pl_sd->status.name); // %s recalled! + sprintf(atcmd_output, msg_fd(fd,46), pl_sd->status.name); // %s recalled! clif->message(fd, atcmd_output); return true; @@ -2682,12 +2726,12 @@ ACMD(char_block) memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { - clif->message(fd, msg_txt(1021)); // Please enter a player name (usage: @block ). + clif->message(fd, msg_fd(fd,1021)); // Please enter a player name (usage: @block ). return false; } chrif->char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block - clif->message(fd, msg_txt(88)); // Character name sent to char-server to ask it. + clif->message(fd, msg_fd(fd,88)); // Character name sent to char-server to ask it. return true; } @@ -2718,7 +2762,7 @@ ACMD(char_ban) memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!message || !*message || sscanf(message, "%255s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { - clif->message(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @ban