|
@@ -131,7 +131,6 @@ ACMD_FUNC(charreset);
|
|
|
ACMD_FUNC(charstpoint);
|
|
|
ACMD_FUNC(charmodel);
|
|
|
ACMD_FUNC(charskpoint);
|
|
|
-ACMD_FUNC(charzeny);
|
|
|
ACMD_FUNC(agitstart);
|
|
|
ACMD_FUNC(agitend);
|
|
|
ACMD_FUNC(reloaditemdb);
|
|
@@ -379,7 +378,6 @@ static AtCommandInfo atcommand_info[] = {
|
|
|
{ AtCommand_CharModel, "@charmodel", 50, atcommand_charmodel },
|
|
|
{ AtCommand_CharSKPoint, "@charskpoint", 60, atcommand_charskpoint },
|
|
|
{ AtCommand_CharSTPoint, "@charstpoint", 60, atcommand_charstpoint },
|
|
|
- { AtCommand_CharZeny, "@charzeny", 60, atcommand_charzeny },
|
|
|
{ AtCommand_MapInfo, "@mapinfo", 99, atcommand_mapinfo },
|
|
|
{ AtCommand_Dye, "@dye", 40, atcommand_dye }, // by fritz
|
|
|
{ AtCommand_Dye, "@ccolor", 40, atcommand_dye }, // by fritz
|
|
@@ -5390,51 +5388,6 @@ int atcommand_charstpoint(
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-/*==========================================
|
|
|
- * Character Zeny Point (Rewritten by [Yor])
|
|
|
- *------------------------------------------
|
|
|
- */
|
|
|
-int atcommand_charzeny(
|
|
|
- const int fd, struct map_session_data* sd,
|
|
|
- const char* command, const char* message)
|
|
|
-{
|
|
|
- struct map_session_data *pl_sd;
|
|
|
- char character[100];
|
|
|
- int zeny = 0, new_zeny;
|
|
|
- nullpo_retr(-1, sd);
|
|
|
-
|
|
|
- memset(character, '\0', sizeof(character));
|
|
|
-
|
|
|
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &zeny, character) < 2 || zeny == 0) {
|
|
|
- clif_displaymessage(fd, "Please, enter a number and a player name (usage: @charzeny <zeny> <name>).");
|
|
|
- return -1;
|
|
|
- }
|
|
|
-
|
|
|
- if ((pl_sd = map_nick2sd(character)) != NULL) {
|
|
|
- new_zeny = pl_sd->status.zeny + zeny;
|
|
|
- if (zeny > 0 && (zeny > MAX_ZENY || new_zeny > MAX_ZENY)) // fix positiv overflow
|
|
|
- new_zeny = MAX_ZENY;
|
|
|
- else if (zeny < 0 && (zeny < -MAX_ZENY || new_zeny < 0)) // fix negativ overflow
|
|
|
- new_zeny = 0;
|
|
|
- if (new_zeny != pl_sd->status.zeny) {
|
|
|
- pl_sd->status.zeny = new_zeny;
|
|
|
- clif_updatestatus(pl_sd, SP_ZENY);
|
|
|
- clif_displaymessage(fd, msg_table[211]); // Character's number of zenys changed!
|
|
|
- } else {
|
|
|
- if (zeny < 0)
|
|
|
- clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
|
|
|
- else
|
|
|
- clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
|
|
|
- return -1;
|
|
|
- }
|
|
|
- } else {
|
|
|
- clif_displaymessage(fd, msg_table[3]); // Character not found.
|
|
|
- return -1;
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
/*==========================================
|
|
|
* Recall All Characters Online To Your Location
|
|
|
*------------------------------------------
|