diff options
-rw-r--r-- | conf/msg_athena.conf | 2 | ||||
-rw-r--r-- | src/map/atcommand.c | 19 |
2 files changed, 17 insertions, 4 deletions
diff --git a/conf/msg_athena.conf b/conf/msg_athena.conf index c54441063..b740a2f37 100644 --- a/conf/msg_athena.conf +++ b/conf/msg_athena.conf @@ -427,6 +427,8 @@ 504: Used %d kafra points and %d cash points. %d kafra and %d cash points remaining. 505: Gained %d cash points. Total %d points. 506: Gained %d kafra points. Total %d points. +410: Removed %d cash points. Total %d points. +411: Removed %d kafra points. Total %d points. // Trade Spoof Messages 507: This player has been banned for %d minute(s). diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e0fb1c309..9290f844a 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8158,6 +8158,7 @@ ACMD_FUNC(reject) *-----------------------------------*/ ACMD_FUNC(cash) { + char output[128]; int value; nullpo_retr(-1, sd); @@ -8168,17 +8169,27 @@ ACMD_FUNC(cash) if( !strcmpi(command+1,"cash") ) { - if( value > 0 ) + if( value > 0 ) { pc_getcash(sd, value, 0); - else + sprintf(output, msg_txt(505), value, sd->cashPoints); + clif_disp_onlyself(sd, output, strlen(output)); + } else { pc_paycash(sd, -value, 0); + sprintf(output, msg_txt(410), value, sd->cashPoints); + clif_disp_onlyself(sd, output, strlen(output)); + } } else { // @points - if( value > 0 ) + if( value > 0 ) { pc_getcash(sd, 0, value); - else + sprintf(output, msg_txt(506), value, sd->kafraPoints); + clif_disp_onlyself(sd, output, strlen(output)); + } else { pc_paycash(sd, -value, -value); + sprintf(output, msg_txt(411), -value, sd->kafraPoints); + clif_disp_onlyself(sd, output, strlen(output)); + } } return 0; |