summaryrefslogtreecommitdiff
path: root/src/map/atcommand.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-08-30 17:37:27 -0700
committerBen Longbons <b.r.longbons@gmail.com>2012-09-03 16:23:10 -0700
commit31544d2b6973931be7fdec898ea3672bea831de2 (patch)
treedcf946429b406f39297404be662b0a840094e477 /src/map/atcommand.cpp
parent41974ae5265fbc23a06f276f9e008d5dad020e0b (diff)
downloadtmwa-31544d2b6973931be7fdec898ea3672bea831de2.tar.gz
tmwa-31544d2b6973931be7fdec898ea3672bea831de2.tar.bz2
tmwa-31544d2b6973931be7fdec898ea3672bea831de2.tar.xz
tmwa-31544d2b6973931be7fdec898ea3672bea831de2.zip
Fix compiler errors of C++ conversion
Diffstat (limited to 'src/map/atcommand.cpp')
-rw-r--r--src/map/atcommand.cpp856
1 files changed, 382 insertions, 474 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index 8f62ca2..c608af5 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -10,6 +10,8 @@
#include <time.h>
#include <unistd.h>
+#include <array>
+
#include "../common/socket.hpp"
#include "../common/timer.hpp"
#include "../common/nullpo.hpp"
@@ -38,16 +40,14 @@
static char command_symbol = '@'; // first char of the commands (by [Yor])
-static char msg_table[1000][1024]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
-
#define ATCOMMAND_FUNC(x) int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
ATCOMMAND_FUNC (setup);
ATCOMMAND_FUNC (broadcast);
ATCOMMAND_FUNC (localbroadcast);
ATCOMMAND_FUNC (charwarp);
-ATCOMMAND_FUNC (warp);
+//ATCOMMAND_FUNC (warp);
ATCOMMAND_FUNC (where);
-ATCOMMAND_FUNC (goto);
+//ATCOMMAND_FUNC (goto);
ATCOMMAND_FUNC (jump);
ATCOMMAND_FUNC (who);
ATCOMMAND_FUNC (whogroup);
@@ -66,7 +66,7 @@ ATCOMMAND_FUNC (kill);
ATCOMMAND_FUNC (alive);
ATCOMMAND_FUNC (kami);
ATCOMMAND_FUNC (heal);
-ATCOMMAND_FUNC (item);
+//ATCOMMAND_FUNC (item);
ATCOMMAND_FUNC (itemreset);
ATCOMMAND_FUNC (itemcheck);
ATCOMMAND_FUNC (baselevelup);
@@ -79,7 +79,7 @@ ATCOMMAND_FUNC (gvgoff);
ATCOMMAND_FUNC (gvgon);
ATCOMMAND_FUNC (model);
ATCOMMAND_FUNC (go);
-ATCOMMAND_FUNC (spawn);
+//ATCOMMAND_FUNC (spawn);
ATCOMMAND_FUNC (killmonster);
ATCOMMAND_FUNC (killmonster2);
ATCOMMAND_FUNC (refine);
@@ -92,7 +92,7 @@ ATCOMMAND_FUNC (skillpoint);
ATCOMMAND_FUNC (zeny);
ATCOMMAND_FUNC (param);
ATCOMMAND_FUNC (guildlevelup);
-ATCOMMAND_FUNC (recall);
+//ATCOMMAND_FUNC (recall);
ATCOMMAND_FUNC (recallall);
ATCOMMAND_FUNC (revive);
ATCOMMAND_FUNC (character_stats);
@@ -420,6 +420,7 @@ static AtCommandInfo atcommand_info[] = {
* This function return the name of the job (by [Yor])
*----------------------------------------------------
*/
+static
const char *job_name (int pc_class)
{
switch (pc_class)
@@ -566,61 +567,6 @@ const char *job_name (int pc_class)
return "Unknown Job";
}
-//-----------------------------------------------------------
-// Return the message string of the specified number by [Yor]
-//-----------------------------------------------------------
-char *msg_txt (int msg_number)
-{
- if (msg_number >= 0
- && msg_number < (int) (sizeof (msg_table) / sizeof (msg_table[0]))
- && msg_table[msg_number] != NULL && msg_table[msg_number][0] != '\0')
- return msg_table[msg_number];
-
- return "??";
-}
-
-//------------------------------------------------------------
-// E-mail check: return 0 (not correct) or 1 (valid). by [Yor]
-//------------------------------------------------------------
-int e_mail_check (unsigned char *email)
-{
- char ch;
- unsigned char *last_arobas;
-
- // athena limits
- if (strlen (email) < 3 || strlen (email) > 39)
- return 0;
-
- // part of RFC limits (official reference of e-mail description)
- if (strchr (email, '@') == NULL || email[strlen (email) - 1] == '@')
- return 0;
-
- if (email[strlen (email) - 1] == '.')
- return 0;
-
- last_arobas = strrchr (email, '@');
-
- if (strstr (last_arobas, "@.") != NULL ||
- strstr (last_arobas, "..") != NULL)
- return 0;
-
- for (ch = 1; ch < 32; ch++)
- {
- if (strchr (last_arobas, ch) != NULL)
- {
- return 0;
- break;
- }
- }
-
- if (strchr (last_arobas, ' ') != NULL ||
- strchr (last_arobas, ';') != NULL)
- return 0;
-
- // all correct
- return 1;
-}
-
/*==========================================
* get_atcommand_level @コマンドの必要レベルを取得
*------------------------------------------
@@ -744,7 +690,7 @@ is_atcommand (const int fd, struct map_session_data *sd, const char *message,
if (type == AtCommand_Unknown || info.proc == NULL)
{
- sprintf (output, msg_table[153], command); // %s is Unknown Command.
+ sprintf (output, "%s is Unknown Command.", command);
clif_displaymessage (fd, output);
}
else
@@ -752,7 +698,7 @@ is_atcommand (const int fd, struct map_session_data *sd, const char *message,
if (info.proc (fd, sd, command, p) != 0)
{
// Command can not be executed
- sprintf (output, msg_table[154], command); // %s failed.
+ sprintf (output, "%s failed.", command);
clif_displaymessage (fd, output);
}
else
@@ -844,48 +790,6 @@ static int atkillmonster_sub (struct block_list *bl, va_list ap)
}
/*==========================================
- * Read Message Data
- *------------------------------------------
- */
-int msg_config_read (const char *cfgName)
-{
- int msg_number;
- char line[1024], w1[1024], w2[1024];
- FILE *fp;
-
- if ((fp = fopen_ (cfgName, "r")) == NULL)
- {
- printf ("Messages file not found: %s\n", cfgName);
- return 1;
- }
-
- while (fgets (line, sizeof (line) - 1, fp))
- {
- if (line[0] == '/' && line[1] == '/')
- continue;
- if (sscanf (line, "%[^:]: %[^\r\n]", w1, w2) == 2)
- {
- if (strcasecmp (w1, "import") == 0)
- {
- msg_config_read (w2);
- }
- else
- {
- msg_number = atoi (w1);
- if (msg_number >= 0
- && msg_number <
- (int) (sizeof (msg_table) / sizeof (msg_table[0])))
- strcpy (msg_table[msg_number], w2);
- // printf("message #%d: '%s'.\n", msg_number, msg_table[msg_number]);
- }
- }
- }
- fclose_ (fp);
-
- return 0;
-}
-
-/*==========================================
*
*------------------------------------------
*/
@@ -1051,30 +955,30 @@ int atcommand_charwarp (const int fd, struct map_session_data *sd,
}
if (pc_setpos (pl_sd, map_name, x, y, 3) == 0)
{
- clif_displaymessage (pl_sd->fd, msg_table[0]); // Warped.
- clif_displaymessage (fd, msg_table[15]); // Player warped (message sends to player too).
+ clif_displaymessage (pl_sd->fd, "Warped.");
+ clif_displaymessage (fd, "Player warped (message sends to player too).");
}
else
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[2]); // Coordinates out of range.
+ clif_displaymessage (fd, "Coordinates out of range.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -1128,16 +1032,16 @@ int atcommand_warp (const int fd, struct map_session_data *sd,
return -1;
}
if (pc_setpos (sd, map_name, x, y, 3) == 0)
- clif_displaymessage (fd, msg_table[0]); // Warped.
+ clif_displaymessage (fd, "Warped.");
else
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[2]); // Coordinates out of range.
+ clif_displaymessage (fd, "Coordinates out of range.");
return -1;
}
@@ -1172,7 +1076,7 @@ int atcommand_where (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -1217,12 +1121,12 @@ int atcommand_goto (const int fd, struct map_session_data *sd,
return -1;
}
pc_setpos (sd, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y, 3);
- sprintf (output, msg_table[4], character); // Jump to %s
+ sprintf (output, "Jump to %s", character);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -1264,12 +1168,12 @@ int atcommand_jump (const int fd, struct map_session_data *sd,
return -1;
}
pc_setpos (sd, sd->mapname, x, y, 3);
- sprintf (output, msg_table[5], x, y); // Jump to %d %d
+ sprintf (output, "Jump to %d %d", x, y);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[2]); // Coordinates out of range.
+ clif_displaymessage (fd, "Coordinates out of range.");
return -1;
}
@@ -1334,12 +1238,12 @@ int atcommand_who (const int fd, struct map_session_data *sd,
}
if (count == 0)
- clif_displaymessage (fd, msg_table[28]); // No player found.
+ clif_displaymessage (fd, "No player found.");
else if (count == 1)
- clif_displaymessage (fd, msg_table[29]); // 1 player found.
+ clif_displaymessage (fd, "1 player found.");
else
{
- sprintf (output, msg_table[30], count); // %d players found.
+ sprintf (output, "%d players found.", count);
clif_displaymessage (fd, output);
}
@@ -1420,12 +1324,12 @@ int atcommand_whogroup (const int fd, struct map_session_data *sd,
}
if (count == 0)
- clif_displaymessage (fd, msg_table[28]); // No player found.
+ clif_displaymessage (fd, "No player found.");
else if (count == 1)
- clif_displaymessage (fd, msg_table[29]); // 1 player found.
+ clif_displaymessage (fd, "1 player found.");
else
{
- sprintf (output, msg_table[30], count); // %d players found.
+ sprintf (output, "%d players found.", count);
clif_displaymessage (fd, output);
}
@@ -1492,12 +1396,12 @@ int atcommand_whomap (const int fd, struct map_session_data *sd,
}
if (count == 0)
- sprintf (output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ sprintf (output, "No player found in map '%s'.", map[map_id].name);
else if (count == 1)
- sprintf (output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ sprintf (output, "1 player found in map '%s'.", map[map_id].name);
else
{
- sprintf (output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ sprintf (output, "%d players found in map '%s'.", count, map[map_id].name);
}
clif_displaymessage (fd, output);
@@ -1580,12 +1484,12 @@ int atcommand_whomapgroup (const int fd, struct map_session_data *sd,
}
if (count == 0)
- sprintf (output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ sprintf (output, "No player found in map '%s'.", map[map_id].name);
else if (count == 1)
- sprintf (output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ sprintf (output, "1 player found in map '%s'.", map[map_id].name);
else
{
- sprintf (output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ sprintf (output, "%d players found in map '%s'.", count, map[map_id].name);
}
clif_displaymessage (fd, output);
@@ -1673,12 +1577,12 @@ int atcommand_whogm (const int fd, struct map_session_data *sd,
}
if (count == 0)
- clif_displaymessage (fd, msg_table[150]); // No GM found.
+ clif_displaymessage (fd, "No GM found.");
else if (count == 1)
- clif_displaymessage (fd, msg_table[151]); // 1 GM found.
+ clif_displaymessage (fd, "1 GM found.");
else
{
- sprintf (output, msg_table[152], count); // %d GMs found.
+ sprintf (output, "%d GMs found.", count);
clif_displaymessage (fd, output);
}
@@ -1697,7 +1601,7 @@ int atcommand_save (const int fd, struct map_session_data *sd,
pc_setsavepoint (sd, sd->mapname, sd->bl.x, sd->bl.y);
pc_makesavestatus (sd);
chrif_save (sd);
- clif_displaymessage (fd, msg_table[6]); // Character data respawn point saved.
+ clif_displaymessage (fd, "Character data respawn point saved.");
return 0;
}
@@ -1729,7 +1633,7 @@ int atcommand_load (const int fd, struct map_session_data *sd,
pc_setpos (sd, sd->status.save_point.map, sd->status.save_point.x,
sd->status.save_point.y, 0);
- clif_displaymessage (fd, msg_table[7]); // Warping to respawn point.
+ clif_displaymessage (fd, "Warping to respawn point.");
return 0;
}
@@ -1762,7 +1666,7 @@ int atcommand_speed (const int fd, struct map_session_data *sd,
//sd->walktimer = x;
//この文を追加 by れ
clif_updatestatus (sd, SP_SPEED);
- clif_displaymessage (fd, msg_table[8]); // Speed changed.
+ clif_displaymessage (fd, "Speed changed.");
}
else
{
@@ -1788,14 +1692,14 @@ int atcommand_storage (const int fd, struct map_session_data *sd,
if (sd->state.storage_flag)
{
- clif_displaymessage (fd, msg_table[250]);
+ clif_displaymessage (fd, "msg_table[250]");
return -1;
}
if ((stor = account2storage2 (sd->status.account_id)) != NULL
&& stor->storage_status == 1)
{
- clif_displaymessage (fd, msg_table[250]);
+ clif_displaymessage (fd, "msg_table[250]");
return -1;
}
@@ -1818,20 +1722,20 @@ int atcommand_guildstorage (const int fd, struct map_session_data *sd,
{
if (sd->state.storage_flag)
{
- clif_displaymessage (fd, msg_table[251]);
+ clif_displaymessage (fd, "msg_table[251]");
return -1;
}
if ((stor = account2storage2 (sd->status.account_id)) != NULL
&& stor->storage_status == 1)
{
- clif_displaymessage (fd, msg_table[251]);
+ clif_displaymessage (fd, "msg_table[251]");
return -1;
}
storage_guild_storageopen (sd);
}
else
{
- clif_displaymessage (fd, msg_table[252]);
+ clif_displaymessage (fd, "msg_table[252]");
return -1;
}
@@ -1908,7 +1812,7 @@ int atcommand_option (const int fd, struct map_session_data *sd,
clif_changeoption (&sd->bl);
pc_calcstatus (sd, 0);
- clif_displaymessage (fd, msg_table[9]); // Options changed.
+ clif_displaymessage (fd, "Options changed.");
return 0;
}
@@ -1923,12 +1827,12 @@ int atcommand_hide (const int fd, struct map_session_data *sd,
if (sd->status.option & OPTION_HIDE)
{
sd->status.option &= ~OPTION_HIDE;
- clif_displaymessage (fd, msg_table[10]); // Invisible: Off
+ clif_displaymessage (fd, "Invisible: Off."); // Invisible: Off
}
else
{
sd->status.option |= OPTION_HIDE;
- clif_displaymessage (fd, msg_table[11]); // Invisible: On
+ clif_displaymessage (fd, "Invisible: On."); // Invisible: On
}
clif_changeoption (&sd->bl);
@@ -1943,7 +1847,7 @@ int atcommand_die (const int fd, struct map_session_data *sd,
const char *command, const char *message)
{
pc_damage (NULL, sd, sd->status.hp + 1);
- clif_displaymessage (fd, msg_table[13]); // A pity! You've died.
+ clif_displaymessage (fd, "A pity! You've died.");
return 0;
}
@@ -1972,17 +1876,17 @@ int atcommand_kill (const int fd, struct map_session_data *sd,
if (pc_isGM (sd) >= pc_isGM (pl_sd))
{ // you can kill only lower or same level
pc_damage (NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage (fd, msg_table[14]); // Character killed.
+ clif_displaymessage (fd, "Character killed.");
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -2004,7 +1908,7 @@ int atcommand_alive (const int fd, struct map_session_data *sd,
clif_updatestatus (sd, SP_HP);
clif_updatestatus (sd, SP_SP);
clif_resurrection (&sd->bl, 1);
- clif_displaymessage (fd, msg_table[16]); // You've been revived! It's a miracle!
+ clif_displaymessage (fd, "You've been revived! It's a miracle!");
return 0;
}
@@ -2072,13 +1976,13 @@ int atcommand_heal (const int fd, struct map_session_data *sd,
{
pc_heal (sd, hp, sp);
if (hp >= 0 && sp >= 0)
- clif_displaymessage (fd, msg_table[17]); // HP, SP recovered.
+ clif_displaymessage (fd, "HP, SP recovered.");
else
- clif_displaymessage (fd, msg_table[156]); // HP or/and SP modified.
+ clif_displaymessage (fd, "HP or/and SP modified.");
}
else
{
- clif_displaymessage (fd, msg_table[157]); // HP and SP are already with the good value.
+ clif_displaymessage (fd, "HP and SP are already with the good value.");
return -1;
}
@@ -2134,11 +2038,11 @@ int atcommand_item (const int fd, struct map_session_data *sd,
get_count)))
clif_additem ((struct map_session_data *) sd, 0, 0, flag);
}
- clif_displaymessage (fd, msg_table[18]); // Item created.
+ clif_displaymessage (fd, "Item created.");
}
else
{
- clif_displaymessage (fd, msg_table[19]); // Invalid item ID or name.
+ clif_displaymessage (fd, "Invalid item ID or name.");
return -1;
}
@@ -2160,7 +2064,7 @@ int atcommand_itemreset (const int fd, struct map_session_data *sd,
&& sd->status.inventory[i].equip == 0)
pc_delitem (sd, i, sd->status.inventory[i].amount, 0);
}
- clif_displaymessage (fd, msg_table[20]); // All of your items have been removed.
+ clif_displaymessage (fd, "All of your items have been removed.");
return 0;
}
@@ -2197,7 +2101,7 @@ int atcommand_baselevelup (const int fd, struct map_session_data *sd,
{
if (sd->status.base_level == battle_config.maximum_level)
{ // check for max level by Valaris
- clif_displaymessage (fd, msg_table[47]); // Base level can't go any higher.
+ clif_displaymessage (fd, "Base level can't go any higher.");
return -1;
} // End Addition
if (level > battle_config.maximum_level || level > (battle_config.maximum_level - sd->status.base_level)) // fix positiv overflow
@@ -2211,13 +2115,13 @@ int atcommand_baselevelup (const int fd, struct map_session_data *sd,
pc_calcstatus (sd, 0);
pc_heal (sd, sd->status.max_hp, sd->status.max_sp);
clif_misceffect (&sd->bl, 0);
- clif_displaymessage (fd, msg_table[21]); // Base level raised.
+ clif_displaymessage (fd, "Base level raised.");
}
else
{
if (sd->status.base_level == 1)
{
- clif_displaymessage (fd, msg_table[158]); // Base level can't go any lower.
+ clif_displaymessage (fd, "Base level can't go any lower.");
return -1;
}
if (level < -battle_config.maximum_level || level < (1 - sd->status.base_level)) // fix negativ overflow
@@ -2235,7 +2139,7 @@ int atcommand_baselevelup (const int fd, struct map_session_data *sd,
clif_updatestatus (sd, SP_BASELEVEL);
clif_updatestatus (sd, SP_NEXTBASEEXP);
pc_calcstatus (sd, 0);
- clif_displaymessage (fd, msg_table[22]); // Base level lowered.
+ clif_displaymessage (fd, "Base level lowered.");
}
return 0;
@@ -2267,7 +2171,7 @@ int atcommand_joblevelup (const int fd, struct map_session_data *sd,
{
if (sd->status.job_level == up_level)
{
- clif_displaymessage (fd, msg_table[23]); // Job level can't go any higher.
+ clif_displaymessage (fd, "Job level can't go any higher.");
return -1;
}
if (level > up_level || level > (up_level - sd->status.job_level)) // fix positiv overflow
@@ -2279,13 +2183,13 @@ int atcommand_joblevelup (const int fd, struct map_session_data *sd,
clif_updatestatus (sd, SP_SKILLPOINT);
pc_calcstatus (sd, 0);
clif_misceffect (&sd->bl, 1);
- clif_displaymessage (fd, msg_table[24]); // Job level raised.
+ clif_displaymessage (fd, "Job level raised.");
}
else
{
if (sd->status.job_level == 1)
{
- clif_displaymessage (fd, msg_table[159]); // Job level can't go any lower.
+ clif_displaymessage (fd, "Job level can't go any lower.");
return -1;
}
if (level < -up_level || level < (1 - sd->status.job_level)) // fix negativ overflow
@@ -2301,7 +2205,7 @@ int atcommand_joblevelup (const int fd, struct map_session_data *sd,
clif_updatestatus (sd, SP_SKILLPOINT);
} // to add: remove status points from skills
pc_calcstatus (sd, 0);
- clif_displaymessage (fd, msg_table[25]); // Job level lowered.
+ clif_displaymessage (fd, "Job level lowered.");
}
return 0;
@@ -2322,7 +2226,7 @@ int atcommand_help (const int fd, struct map_session_data *sd,
if ((fp = fopen_ (help_txt, "r")) != NULL)
{
- clif_displaymessage (fd, msg_table[26]); // Help commands:
+ clif_displaymessage (fd, "Help commands:");
gm_level = pc_isGM (sd);
while (fgets (buf, sizeof (buf) - 1, fp) != NULL)
{
@@ -2345,7 +2249,7 @@ int atcommand_help (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[27]); // File help.txt not found.
+ clif_displaymessage (fd, "File help.txt not found.");
return -1;
}
@@ -2372,7 +2276,7 @@ int atcommand_gm (const int fd, struct map_session_data *sd,
if (pc_isGM (sd))
{ // a GM can not use this function. only a normal player (become gm is not for gm!)
- clif_displaymessage (fd, msg_table[50]); // You already have some GM powers.
+ clif_displaymessage (fd, "You already have some GM powers.");
return -1;
}
else
@@ -2394,7 +2298,7 @@ int atcommand_pvpoff (const int fd, struct map_session_data *sd,
if (battle_config.pk_mode)
{ //disable command if server is in PK mode [Valaris]
- clif_displaymessage (fd, msg_table[52]); // This option cannot be used in PK Mode.
+ clif_displaymessage (fd, "This option cannot be used in PK Mode.");
return -1;
}
@@ -2419,11 +2323,11 @@ int atcommand_pvpoff (const int fd, struct map_session_data *sd,
}
}
}
- clif_displaymessage (fd, msg_table[31]); // PvP: Off.
+ clif_displaymessage (fd, "PvP: Off.");
}
else
{
- clif_displaymessage (fd, msg_table[160]); // PvP is already Off.
+ clif_displaymessage (fd, "PvP is already Off.");
return -1;
}
@@ -2442,7 +2346,7 @@ int atcommand_pvpon (const int fd, struct map_session_data *sd,
if (battle_config.pk_mode)
{ //disable command if server is in PK mode [Valaris]
- clif_displaymessage (fd, msg_table[52]); // This option cannot be used in PK Mode.
+ clif_displaymessage (fd, "This option cannot be used in PK Mode.");
return -1;
}
@@ -2466,11 +2370,11 @@ int atcommand_pvpon (const int fd, struct map_session_data *sd,
}
}
}
- clif_displaymessage (fd, msg_table[32]); // PvP: On.
+ clif_displaymessage (fd, "PvP: On.");
}
else
{
- clif_displaymessage (fd, msg_table[161]); // PvP is already On.
+ clif_displaymessage (fd, "PvP is already On.");
return -1;
}
@@ -2488,11 +2392,11 @@ int atcommand_gvgoff (const int fd, struct map_session_data *sd,
{
map[sd->bl.m].flag.gvg = 0;
clif_send0199 (sd->bl.m, 0);
- clif_displaymessage (fd, msg_table[33]); // GvG: Off.
+ clif_displaymessage (fd, "GvG: Off.");
}
else
{
- clif_displaymessage (fd, msg_table[162]); // GvG is already Off.
+ clif_displaymessage (fd, "GvG is already Off.");
return -1;
}
@@ -2510,11 +2414,11 @@ int atcommand_gvgon (const int fd, struct map_session_data *sd,
{
map[sd->bl.m].flag.gvg = 1;
clif_send0199 (sd->bl.m, 3);
- clif_displaymessage (fd, msg_table[34]); // GvG: On.
+ clif_displaymessage (fd, "GvG: On.");
}
else
{
- clif_displaymessage (fd, msg_table[163]); // GvG is already On.
+ clif_displaymessage (fd, "GvG is already On.");
return -1;
}
@@ -2554,7 +2458,7 @@ int atcommand_model (const int fd, struct map_session_data *sd,
&& (sd->status.pc_class == 12 || sd->status.pc_class == 17))
{
//服の色未実装職の判定
- clif_displaymessage (fd, msg_table[35]); // You can't use this command with this class.
+ clif_displaymessage (fd, "You can't use this command with this class.");
return -1;
}
else
@@ -2562,12 +2466,12 @@ int atcommand_model (const int fd, struct map_session_data *sd,
pc_changelook (sd, LOOK_HAIR, hair_style);
pc_changelook (sd, LOOK_HAIR_COLOR, hair_color);
pc_changelook (sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage (fd, msg_table[36]); // Appearence changed.
+ clif_displaymessage (fd, "Appearence changed.");
}
}
else
{
- clif_displaymessage (fd, msg_table[37]); // An invalid number was specified.
+ clif_displaymessage (fd, "An invalid number was specified.");
return -1;
}
@@ -2600,18 +2504,18 @@ int atcommand_dye (const int fd, struct map_session_data *sd,
if (cloth_color != 0 && sd->status.sex == 1
&& (sd->status.pc_class == 12 || sd->status.pc_class == 17))
{
- clif_displaymessage (fd, msg_table[35]); // You can't use this command with this class.
+ clif_displaymessage (fd, "You can't use this command with this class.");
return -1;
}
else
{
pc_changelook (sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage (fd, msg_table[36]); // Appearence changed.
+ clif_displaymessage (fd, "Appearence changed.");
}
}
else
{
- clif_displaymessage (fd, msg_table[37]); // An invalid number was specified.
+ clif_displaymessage (fd, "An invalid number was specified.");
return -1;
}
@@ -2655,18 +2559,18 @@ int atcommand_hair_style (const int fd, struct map_session_data *sd,
if (hair_style != 0 && sd->status.sex == 1
&& (sd->status.pc_class == 12 || sd->status.pc_class == 17))
{
- clif_displaymessage (fd, msg_table[35]); // You can't use this command with this class.
+ clif_displaymessage (fd, "You can't use this command with this class.");
return -1;
}
else
{
pc_changelook (sd, LOOK_HAIR, hair_style);
- clif_displaymessage (fd, msg_table[36]); // Appearence changed.
+ clif_displaymessage (fd, "Appearence changed.");
}
}
else
{
- clif_displaymessage (fd, msg_table[37]); // An invalid number was specified.
+ clif_displaymessage (fd, "An invalid number was specified.");
return -1;
}
@@ -2710,18 +2614,18 @@ int atcommand_hair_color (const int fd, struct map_session_data *sd,
if (hair_color != 0 && sd->status.sex == 1
&& (sd->status.pc_class == 12 || sd->status.pc_class == 17))
{
- clif_displaymessage (fd, msg_table[35]); // You can't use this command with this class.
+ clif_displaymessage (fd, "You can't use this command with this class.");
return -1;
}
else
{
pc_changelook (sd, LOOK_HAIR_COLOR, hair_color);
- clif_displaymessage (fd, msg_table[36]); // Appearence changed.
+ clif_displaymessage (fd, "Appearence changed.");
}
}
else
{
- clif_displaymessage (fd, msg_table[37]); // An invalid number was specified.
+ clif_displaymessage (fd, "An invalid number was specified.");
return -1;
}
@@ -2804,8 +2708,8 @@ int atcommand_go (const int fd, struct map_session_data *sd,
if (!message || !*message || sscanf (message, "%99s", map_name) < 1
|| town < -3 || town >= (int) (sizeof (data) / sizeof (data[0])))
{
- clif_displaymessage (fd, msg_table[38]); // Invalid location number or name.
- clif_displaymessage (fd, msg_table[82]); // Please, use one of this number/name:
+ clif_displaymessage (fd, "Invalid location number or name.");
+ clif_displaymessage (fd, "Please, use one of this number/name:");
clif_displaymessage (fd,
"-3=(Memo point 2) 4=Alberta 11=Gon Ryun");
clif_displaymessage (fd,
@@ -2934,17 +2838,17 @@ int atcommand_go (const int fd, struct map_session_data *sd,
sd->status.memo_point[-town - 1].x,
sd->status.memo_point[-town - 1].y, 3) == 0)
{
- clif_displaymessage (fd, msg_table[0]); // Warped.
+ clif_displaymessage (fd, "Warped.");
}
else
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
}
else
{
- sprintf (output, msg_table[164], -town - 1); // Your memo point #%d doesn't exist.
+ sprintf (output, "Your memo point #%d doesn't exist.", -town - 1);
clif_displaymessage (fd, output);
return -1;
}
@@ -2969,17 +2873,17 @@ int atcommand_go (const int fd, struct map_session_data *sd,
if (pc_setpos (sd, data[town].map, data[town].x, data[town].y, 3)
== 0)
{
- clif_displaymessage (fd, msg_table[0]); // Warped.
+ clif_displaymessage (fd, "Warped.");
}
else
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
}
else
{ // if you arrive here, you have an error in town variable when reading of names
- clif_displaymessage (fd, msg_table[38]); // Invalid location number or name.
+ clif_displaymessage (fd, "Invalid location number or name.");
return -1;
}
}
@@ -3009,7 +2913,7 @@ int atcommand_spawn (const int fd, struct map_session_data *sd,
if (!message || !*message
|| sscanf (message, "%99s %d %d %d", monster, &number, &x, &y) < 1)
{
- clif_displaymessage (fd, msg_table[143]); // Give a monster name/id please.
+ clif_displaymessage (fd, "Give a monster name/id please.");
return -1;
}
@@ -3019,13 +2923,13 @@ int atcommand_spawn (const int fd, struct map_session_data *sd,
if (mob_id == 0)
{
- clif_displaymessage (fd, msg_table[40]); // Invalid monster ID or name.
+ clif_displaymessage (fd, "Invalid monster ID or name.");
return -1;
}
if (mob_id == 1288)
{
- clif_displaymessage (fd, msg_table[83]); // Cannot spawn emperium.
+ clif_displaymessage (fd, "Cannot spawn emperium.");
return -1;
}
@@ -3066,15 +2970,15 @@ int atcommand_spawn (const int fd, struct map_session_data *sd,
if (count != 0)
if (number == count)
- clif_displaymessage (fd, msg_table[39]); // All monster summoned!
+ clif_displaymessage (fd, "All monster summoned!");
else
{
- sprintf (output, msg_table[240], count); // %d monster(s) summoned!
+ sprintf (output, "%d monster(s) summoned!", count);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[40]); // Invalid monster ID or name.
+ clif_displaymessage (fd, "Invalid monster ID or name.");
return -1;
}
@@ -3085,6 +2989,7 @@ int atcommand_spawn (const int fd, struct map_session_data *sd,
*
*------------------------------------------
*/
+static
void atcommand_killmonster_sub (const int fd, struct map_session_data *sd,
const char *message, const int drop)
{
@@ -3106,7 +3011,7 @@ void atcommand_killmonster_sub (const int fd, struct map_session_data *sd,
map_foreachinarea (atkillmonster_sub, map_id, 0, 0, map[map_id].xs,
map[map_id].ys, BL_MOB, drop);
- clif_displaymessage (fd, msg_table[165]); // All monsters killed!
+ clif_displaymessage (fd, "All monsters killed!");
return;
}
@@ -3221,9 +3126,9 @@ int atcommand_produce (const int fd, struct map_session_data *sd,
if (battle_config.error_log)
printf ("@produce NOT WEAPON [%d]\n", item_id);
if (item_id != 0 && itemdb_exists (item_id))
- sprintf (output, msg_table[169], item_id, item_data->name); // This item (%d: '%s') is not an equipment.
+ sprintf (output, "This item (%d: '%s') is not an equipment.", item_id, item_data->name);
else
- sprintf (output, "%s", msg_table[170]); // This item is not an equipment.
+ sprintf (output, "%s", "This item is not an equipment.");
clif_displaymessage (fd, output);
return -1;
}
@@ -3235,6 +3140,7 @@ int atcommand_produce (const int fd, struct map_session_data *sd,
* Sub-function to display actual memo points
*------------------------------------------
*/
+static
void atcommand_memo_sub (struct map_session_data *sd)
{
int i;
@@ -3251,7 +3157,7 @@ void atcommand_memo_sub (struct map_session_data *sd)
sd->status.memo_point[i].map, sd->status.memo_point[i].x,
sd->status.memo_point[i].y);
else
- sprintf (output, msg_table[171], i); // %d - void
+ sprintf (output, "%d - void", i);
clif_displaymessage (sd->fd, output);
}
@@ -3285,7 +3191,7 @@ int atcommand_memo (const int fd, struct map_session_data *sd,
}
if (sd->status.memo_point[position].map[0])
{
- sprintf (output, msg_table[172], position, sd->status.memo_point[position].map, sd->status.memo_point[position].x, sd->status.memo_point[position].y); // You replace previous memo position %d - %s (%d,%d).
+ sprintf (output, "You replace previous memo position %d - %s (%d,%d).", position, sd->status.memo_point[position].map, sd->status.memo_point[position].x, sd->status.memo_point[position].y);
clif_displaymessage (fd, output);
}
memcpy (sd->status.memo_point[position].map, map[sd->bl.m].name,
@@ -3294,7 +3200,7 @@ int atcommand_memo (const int fd, struct map_session_data *sd,
sd->status.memo_point[position].y = sd->bl.y;
clif_skill_memo (sd, 0);
if (pc_checkskill (sd, AL_WARP) <= (position + 1))
- clif_displaymessage (fd, msg_table[173]); // Note: you don't have the 'Warp' skill level to use it.
+ clif_displaymessage (fd, "Note: you don't have the 'Warp' skill level to use it.");
atcommand_memo_sub (sd);
}
else
@@ -3385,14 +3291,14 @@ int atcommand_statuspoint (const int fd, struct map_session_data *sd,
{
sd->status.status_point = (short) new_status_point;
clif_updatestatus (sd, SP_STATUSPOINT);
- clif_displaymessage (fd, msg_table[174]); // Number of status points changed!
+ clif_displaymessage (fd, "Number of status points changed!");
}
else
{
if (point < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
@@ -3425,14 +3331,14 @@ int atcommand_skillpoint (const int fd, struct map_session_data *sd,
{
sd->status.skill_point = (short) new_skill_point;
clif_updatestatus (sd, SP_SKILLPOINT);
- clif_displaymessage (fd, msg_table[175]); // Number of skill points changed!
+ clif_displaymessage (fd, "Number of skill points changed!");
}
else
{
if (point < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
@@ -3465,14 +3371,14 @@ int atcommand_zeny (const int fd, struct map_session_data *sd,
{
sd->status.zeny = new_zeny;
clif_updatestatus (sd, SP_ZENY);
- clif_displaymessage (fd, msg_table[176]); // Number of zenys changed!
+ clif_displaymessage (fd, "Number of zenys changed!");
}
else
{
if (zeny < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
@@ -3535,14 +3441,14 @@ int atcommand_param (const int fd, struct map_session_data *sd,
clif_updatestatus (sd, SP_STR + index);
clif_updatestatus (sd, SP_USTR + index);
pc_calcstatus (sd, 0);
- clif_displaymessage (fd, msg_table[42]); // Stat changed.
+ clif_displaymessage (fd, "Stat changed.");
}
else
{
if (value < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
@@ -3589,13 +3495,13 @@ int atcommand_all_stats (const int fd, struct map_session_data *sd,
}
if (count > 0) // if at least 1 stat modified
- clif_displaymessage (fd, msg_table[84]); // All stats changed!
+ clif_displaymessage (fd, "All stats changed!");
else
{
if (value < 0)
- clif_displaymessage (fd, msg_table[177]); // Impossible to decrease a stat.
+ clif_displaymessage (fd, "Impossible to decrease a stat.");
else
- clif_displaymessage (fd, msg_table[178]); // Impossible to increase a stat.
+ clif_displaymessage (fd, "Impossible to increase a stat.");
return -1;
}
@@ -3624,12 +3530,12 @@ int atcommand_guildlevelup (const int fd, struct map_session_data *sd,
if (sd->status.guild_id <= 0
|| (guild_info = guild_search (sd->status.guild_id)) == NULL)
{
- clif_displaymessage (fd, msg_table[43]); // You're not in a guild.
+ clif_displaymessage (fd, "You're not in a guild.");
return -1;
}
if (strcmp (sd->status.name, guild_info->master) != 0)
{
- clif_displaymessage (fd, msg_table[44]); // You're not the master of your guild.
+ clif_displaymessage (fd, "You're not the master of your guild.");
return -1;
}
@@ -3643,11 +3549,11 @@ int atcommand_guildlevelup (const int fd, struct map_session_data *sd,
{
intif_guild_change_basicinfo (guild_info->guild_id, GBI_GUILDLV,
&added_level, 2);
- clif_displaymessage (fd, msg_table[179]); // Guild level changed.
+ clif_displaymessage (fd, "Guild level changed.");
}
else
{
- clif_displaymessage (fd, msg_table[45]); // Guild level change failed.
+ clif_displaymessage (fd, "Guild level change failed.");
return -1;
}
@@ -3694,18 +3600,18 @@ int atcommand_recall (const int fd, struct map_session_data *sd,
return -1;
}
pc_setpos (pl_sd, sd->mapname, sd->bl.x, sd->bl.y, 2);
- sprintf (output, msg_table[46], character); // %s recalled!
+ sprintf (output, "%s recalled!", character);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -3740,11 +3646,11 @@ int atcommand_revive (const int fd, struct map_session_data *sd,
clif_updatestatus (pl_sd, SP_HP);
clif_updatestatus (pl_sd, SP_SP);
clif_resurrection (&pl_sd->bl, 1);
- clif_displaymessage (fd, msg_table[51]); // Character revived.
+ clif_displaymessage (fd, "Character revived.");
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -3814,7 +3720,7 @@ int atcommand_character_stats (const int fd, struct map_session_data *sd,
};
sprintf (job_jobname, "Job - %s %s", job_name (pl_sd->status.pc_class),
"(level %d)");
- sprintf (output, msg_table[53], pl_sd->status.name); // '%s' stats:
+ sprintf (output, "'%s' stats:", pl_sd->status.name);
clif_displaymessage (fd, output);
for (i = 0; output_table[i].format != NULL; i++)
{
@@ -3824,7 +3730,7 @@ int atcommand_character_stats (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -3878,12 +3784,12 @@ int atcommand_character_stats_all (const int fd, struct map_session_data *sd,
}
if (count == 0)
- clif_displaymessage (fd, msg_table[28]); // No player found.
+ clif_displaymessage (fd, "No player found.");
else if (count == 1)
- clif_displaymessage (fd, msg_table[29]); // 1 player found.
+ clif_displaymessage (fd, "1 player found.");
else
{
- sprintf (output, msg_table[30], count); // %d players found.
+ sprintf (output, "%d players found.", count);
clif_displaymessage (fd, output);
}
@@ -3960,17 +3866,17 @@ int atcommand_character_option (const int fd, struct map_session_data *sd,
}
clif_changeoption (&pl_sd->bl);
pc_calcstatus (pl_sd, 0);
- clif_displaymessage (fd, msg_table[58]); // Character's options changed.
+ clif_displaymessage (fd, "Character's options changed.");
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -3998,18 +3904,18 @@ int atcommand_char_change_sex (const int fd, struct map_session_data *sd,
// check player name
if (strlen (character) < 4)
{
- clif_displaymessage (fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ clif_displaymessage (fd, "Sorry, but a player name have at least 4 characters.");
return -1;
}
else if (strlen (character) > 23)
{
- clif_displaymessage (fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ clif_displaymessage (fd, "Sorry, but a player name have 23 characters maximum.");
return -1;
}
else
{
chrif_char_ask_name (sd->status.account_id, character, 5, 0, 0, 0, 0, 0, 0); // type: 5 - changesex
- clif_displaymessage (fd, msg_table[88]); // Character name sends to char-server to ask it.
+ clif_displaymessage (fd, "Character name sends to char-server to ask it.");
}
return 0;
@@ -4037,18 +3943,18 @@ int atcommand_char_block (const int fd, struct map_session_data *sd,
// check player name
if (strlen (character) < 4)
{
- clif_displaymessage (fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ clif_displaymessage (fd, "Sorry, but a player name have at least 4 characters.");
return -1;
}
else if (strlen (character) > 23)
{
- clif_displaymessage (fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ clif_displaymessage (fd, "Sorry, but a player name have 23 characters maximum.");
return -1;
}
else
{
chrif_char_ask_name (sd->status.account_id, character, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
- clif_displaymessage (fd, msg_table[88]); // Character name sends to char-server to ask it.
+ clif_displaymessage (fd, "Character name sends to char-server to ask it.");
}
return 0;
@@ -4143,25 +4049,25 @@ int atcommand_char_ban (const int fd, struct map_session_data *sd,
if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0
&& second == 0)
{
- clif_displaymessage (fd, msg_table[85]); // Invalid time for ban command.
+ clif_displaymessage (fd, "Invalid time for ban command.");
return -1;
}
// check player name
if (strlen (character) < 4)
{
- clif_displaymessage (fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ clif_displaymessage (fd, "Sorry, but a player name have at least 4 characters.");
return -1;
}
else if (strlen (character) > 23)
{
- clif_displaymessage (fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ clif_displaymessage (fd, "Sorry, but a player name have 23 characters maximum.");
return -1;
}
else
{
chrif_char_ask_name (sd->status.account_id, character, 2, year, month, day, hour, minute, second); // type: 2 - ban
- clif_displaymessage (fd, msg_table[88]); // Character name sends to char-server to ask it.
+ clif_displaymessage (fd, "Character name sends to char-server to ask it.");
}
return 0;
@@ -4188,19 +4094,19 @@ int atcommand_char_unblock (const int fd, struct map_session_data *sd,
// check player name
if (strlen (character) < 4)
{
- clif_displaymessage (fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ clif_displaymessage (fd, "Sorry, but a player name have at least 4 characters.");
return -1;
}
else if (strlen (character) > 23)
{
- clif_displaymessage (fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ clif_displaymessage (fd, "Sorry, but a player name have 23 characters maximum.");
return -1;
}
else
{
// send answer to login server via char-server
chrif_char_ask_name (sd->status.account_id, character, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock
- clif_displaymessage (fd, msg_table[88]); // Character name sends to char-server to ask it.
+ clif_displaymessage (fd, "Character name sends to char-server to ask it.");
}
return 0;
@@ -4227,19 +4133,19 @@ int atcommand_char_unban (const int fd, struct map_session_data *sd,
// check player name
if (strlen (character) < 4)
{
- clif_displaymessage (fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ clif_displaymessage (fd, "Sorry, but a player name have at least 4 characters.");
return -1;
}
else if (strlen (character) > 23)
{
- clif_displaymessage (fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ clif_displaymessage (fd, "Sorry, but a player name have 23 characters maximum.");
return -1;
}
else
{
// send answer to login server via char-server
chrif_char_ask_name (sd->status.account_id, character, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban
- clif_displaymessage (fd, msg_table[88]); // Character name sends to char-server to ask it.
+ clif_displaymessage (fd, "Character name sends to char-server to ask it.");
}
return 0;
@@ -4280,7 +4186,7 @@ int atcommand_character_save (const int fd, struct map_session_data *sd,
m = map_mapname2mapid (map_name);
if (m < 0)
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
else
@@ -4293,18 +4199,18 @@ int atcommand_character_save (const int fd, struct map_session_data *sd,
return -1;
}
pc_setsavepoint (pl_sd, map_name, x, y);
- clif_displaymessage (fd, msg_table[57]); // Character's respawn point changed.
+ clif_displaymessage (fd, "Character's respawn point changed.");
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -4331,13 +4237,13 @@ int atcommand_night (const int fd, struct map_session_data *sd,
{
pl_sd->opt2 |= STATE_BLIND;
clif_changeoption (&pl_sd->bl);
- clif_displaymessage (pl_sd->fd, msg_table[59]); // Night has fallen.
+ clif_displaymessage (pl_sd->fd, "Night has fallen.");
}
}
}
else
{
- clif_displaymessage (fd, msg_table[89]); // Sorry, it's already the night. Impossible to execute the command.
+ clif_displaymessage (fd, "Sorry, it's already the night. Impossible to execute the command.");
return -1;
}
@@ -4364,13 +4270,13 @@ int atcommand_day (const int fd, struct map_session_data *sd,
{
pl_sd->opt2 &= ~STATE_BLIND;
clif_changeoption (&pl_sd->bl);
- clif_displaymessage (pl_sd->fd, msg_table[60]); // Day has arrived.
+ clif_displaymessage (pl_sd->fd, "Day has arrived.");
}
}
}
else
{
- clif_displaymessage (fd, msg_table[90]); // Sorry, it's already the day. Impossible to execute the command.
+ clif_displaymessage (fd, "Sorry, it's already the day. Impossible to execute the command.");
return -1;
}
@@ -4394,10 +4300,10 @@ int atcommand_doom (const int fd, struct map_session_data *sd,
&& pc_isGM (sd) >= pc_isGM (pl_sd))
{ // you can doom only lower or same gm level
pc_damage (NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage (pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
+ clif_displaymessage (pl_sd->fd, "The holy messenger has given judgement.");
}
}
- clif_displaymessage (fd, msg_table[62]); // Judgement was made.
+ clif_displaymessage (fd, "Judgement was made.");
return 0;
}
@@ -4419,10 +4325,10 @@ int atcommand_doommap (const int fd, struct map_session_data *sd,
&& pc_isGM (sd) >= pc_isGM (pl_sd))
{ // you can doom only lower or same gm level
pc_damage (NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage (pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
+ clif_displaymessage (pl_sd->fd, "The holy messenger has given judgement.");
}
}
- clif_displaymessage (fd, msg_table[62]); // Judgement was made.
+ clif_displaymessage (fd, "Judgement was made.");
return 0;
}
@@ -4441,7 +4347,7 @@ static void atcommand_raise_sub (struct map_session_data *sd)
clif_updatestatus (sd, SP_HP);
clif_updatestatus (sd, SP_SP);
clif_resurrection (&sd->bl, 1);
- clif_displaymessage (sd->fd, msg_table[63]); // Mercy has been shown.
+ clif_displaymessage (sd->fd, "Mercy has been shown.");
}
}
@@ -4459,7 +4365,7 @@ int atcommand_raise (const int fd, struct map_session_data *sd,
if (session[i])
atcommand_raise_sub ((struct map_session_data *)session[i]->session_data);
}
- clif_displaymessage (fd, msg_table[64]); // Mercy has been granted.
+ clif_displaymessage (fd, "Mercy has been granted.");
return 0;
}
@@ -4480,7 +4386,7 @@ int atcommand_raisemap (const int fd, struct map_session_data *sd,
&& pl_sd->state.auth && sd->bl.m == pl_sd->bl.m)
atcommand_raise_sub (pl_sd);
}
- clif_displaymessage (fd, msg_table[64]); // Mercy has been granted.
+ clif_displaymessage (fd, "Mercy has been granted.");
return 0;
}
@@ -4516,7 +4422,7 @@ int atcommand_character_baselevel (const int fd, struct map_session_data *sd,
{
if (pl_sd->status.base_level == battle_config.maximum_level)
{ // check for max level by Valaris
- clif_displaymessage (fd, msg_table[91]); // Character's base level can't go any higher.
+ clif_displaymessage (fd, "Character's base level can't go any higher.");
return 0;
} // End Addition
if (level > battle_config.maximum_level || level > (battle_config.maximum_level - pl_sd->status.base_level)) // fix positiv overflow
@@ -4533,13 +4439,13 @@ int atcommand_character_baselevel (const int fd, struct map_session_data *sd,
pc_calcstatus (pl_sd, 0);
pc_heal (pl_sd, pl_sd->status.max_hp, pl_sd->status.max_sp);
clif_misceffect (&pl_sd->bl, 0);
- clif_displaymessage (fd, msg_table[65]); // Character's base level raised.
+ clif_displaymessage (fd, "Character's base level raised.");
}
else
{
if (pl_sd->status.base_level == 1)
{
- clif_displaymessage (fd, msg_table[193]); // Character's base level can't go any lower.
+ clif_displaymessage (fd, "Character's base level can't go any lower.");
return -1;
}
if (level < -battle_config.maximum_level || level < (1 - pl_sd->status.base_level)) // fix negativ overflow
@@ -4559,20 +4465,20 @@ int atcommand_character_baselevel (const int fd, struct map_session_data *sd,
clif_updatestatus (pl_sd, SP_NEXTBASEEXP);
clif_updatestatus (pl_sd, SP_BASEEXP);
pc_calcstatus (pl_sd, 0);
- clif_displaymessage (fd, msg_table[66]); // Character's base level lowered.
+ clif_displaymessage (fd, "Character's base level lowered.");
}
// Reset their stat points to prevent extra points from stacking
atcommand_charstreset(fd, sd,"@charstreset", character);
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -4617,7 +4523,7 @@ int atcommand_character_joblevel (const int fd, struct map_session_data *sd,
{
if (pl_sd->status.job_level == max_level)
{
- clif_displaymessage (fd, msg_table[67]); // Character's job level can't go any higher.
+ clif_displaymessage (fd, "Character's job level can't go any higher.");
return -1;
}
if (pl_sd->status.job_level + level > max_level)
@@ -4629,13 +4535,13 @@ int atcommand_character_joblevel (const int fd, struct map_session_data *sd,
clif_updatestatus (pl_sd, SP_SKILLPOINT);
pc_calcstatus (pl_sd, 0);
clif_misceffect (&pl_sd->bl, 1);
- clif_displaymessage (fd, msg_table[68]); // character's job level raised.
+ clif_displaymessage (fd, "character's job level raised.");
}
else
{
if (pl_sd->status.job_level == 1)
{
- clif_displaymessage (fd, msg_table[194]); // Character's job level can't go any lower.
+ clif_displaymessage (fd, "Character's job level can't go any lower.");
return -1;
}
if (pl_sd->status.job_level + level < 1)
@@ -4651,18 +4557,18 @@ int atcommand_character_joblevel (const int fd, struct map_session_data *sd,
clif_updatestatus (pl_sd, SP_SKILLPOINT);
} // to add: remove status points from skills
pc_calcstatus (pl_sd, 0);
- clif_displaymessage (fd, msg_table[69]); // Character's job level lowered.
+ clif_displaymessage (fd, "Character's job level lowered.");
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -4694,13 +4600,13 @@ int atcommand_kick (const int fd, struct map_session_data *sd,
clif_GM_kick (sd, pl_sd, 1);
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -4727,7 +4633,7 @@ int atcommand_kickall (const int fd, struct map_session_data *sd,
}
}
- clif_displaymessage (fd, msg_table[195]); // All players have been kicked!
+ clif_displaymessage (fd, "All players have been kicked!");
return 0;
}
@@ -4742,7 +4648,7 @@ int atcommand_allskills (const int fd, struct map_session_data *sd,
pc_allskillup (sd); // all skills
sd->status.skill_point = 0; // 0 skill points
clif_updatestatus (sd, SP_SKILLPOINT); // update
- clif_displaymessage (fd, msg_table[76]); // You have received all skills.
+ clif_displaymessage (fd, "You have received all skills.");
return 0;
}
@@ -4770,23 +4676,23 @@ int atcommand_questskill (const int fd, struct map_session_data *sd,
if (pc_checkskill (sd, skill_id) == 0)
{
pc_skill (sd, skill_id, 1, 0);
- clif_displaymessage (fd, msg_table[70]); // You have learned the skill.
+ clif_displaymessage (fd, "You have learned the skill.");
}
else
{
- clif_displaymessage (fd, msg_table[196]); // You already have this quest skill.
+ clif_displaymessage (fd, "You already have this quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ clif_displaymessage (fd, "This skill number doesn't exist or isn't a quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[198]); // This skill number doesn't exist.
+ clif_displaymessage (fd, "This skill number doesn't exist.");
return -1;
}
@@ -4824,29 +4730,29 @@ int atcommand_charquestskill (const int fd, struct map_session_data *sd,
if (pc_checkskill (pl_sd, skill_id) == 0)
{
pc_skill (pl_sd, skill_id, 1, 0);
- clif_displaymessage (fd, msg_table[199]); // This player has learned the skill.
+ clif_displaymessage (fd, "This player has learned the skill.");
}
else
{
- clif_displaymessage (fd, msg_table[200]); // This player already has this quest skill.
+ clif_displaymessage (fd, "This player already has this quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ clif_displaymessage (fd, "This skill number doesn't exist or isn't a quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[198]); // This skill number doesn't exist.
+ clif_displaymessage (fd, "This skill number doesn't exist.");
return -1;
}
@@ -4878,23 +4784,23 @@ int atcommand_lostskill (const int fd, struct map_session_data *sd,
sd->status.skill[skill_id].lv = 0;
sd->status.skill[skill_id].flags = 0;
clif_skillinfoblock (sd);
- clif_displaymessage (fd, msg_table[71]); // You have forgotten the skill.
+ clif_displaymessage (fd, "You have forgotten the skill.");
}
else
{
- clif_displaymessage (fd, msg_table[201]); // You don't have this quest skill.
+ clif_displaymessage (fd, "You don't have this quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ clif_displaymessage (fd, "This skill number doesn't exist or isn't a quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[198]); // This skill number doesn't exist.
+ clif_displaymessage (fd, "This skill number doesn't exist.");
return -1;
}
@@ -4934,29 +4840,29 @@ int atcommand_charlostskill (const int fd, struct map_session_data *sd,
pl_sd->status.skill[skill_id].lv = 0;
pl_sd->status.skill[skill_id].flags = 0;
clif_skillinfoblock (pl_sd);
- clif_displaymessage (fd, msg_table[202]); // This player has forgotten the skill.
+ clif_displaymessage (fd, "This player has forgotten the skill.");
}
else
{
- clif_displaymessage (fd, msg_table[203]); // This player doesn't have this quest skill.
+ clif_displaymessage (fd, "This player doesn't have this quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ clif_displaymessage (fd, "This skill number doesn't exist or isn't a quest skill.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[198]); // This skill number doesn't exist.
+ clif_displaymessage (fd, "This skill number doesn't exist.");
return -1;
}
@@ -5022,13 +4928,13 @@ int atcommand_agitstart (const int fd, struct map_session_data *sd,
{
if (agit_flag == 1)
{
- clif_displaymessage (fd, msg_table[73]); // Already it has started siege warfare.
+ clif_displaymessage (fd, "Already it has started siege warfare.");
return -1;
}
agit_flag = 1;
guild_agit_start ();
- clif_displaymessage (fd, msg_table[72]); // Guild siege warfare start!
+ clif_displaymessage (fd, "Guild siege warfare start!");
return 0;
}
@@ -5042,13 +4948,13 @@ int atcommand_agitend (const int fd, struct map_session_data *sd,
{
if (agit_flag == 0)
{
- clif_displaymessage (fd, msg_table[75]); // Siege warfare hasn't started yet.
+ clif_displaymessage (fd, "Siege warfare hasn't started yet.");
return -1;
}
agit_flag = 0;
guild_agit_end ();
- clif_displaymessage (fd, msg_table[74]); // Guild siege warfare end!
+ clif_displaymessage (fd, "Guild siege warfare end!");
return 0;
}
@@ -5101,7 +5007,7 @@ int atcommand_idsearch (const int fd, struct map_session_data *sd,
return -1;
}
- sprintf (output, msg_table[77], item_name); // The reference result of '%s' (name: id):
+ sprintf (output, "The reference result of '%s' (name: id):", item_name);
clif_displaymessage (fd, output);
match = 0;
for (i = 0; i < 20000; i++)
@@ -5110,11 +5016,11 @@ int atcommand_idsearch (const int fd, struct map_session_data *sd,
&& strstr (item->jname, item_name) != NULL)
{
match++;
- sprintf (output, msg_table[78], item->jname, item->nameid); // %s: %d
+ sprintf (output, "%s: %d", item->jname, item->nameid);
clif_displaymessage (fd, output);
}
}
- sprintf (output, msg_table[79], match); // It is %d affair above.
+ sprintf (output, "It is %d affair above.", match);
clif_displaymessage (fd, output);
return 0;
@@ -5146,18 +5052,18 @@ int atcommand_charskreset (const int fd, struct map_session_data *sd,
if (pc_isGM (sd) >= pc_isGM (pl_sd))
{ // you can reset skill points only lower or same gm level
pc_resetskill (pl_sd);
- sprintf (output, msg_table[206], character); // '%s' skill points reseted!
+ sprintf (output, "'%s' skill points reseted!", character);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5190,18 +5096,18 @@ int atcommand_charstreset (const int fd, struct map_session_data *sd,
if (pc_isGM (sd) >= pc_isGM (pl_sd))
{ // you can reset stats points only lower or same gm level
pc_resetstate (pl_sd);
- sprintf (output, msg_table[207], character); // '%s' stats points reseted!
+ sprintf (output, "'%s' stats points reseted!", character);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5237,18 +5143,18 @@ int atcommand_charreset (const int fd, struct map_session_data *sd,
pc_resetskill (pl_sd);
pc_setglobalreg (pl_sd, "MAGIC_FLAGS", 0); // [Fate] Reset magic quest variables
pc_setglobalreg (pl_sd, "MAGIC_EXP", 0); // [Fate] Reset magic experience
- sprintf (output, msg_table[208], character); // '%s' skill and stats points reseted!
+ sprintf (output, "'%s' skill and stats points reseted!", character);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5327,18 +5233,18 @@ int atcommand_char_wipe (const int fd, struct map_session_data *sd,
pc_setglobalreg (pl_sd, "MAGIC_FLAGS", 0); // [Fate] Reset magic quest variables
pc_setglobalreg (pl_sd, "MAGIC_EXP", 0); // [Fate] Reset magic experience
- sprintf (output, "%s: wiped.", character); // '%s' skill and stats points reseted!
+ sprintf (output, "%s: wiped.", character);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5384,7 +5290,7 @@ int atcommand_charmodel (const int fd, struct map_session_data *sd,
pl_sd->status.sex == 1 &&
(pl_sd->status.pc_class == 12 || pl_sd->status.pc_class == 17))
{
- clif_displaymessage (fd, msg_table[35]); // You can't use this command with this class.
+ clif_displaymessage (fd, "You can't use this command with this class.");
return -1;
}
else
@@ -5392,18 +5298,18 @@ int atcommand_charmodel (const int fd, struct map_session_data *sd,
pc_changelook (pl_sd, LOOK_HAIR, hair_style);
pc_changelook (pl_sd, LOOK_HAIR_COLOR, hair_color);
pc_changelook (pl_sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage (fd, msg_table[36]); // Appearence changed.
+ clif_displaymessage (fd, "Appearence changed.");
}
}
else
{
- clif_displaymessage (fd, msg_table[37]); // An invalid number was specified.
+ clif_displaymessage (fd, "An invalid number was specified.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5444,20 +5350,20 @@ int atcommand_charskpoint (const int fd, struct map_session_data *sd,
{
pl_sd->status.skill_point = new_skill_point;
clif_updatestatus (pl_sd, SP_SKILLPOINT);
- clif_displaymessage (fd, msg_table[209]); // Character's number of skill points changed!
+ clif_displaymessage (fd, "Character's number of skill points changed!");
}
else
{
if (point < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5498,20 +5404,20 @@ int atcommand_charstpoint (const int fd, struct map_session_data *sd,
{
pl_sd->status.status_point = new_status_point;
clif_updatestatus (pl_sd, SP_STATUSPOINT);
- clif_displaymessage (fd, msg_table[210]); // Character's number of status points changed!
+ clif_displaymessage (fd, "Character's number of status points changed!");
}
else
{
if (point < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5550,20 +5456,20 @@ int atcommand_charzeny (const int fd, struct map_session_data *sd,
{
pl_sd->status.zeny = new_zeny;
clif_updatestatus (pl_sd, SP_ZENY);
- clif_displaymessage (fd, msg_table[211]); // Character's number of zenys changed!
+ clif_displaymessage (fd, "Character's number of zenys changed!");
}
else
{
if (zeny < 0)
- clif_displaymessage (fd, msg_table[41]); // Impossible to decrease the number/value.
+ clif_displaymessage (fd, "Impossible to decrease the number/value.");
else
- clif_displaymessage (fd, msg_table[149]); // Impossible to increase the number/value.
+ clif_displaymessage (fd, "Impossible to increase the number/value.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -5608,7 +5514,7 @@ int atcommand_recallall (const int fd, struct map_session_data *sd,
}
}
- clif_displaymessage (fd, msg_table[92]); // All characters recalled!
+ clif_displaymessage (fd, "All characters recalled!");
if (count)
{
sprintf (output,
@@ -5670,7 +5576,7 @@ int atcommand_guildrecall (const int fd, struct map_session_data *sd,
pc_setpos (pl_sd, sd->mapname, sd->bl.x, sd->bl.y, 2);
}
}
- sprintf (output, msg_table[93], g->name); // All online characters of the %s guild are near you.
+ sprintf (output, "All online characters of the %s guild are near you.", g->name);
clif_displaymessage (fd, output);
if (count)
{
@@ -5682,7 +5588,7 @@ int atcommand_guildrecall (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[94]); // Incorrect name/ID, or no one from the guild is online.
+ clif_displaymessage (fd, "Incorrect name/ID, or no one from the guild is online.");
return -1;
}
@@ -5739,7 +5645,7 @@ int atcommand_partyrecall (const int fd, struct map_session_data *sd,
pc_setpos (pl_sd, sd->mapname, sd->bl.x, sd->bl.y, 2);
}
}
- sprintf (output, msg_table[95], p->name); // All online characters of the %s party are near you.
+ sprintf (output, "All online characters of the %s party are near you.", p->name);
clif_displaymessage (fd, output);
if (count)
{
@@ -5751,7 +5657,7 @@ int atcommand_partyrecall (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[96]); // Incorrect name or ID, or no one from the party is online.
+ clif_displaymessage (fd, "Incorrect name or ID, or no one from the party is online.");
return -1;
}
@@ -5766,7 +5672,7 @@ int atcommand_reloaditemdb (const int fd, struct map_session_data *sd,
const char *command, const char *message)
{
itemdb_reload ();
- clif_displaymessage (fd, msg_table[97]); // Item database reloaded.
+ clif_displaymessage (fd, "Item database reloaded.");
return 0;
}
@@ -5779,7 +5685,7 @@ int atcommand_reloadmobdb (const int fd, struct map_session_data *sd,
const char *command, const char *message)
{
mob_reload ();
- clif_displaymessage (fd, msg_table[98]); // Monster database reloaded.
+ clif_displaymessage (fd, "Monster database reloaded.");
return 0;
}
@@ -5792,7 +5698,7 @@ int atcommand_reloadskilldb (const int fd, struct map_session_data *sd,
const char *command, const char *message)
{
skill_reload ();
- clif_displaymessage (fd, msg_table[99]); // Skill database reloaded.
+ clif_displaymessage (fd, "Skill database reloaded.");
return 0;
}
@@ -5809,7 +5715,7 @@ int atcommand_reloadscript (const int fd, struct map_session_data *sd,
npc_event_do_oninit ();
- clif_displaymessage (fd, msg_table[100]); // Scripts reloaded.
+ clif_displaymessage (fd, "Scripts reloaded.");
return 0;
}
@@ -5824,7 +5730,7 @@ int atcommand_reloadgmdb ( // by [Yor]
{
chrif_reloadGMdb ();
- clif_displaymessage (fd, msg_table[101]); // Login-server asked to reload GM accounts and their level.
+ clif_displaymessage (fd, "Login-server asked to reload GM accounts and their level.");
return 0;
}
@@ -5868,7 +5774,7 @@ int atcommand_mapinfo (const int fd, struct map_session_data *sd,
if ((m_id = map_mapname2mapid (map_name)) < 0)
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
@@ -6033,7 +5939,7 @@ int atcommand_mount_peco (const int fd, struct map_session_data *sd,
{
if (sd->disguise > 0)
{ // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
- clif_displaymessage (fd, msg_table[212]); // Cannot mount a Peco while in disguise.
+ clif_displaymessage (fd, "Cannot mount a Peco while in disguise.");
return -1;
}
@@ -6051,11 +5957,11 @@ int atcommand_mount_peco (const int fd, struct map_session_data *sd,
else if (sd->status.pc_class == 4015)
sd->status.pc_class = sd->view_class = 4022;
pc_setoption (sd, sd->status.option | 0x0020);
- clif_displaymessage (fd, msg_table[102]); // Mounted Peco.
+ clif_displaymessage (fd, "Mounted Peco.");
}
else
{
- clif_displaymessage (fd, msg_table[213]); // You can not mount a peco with your job.
+ clif_displaymessage (fd, "You can not mount a peco with your job.");
return -1;
}
}
@@ -6070,7 +5976,7 @@ int atcommand_mount_peco (const int fd, struct map_session_data *sd,
else if (sd->status.pc_class == 4022)
sd->status.pc_class = sd->view_class = 4015;
pc_setoption (sd, sd->status.option & ~0x0020);
- clif_displaymessage (fd, msg_table[214]); // Unmounted Peco.
+ clif_displaymessage (fd, "Unmounted Peco.");
}
return 0;
@@ -6099,7 +6005,7 @@ int atcommand_char_mount_peco (const int fd, struct map_session_data *sd,
{
if (pl_sd->disguise > 0)
{ // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
- clif_displaymessage (fd, msg_table[215]); // This player cannot mount a Peco while in disguise.
+ clif_displaymessage (fd, "This player cannot mount a Peco while in disguise.");
return -1;
}
@@ -6117,11 +6023,11 @@ int atcommand_char_mount_peco (const int fd, struct map_session_data *sd,
else if (pl_sd->status.pc_class == 4015)
pl_sd->status.pc_class = pl_sd->view_class = 4022;
pc_setoption (pl_sd, pl_sd->status.option | 0x0020);
- clif_displaymessage (fd, msg_table[216]); // Now, this player mounts a peco.
+ clif_displaymessage (fd, "Now, this player mounts a peco.");
}
else
{
- clif_displaymessage (fd, msg_table[217]); // This player can not mount a peco with his/her job.
+ clif_displaymessage (fd, "This player can not mount a peco with his/her job.");
return -1;
}
}
@@ -6136,12 +6042,12 @@ int atcommand_char_mount_peco (const int fd, struct map_session_data *sd,
else if (pl_sd->status.pc_class == 4022)
pl_sd->status.pc_class = pl_sd->view_class = 4015;
pc_setoption (pl_sd, pl_sd->status.option & ~0x0020);
- clif_displaymessage (fd, msg_table[218]); // Now, this player has not more peco.
+ clif_displaymessage (fd, "Now, this player has not more peco.");
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -6175,19 +6081,19 @@ int atcommand_guildspy (const int fd, struct map_session_data *sd,
if (sd->guildspy == g->guild_id)
{
sd->guildspy = 0;
- sprintf (output, msg_table[103], g->name); // No longer spying on the %s guild.
+ sprintf (output, "No longer spying on the %s guild.", g->name);
clif_displaymessage (fd, output);
}
else
{
sd->guildspy = g->guild_id;
- sprintf (output, msg_table[104], g->name); // Spying on the %s guild.
+ sprintf (output, "Spying on the %s guild.", g->name);
clif_displaymessage (fd, output);
}
}
else
{
- clif_displaymessage (fd, msg_table[94]); // Incorrect name/ID, or no one from the guild is online.
+ clif_displaymessage (fd, "Incorrect name/ID, or no one from the guild is online.");
return -1;
}
@@ -6221,19 +6127,19 @@ int atcommand_partyspy (const int fd, struct map_session_data *sd,
if (sd->partyspy == p->party_id)
{
sd->partyspy = 0;
- sprintf (output, msg_table[105], p->name); // No longer spying on the %s party.
+ sprintf (output, "No longer spying on the %s party.", p->name);
clif_displaymessage (fd, output);
}
else
{
sd->partyspy = p->party_id;
- sprintf (output, msg_table[106], p->name); // Spying on the %s party.
+ sprintf (output, "Spying on the %s party.", p->name);
clif_displaymessage (fd, output);
}
}
else
{
- clif_displaymessage (fd, msg_table[96]); // Incorrect name or ID, or no one from the party is online.
+ clif_displaymessage (fd, "Incorrect name or ID, or no one from the party is online.");
return -1;
}
@@ -6261,11 +6167,11 @@ int atcommand_enablenpc (const int fd, struct map_session_data *sd,
if (npc_name2id (NPCname) != NULL)
{
npc_enable (NPCname, 1);
- clif_displaymessage (fd, msg_table[110]); // Npc Enabled.
+ clif_displaymessage (fd, "Npc Enabled.");
}
else
{
- clif_displaymessage (fd, msg_table[111]); // This NPC doesn't exist.
+ clif_displaymessage (fd, "This NPC doesn't exist.");
return -1;
}
@@ -6293,11 +6199,11 @@ int atcommand_disablenpc (const int fd, struct map_session_data *sd,
if (npc_name2id (NPCname) != NULL)
{
npc_enable (NPCname, 0);
- clif_displaymessage (fd, msg_table[112]); // Npc Disabled.
+ clif_displaymessage (fd, "Npc Disabled.");
}
else
{
- clif_displaymessage (fd, msg_table[111]); // This NPC doesn't exist.
+ clif_displaymessage (fd, "This NPC doesn't exist.");
return -1;
}
@@ -6308,7 +6214,8 @@ int atcommand_disablenpc (const int fd, struct map_session_data *sd,
* time in txt for time command (by [Yor])
*------------------------------------------
*/
-char *txt_time (unsigned int duration)
+static
+const char *txt_time (unsigned int duration)
{
int days, hours, minutes, seconds;
char temp[256];
@@ -6328,21 +6235,21 @@ char *txt_time (unsigned int duration)
seconds = duration - (60 * minutes);
if (days < 2)
- sprintf (temp, msg_table[219], days); // %d day
+ sprintf (temp, "%d day", days);
else
- sprintf (temp, msg_table[220], days); // %d days
+ sprintf (temp, "%d days", days);
if (hours < 2)
- sprintf (temp1, msg_table[221], temp, hours); // %s %d hour
+ sprintf (temp1, "%s %d hour", temp, hours);
else
- sprintf (temp1, msg_table[222], temp, hours); // %s %d hours
+ sprintf (temp1, "%s %d hours", temp, hours);
if (minutes < 2)
- sprintf (temp, msg_table[223], temp1, minutes); // %s %d minute
+ sprintf (temp, "%s %d minute", temp1, minutes);
else
- sprintf (temp, msg_table[224], temp1, minutes); // %s %d minutes
+ sprintf (temp, "%s %d minutes", temp1, minutes);
if (seconds < 2)
- sprintf (temp1, msg_table[225], temp, seconds); // %s and %d second
+ sprintf (temp1, "%s and %d second", temp, seconds);
else
- sprintf (temp1, msg_table[226], temp, seconds); // %s and %d seconds
+ sprintf (temp1, "%s and %d seconds", temp, seconds);
return temp1;
}
@@ -6366,64 +6273,64 @@ int atcommand_servertime (const int fd, struct map_session_data *sd,
time (&time_server); // get time in seconds since 1/1/1970
datetime = gmtime (&time_server); // convert seconds in structure
// like sprintf, but only for date/time (Sunday, November 02 2003 15:12:52)
- strftime (temp, sizeof (temp) - 1, msg_table[230], datetime); // Server time (normal time): %A, %B %d %Y %X.
+ strftime (temp, sizeof (temp) - 1, "Server time (normal time): %A, %B %d %Y %X.", datetime);
clif_displaymessage (fd, temp);
if (battle_config.night_duration == 0 && battle_config.day_duration == 0)
{
if (night_flag == 0)
- clif_displaymessage (fd, msg_table[231]); // Game time: The game is in permanent daylight.
+ clif_displaymessage (fd, "Game time: The game is in permanent daylight.");
else
- clif_displaymessage (fd, msg_table[232]); // Game time: The game is in permanent night.
+ clif_displaymessage (fd, "Game time: The game is in permanent night.");
}
else if (battle_config.night_duration == 0)
if (night_flag == 1)
{ // we start with night
timer_data = get_timer (day_timer_tid);
- sprintf (temp, msg_table[233], txt_time ((timer_data->tick - gettick ()) / 1000)); // Game time: The game is actualy in night for %s.
+ sprintf (temp, "Game time: The game is actualy in night for %s.", txt_time ((timer_data->tick - gettick ()) / 1000));
clif_displaymessage (fd, temp);
- clif_displaymessage (fd, msg_table[234]); // Game time: After, the game will be in permanent daylight.
+ clif_displaymessage (fd, "Game time: After, the game will be in permanent daylight.");
}
else
- clif_displaymessage (fd, msg_table[231]); // Game time: The game is in permanent daylight.
+ clif_displaymessage (fd, "Game time: The game is in permanent daylight.");
else if (battle_config.day_duration == 0)
if (night_flag == 0)
{ // we start with day
timer_data = get_timer (night_timer_tid);
- sprintf (temp, msg_table[235], txt_time ((timer_data->tick - gettick ()) / 1000)); // Game time: The game is actualy in daylight for %s.
+ sprintf (temp, "Game time: The game is actualy in daylight for %s.", txt_time ((timer_data->tick - gettick ()) / 1000));
clif_displaymessage (fd, temp);
- clif_displaymessage (fd, msg_table[236]); // Game time: After, the game will be in permanent night.
+ clif_displaymessage (fd, "Game time: After, the game will be in permanent night.");
}
else
- clif_displaymessage (fd, msg_table[232]); // Game time: The game is in permanent night.
+ clif_displaymessage (fd, "Game time: The game is in permanent night.");
else
{
if (night_flag == 0)
{
timer_data = get_timer (night_timer_tid);
timer_data2 = get_timer (day_timer_tid);
- sprintf (temp, msg_table[235], txt_time ((timer_data->tick - gettick ()) / 1000)); // Game time: The game is actualy in daylight for %s.
+ sprintf (temp, "Game time: The game is actualy in daylight for %s.", txt_time ((timer_data->tick - gettick ()) / 1000));
clif_displaymessage (fd, temp);
if (timer_data->tick > timer_data2->tick)
- sprintf (temp, msg_table[237], txt_time ((timer_data->interval - abs (timer_data->tick - timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
+ sprintf (temp, "Game time: After, the game will be in night for %s.", txt_time ((timer_data->interval - abs (timer_data->tick - timer_data2->tick)) / 1000));
else
- sprintf (temp, msg_table[237], txt_time (abs (timer_data->tick - timer_data2->tick) / 1000)); // Game time: After, the game will be in night for %s.
+ sprintf (temp, "Game time: After, the game will be in night for %s.", txt_time (abs (timer_data->tick - timer_data2->tick) / 1000));
clif_displaymessage (fd, temp);
- sprintf (temp, msg_table[238], txt_time (timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
+ sprintf (temp, "Game time: A day cycle has a normal duration of %s.", txt_time (timer_data->interval / 1000));
clif_displaymessage (fd, temp);
}
else
{
timer_data = get_timer (day_timer_tid);
timer_data2 = get_timer (night_timer_tid);
- sprintf (temp, msg_table[233], txt_time ((timer_data->tick - gettick ()) / 1000)); // Game time: The game is actualy in night for %s.
+ sprintf (temp, "Game time: The game is actualy in night for %s.", txt_time ((timer_data->tick - gettick ()) / 1000));
clif_displaymessage (fd, temp);
if (timer_data->tick > timer_data2->tick)
- sprintf (temp, msg_table[239], txt_time ((timer_data->interval - abs (timer_data->tick - timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
+ sprintf (temp, "Game time: After, the game will be in daylight for %s.", txt_time ((timer_data->interval - abs (timer_data->tick - timer_data2->tick)) / 1000));
else
- sprintf (temp, msg_table[239], txt_time (abs (timer_data->tick - timer_data2->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
+ sprintf (temp, "Game time: After, the game will be in daylight for %s.", txt_time (abs (timer_data->tick - timer_data2->tick) / 1000));
clif_displaymessage (fd, temp);
- sprintf (temp, msg_table[238], txt_time (timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
+ sprintf (temp, "Game time: A day cycle has a normal duration of %s.", txt_time (timer_data->interval / 1000));
clif_displaymessage (fd, temp);
}
}
@@ -6482,35 +6389,35 @@ int atcommand_chardelitem (const int fd, struct map_session_data *sd,
count++;
item_position = pc_search_inventory (pl_sd, item_id); // for next loop
}
- sprintf (output, msg_table[113], count); // %d item(s) removed by a GM.
+ sprintf (output, "%d item(s) removed by a GM.", count);
clif_displaymessage (pl_sd->fd, output);
if (number == count)
- sprintf (output, msg_table[114], count); // %d item(s) removed from the player.
+ sprintf (output, "%d item(s) removed from the player.", count);
else
- sprintf (output, msg_table[115], count, count, number); // %d item(s) removed. Player had only %d on %d items.
+ sprintf (output, "%d item(s) removed. Player had only %d on %d items.", count, count, number);
clif_displaymessage (fd, output);
}
else
{
- clif_displaymessage (fd, msg_table[116]); // Character does not have the item.
+ clif_displaymessage (fd, "Character does not have the item.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[19]); // Invalid item ID or name.
+ clif_displaymessage (fd, "Invalid item ID or name.");
return -1;
}
@@ -6556,24 +6463,24 @@ int atcommand_jail (const int fd, struct map_session_data *sd,
if (pc_setpos (pl_sd, "sec_pri.gat", x, y, 3) == 0)
{
pc_setsavepoint (pl_sd, "sec_pri.gat", x, y); // Save Char Respawn Point in the jail room [Lupus]
- clif_displaymessage (pl_sd->fd, msg_table[117]); // GM has send you in jails.
- clif_displaymessage (fd, msg_table[118]); // Player warped in jails.
+ clif_displaymessage (pl_sd->fd, "GM has send you in jails.");
+ clif_displaymessage (fd, "Player warped in jails.");
}
else
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -6606,30 +6513,30 @@ int atcommand_unjail (const int fd, struct map_session_data *sd,
{ // you can jail only lower or same GM
if (pl_sd->bl.m != map_mapname2mapid ("sec_pri.gat"))
{
- clif_displaymessage (fd, msg_table[119]); // This player is not in jails.
+ clif_displaymessage (fd, "This player is not in jails.");
return -1;
}
else if (pc_setpos (pl_sd, "prontera.gat", 156, 191, 3) == 0)
{
pc_setsavepoint (pl_sd, "prontera.gat", 156, 191); // Save char respawn point in Prontera
- clif_displaymessage (pl_sd->fd, msg_table[120]); // GM has discharge you.
- clif_displaymessage (fd, msg_table[121]); // Player warped to Prontera.
+ clif_displaymessage (pl_sd->fd, "GM has discharge you.");
+ clif_displaymessage (fd, "Player warped to Prontera.");
}
else
{
- clif_displaymessage (fd, msg_table[1]); // Map not found.
+ clif_displaymessage (fd, "Map not found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -6662,17 +6569,17 @@ int atcommand_disguise (const int fd, struct map_session_data *sd,
{ // monsters
if (pc_isriding (sd))
{ // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
- clif_displaymessage (fd, msg_table[227]); // Cannot wear disguise while riding a Peco.
+ clif_displaymessage (fd, "Cannot wear disguise while riding a Peco.");
return -1;
}
sd->disguiseflag = 1; // set to override items with disguise script [Valaris]
sd->disguise = mob_id;
pc_setpos (sd, sd->mapname, sd->bl.x, sd->bl.y, 3);
- clif_displaymessage (fd, msg_table[122]); // Disguise applied.
+ clif_displaymessage (fd, "Disguise applied.");
}
else
{
- clif_displaymessage (fd, msg_table[123]); // Monster/NPC name/id hasn't been found.
+ clif_displaymessage (fd, "Monster/NPC name/id hasn't been found.");
return -1;
}
@@ -6691,11 +6598,11 @@ int atcommand_undisguise (const int fd, struct map_session_data *sd,
clif_clearchar (&sd->bl, 9);
sd->disguise = 0;
pc_setpos (sd, sd->mapname, sd->bl.x, sd->bl.y, 3);
- clif_displaymessage (fd, msg_table[124]); // Undisguise applied.
+ clif_displaymessage (fd, "Undisguise applied.");
}
else
{
- clif_displaymessage (fd, msg_table[125]); // You're not disguised.
+ clif_displaymessage (fd, "You're not disguised.");
return -1;
}
@@ -6771,17 +6678,17 @@ int atcommand_ignorelist (const int fd, struct map_session_data *sd,
if (sd->ignoreAll == 0)
if (count == 0)
- clif_displaymessage (fd, msg_table[126]); // You accept any wisp (no wisper is refused).
+ clif_displaymessage (fd, "You accept any wisp (no wisper is refused).");
else
{
- sprintf (output, msg_table[127], count); // You accept any wisp, except thoses from %d player(s):
+ sprintf (output, "You accept any wisp, except thoses from %d player(s):", count);
clif_displaymessage (fd, output);
}
else if (count == 0)
- clif_displaymessage (fd, msg_table[128]); // You refuse all wisps (no specifical wisper is refused).
+ clif_displaymessage (fd, "You refuse all wisps (no specifical wisper is refused).");
else
{
- sprintf (output, msg_table[129], count); // You refuse all wisps, AND refuse wisps from %d player(s):
+ sprintf (output, "You refuse all wisps, AND refuse wisps from %d player(s):", count);
clif_displaymessage (fd, output);
}
@@ -6829,22 +6736,22 @@ int atcommand_charignorelist (const int fd, struct map_session_data *sd,
if (pl_sd->ignoreAll == 0)
if (count == 0)
{
- sprintf (output, msg_table[130], pl_sd->status.name); // '%s' accept any wisp (no wisper is refused).
+ sprintf (output, "'%s' accept any wisp (no wisper is refused).", pl_sd->status.name);
clif_displaymessage (fd, output);
}
else
{
- sprintf (output, msg_table[131], pl_sd->status.name, count); // '%s' accept any wisp, except thoses from %d player(s):
+ sprintf (output, "'%s' accept any wisp, except thoses from %d player(s):", pl_sd->status.name, count);
clif_displaymessage (fd, output);
}
else if (count == 0)
{
- sprintf (output, msg_table[132], pl_sd->status.name); // '%s' refuse all wisps (no specifical wisper is refused).
+ sprintf (output, "'%s' refuse all wisps (no specifical wisper is refused).", pl_sd->status.name);
clif_displaymessage (fd, output);
}
else
{
- sprintf (output, msg_table[133], pl_sd->status.name, count); // '%s' refuse all wisps, AND refuse wisps from %d player(s):
+ sprintf (output, "'%s' refuse all wisps, AND refuse wisps from %d player(s):", pl_sd->status.name, count);
clif_displaymessage (fd, output);
}
@@ -6859,7 +6766,7 @@ int atcommand_charignorelist (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -6893,17 +6800,17 @@ int atcommand_inall (const int fd, struct map_session_data *sd,
{ // you can change wisp option only to lower or same level
if (pl_sd->ignoreAll == 0)
{
- sprintf (output, msg_table[134], pl_sd->status.name); // '%s' already accepts all wispers.
+ sprintf (output, "'%s' already accepts all wispers.", pl_sd->status.name);
clif_displaymessage (fd, output);
return -1;
}
else
{
pl_sd->ignoreAll = 0;
- sprintf (output, msg_table[135], pl_sd->status.name); // '%s' now accepts all wispers.
+ sprintf (output, "'%s' now accepts all wispers.", pl_sd->status.name);
clif_displaymessage (fd, output);
// message to player
- clif_displaymessage (pl_sd->fd, msg_table[136]); // A GM has authorised all wispers for you.
+ clif_displaymessage (pl_sd->fd, "A GM has authorised all wispers for you.");
WFIFOW (pl_sd->fd, 0) = 0x0d2; // R 00d2 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
WFIFOB (pl_sd->fd, 2) = 1;
WFIFOB (pl_sd->fd, 3) = 0; // success
@@ -6912,13 +6819,13 @@ int atcommand_inall (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -6952,17 +6859,17 @@ int atcommand_exall (const int fd, struct map_session_data *sd,
{ // you can change wisp option only to lower or same level
if (pl_sd->ignoreAll == 1)
{
- sprintf (output, msg_table[137], pl_sd->status.name); // '%s' already blocks all wispers.
+ sprintf (output, "'%s' already blocks all wispers.", pl_sd->status.name);
clif_displaymessage (fd, output);
return -1;
}
else
{
pl_sd->ignoreAll = 1;
- sprintf (output, msg_table[138], pl_sd->status.name); // '%s' blocks now all wispers.
+ sprintf (output, "'%s' blocks now all wispers.", pl_sd->status.name);
clif_displaymessage (fd, output);
// message to player
- clif_displaymessage (pl_sd->fd, msg_table[139]); // A GM has blocked all wispers for you.
+ clif_displaymessage (pl_sd->fd, "A GM has blocked all wispers for you.");
WFIFOW (pl_sd->fd, 0) = 0x0d2; // R 00d2 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
WFIFOB (pl_sd->fd, 2) = 0;
WFIFOB (pl_sd->fd, 3) = 0; // success
@@ -6971,13 +6878,13 @@ int atcommand_exall (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -7021,30 +6928,30 @@ int atcommand_chardisguise (const int fd, struct map_session_data *sd,
{ // monsters
if (pc_isriding (pl_sd))
{ // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
- clif_displaymessage (fd, msg_table[228]); // Character cannot wear disguise while riding a Peco.
+ clif_displaymessage (fd, "Character cannot wear disguise while riding a Peco.");
return -1;
}
pl_sd->disguiseflag = 1; // set to override items with disguise script [Valaris]
pl_sd->disguise = mob_id;
pc_setpos (pl_sd, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y,
3);
- clif_displaymessage (fd, msg_table[140]); // Character's disguise applied.
+ clif_displaymessage (fd, "Character's disguise applied.");
}
else
{
- clif_displaymessage (fd, msg_table[123]); // Monster/NPC name/id hasn't been found.
+ clif_displaymessage (fd, "Monster/NPC name/id hasn't been found.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -7080,23 +6987,23 @@ int atcommand_charundisguise (const int fd, struct map_session_data *sd,
pl_sd->disguise = 0;
pc_setpos (pl_sd, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y,
3);
- clif_displaymessage (fd, msg_table[141]); // Character's undisguise applied.
+ clif_displaymessage (fd, "Character's undisguise applied.");
}
else
{
- clif_displaymessage (fd, msg_table[142]); // Character is not disguised.
+ clif_displaymessage (fd, "Character is not disguised.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -7126,28 +7033,28 @@ int atcommand_email (const int fd, struct map_session_data *sd,
if (e_mail_check (actual_email) == 0)
{
- clif_displaymessage (fd, msg_table[144]); // Invalid actual email. If you have default e-mail, give a@a.com.
+ clif_displaymessage (fd, "Invalid actual email. If you have default e-mail, type a@a.com."); // Invalid actual email. If you have default e-mail, give a@a.com.
return -1;
}
else if (e_mail_check (new_email) == 0)
{
- clif_displaymessage (fd, msg_table[145]); // Invalid new email. Please enter a real e-mail.
+ clif_displaymessage (fd, "Invalid new email. Please enter a real e-mail.");
return -1;
}
else if (strcasecmp (new_email, "a@a.com") == 0)
{
- clif_displaymessage (fd, msg_table[146]); // New email must be a real e-mail.
+ clif_displaymessage (fd, "New email must be a real e-mail.");
return -1;
}
else if (strcasecmp (actual_email, new_email) == 0)
{
- clif_displaymessage (fd, msg_table[147]); // New email must be different of the actual e-mail.
+ clif_displaymessage (fd, "New email must be different of the actual e-mail.");
return -1;
}
else
{
chrif_changeemail (sd->status.account_id, actual_email, new_email);
- clif_displaymessage (fd, msg_table[148]); // Information sended to login-server via char-server.
+ clif_displaymessage (fd, "Information sended to login-server via char-server.");
}
return 0;
@@ -7172,7 +7079,7 @@ int atcommand_effect (const int fd, struct map_session_data *sd,
if (flag <= 0)
{
clif_specialeffect (&sd->bl, type, flag);
- clif_displaymessage (fd, msg_table[229]); // Your effect has changed.
+ clif_displaymessage (fd, "Your Effect Has Changed."); // Your effect has changed.
}
else
{
@@ -7182,7 +7089,7 @@ int atcommand_effect (const int fd, struct map_session_data *sd,
&& pl_sd->state.auth)
{
clif_specialeffect (&pl_sd->bl, type, flag);
- clif_displaymessage (pl_sd->fd, msg_table[229]); // Your effect has changed.
+ clif_displaymessage (pl_sd->fd, "Your Effect Has Changed."); // Your effect has changed.
}
}
}
@@ -7329,13 +7236,13 @@ atcommand_character_item_list (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -7455,13 +7362,13 @@ atcommand_character_storage_list (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -7570,13 +7477,13 @@ atcommand_character_cart_list (const int fd, struct map_session_data *sd,
}
else
{
- clif_displaymessage (fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage (fd, "Your GM level don't authorise you to do this action on this player.");
return -1;
}
}
else
{
- clif_displaymessage (fd, msg_table[3]); // Character not found.
+ clif_displaymessage (fd, "Character not found.");
return -1;
}
@@ -7595,9 +7502,9 @@ atcommand_killer (const int fd, struct map_session_data *sd,
sd->special_state.killer = !sd->special_state.killer;
if (sd->special_state.killer)
- clif_displaymessage (fd, msg_table[241]);
+ clif_displaymessage (fd, "You be a killa...");
else
- clif_displaymessage (fd, msg_table[242]);
+ clif_displaymessage (fd, "You gonna be own3d...");
return 0;
}
@@ -7614,9 +7521,9 @@ atcommand_killable (const int fd, struct map_session_data *sd,
sd->special_state.killable = !sd->special_state.killable;
if (sd->special_state.killable)
- clif_displaymessage (fd, msg_table[242]);
+ clif_displaymessage (fd, "You gonna be own3d...");
else
- clif_displaymessage (fd, msg_table[241]);
+ clif_displaymessage (fd, "You be a killa...");
return 0;
}
@@ -7658,7 +7565,7 @@ atcommand_skillon (const int fd, struct map_session_data *sd,
const char *command, const char *message)
{
map[sd->bl.m].flag.noskill = 0;
- clif_displaymessage (fd, msg_table[244]);
+ clif_displaymessage (fd, "Map skills are on.");
return 0;
}
@@ -7672,7 +7579,7 @@ atcommand_skilloff (const int fd, struct map_session_data *sd,
const char *command, const char *message)
{
map[sd->bl.m].flag.noskill = 1;
- clif_displaymessage (fd, msg_table[243]);
+ clif_displaymessage (fd, "Map skills are off.");
return 0;
}
@@ -7802,7 +7709,7 @@ atcommand_chareffect (const int fd, struct map_session_data *sd,
return -1;
clif_specialeffect (&pl_sd->bl, type, 0);
- clif_displaymessage (fd, msg_table[229]); // Your effect has changed.
+ clif_displaymessage (fd, "Your Effect Has Changed."); // Your effect has changed.
return 0;
}
@@ -8282,7 +8189,7 @@ int atcommand_unmute (const int fd, struct map_session_data *sd,
static int magic_base = TMW_MAGIC;
#define magic_skills_nr 6
-static char *magic_skill_names[magic_skills_nr] =
+static const char *magic_skill_names[magic_skills_nr] =
{ "magic", "life", "war", "transmute", "nature", "astral" };
int
@@ -8426,6 +8333,7 @@ atcommand_visible (const int fd, struct map_session_data *sd,
return 0;
}
+static
int atcommand_jump_iterate (const int fd, struct map_session_data *sd,
const char *command, const char *message,
struct map_session_data *(*get_start) (void),
@@ -8468,7 +8376,7 @@ int atcommand_jump_iterate (const int fd, struct map_session_data *sd,
return -1;
}
pc_setpos (sd, map[pl_sd->bl.m].name, pl_sd->bl.x, pl_sd->bl.y, 3);
- sprintf (output, msg_table[4], pl_sd->status.name); // Jump to %s
+ sprintf (output, "Jump to %s", pl_sd->status.name);
clif_displaymessage (fd, output);
sd->followtarget = pl_sd->bl.id;
@@ -8546,7 +8454,7 @@ int atcommand_skillpool_info (const int fd, struct map_session_data *sd,
for (i = 0; i < skill_pool_skills_size; ++i)
{
- char *name = skill_name (skill_pool_skills[i]);
+ const char *name = skill_name (skill_pool_skills[i]);
int lvl = pl_sd->status.skill[skill_pool_skills[i]].lv;
if (lvl)
@@ -8719,10 +8627,10 @@ int atcommand_doomspot(const int fd, struct map_session_data *sd,
&& pc_isGM (sd) >= pc_isGM (pl_sd))
{ // you can doom only lower or same gm level
pc_damage (NULL, pl_sd, pl_sd->status.hp + 1);
- clif_displaymessage (pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
+ clif_displaymessage (pl_sd->fd, "The holy messenger has given judgement.");
}
}
- clif_displaymessage (fd, msg_table[62]); // Judgement was made.
+ clif_displaymessage (fd, "Judgement was made.");
return 0;
}