From 3d25518cf10f72d280ed9c6bf79956919a484d02 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 2 Jun 2020 20:13:08 -0300 Subject: Prevent a few false-positives on status reset --- npc/functions/resetstatus.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'npc/functions/resetstatus.txt') diff --git a/npc/functions/resetstatus.txt b/npc/functions/resetstatus.txt index eb5d0cfc5..fca8a43a8 100644 --- a/npc/functions/resetstatus.txt +++ b/npc/functions/resetstatus.txt @@ -47,7 +47,7 @@ function script StatusResetReinvest { } // Return wasSP on success, 0 on failure -// ConfirmReset( {price} ) +// ConfirmReset( {price, town=True} ) function script ConfirmStatusReset { if (BaseLevel >= 15) .@plush_count=(1000-BaseLevel*10+(BaseLevel*18)); @@ -59,7 +59,10 @@ function script ConfirmStatusReset { if (getarg(0,-1) >= 0) .@plush_count=getarg(0,-1); - .@plush_count=POL_AdjustPrice(.@plush_count); + if (getarg(1, true)) + .@plush_count=POL_AdjustPrice(.@plush_count); + else + .@plush_count=.@plush_count; mesc l("WARNING: Permanent boosts will return to their fruit form."), 1; @@ -95,7 +98,10 @@ function script ConfirmStatusReset { l("It seems that you have no status points to reset!"), l("Come back when you will really need me."); } else { - POL_PlayerMoney(.@plush_count); + if (getarg(1, true)) + POL_PlayerMoney(.@plush_count); + else + Zeny-=.@plush_count; speech S_LAST_NEXT, l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), l("Spend it wisely this time."), -- cgit v1.2.3-60-g2f50