diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-06-02 20:13:08 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-06-02 20:14:07 -0300 |
commit | 3d25518cf10f72d280ed9c6bf79956919a484d02 (patch) | |
tree | 220df6e8dd719871edc2e206eaee0ce42892ac0a | |
parent | fe5196d6dc36e71c548cff0928b7fae335625d52 (diff) | |
download | serverdata-3d25518cf10f72d280ed9c6bf79956919a484d02.tar.gz serverdata-3d25518cf10f72d280ed9c6bf79956919a484d02.tar.bz2 serverdata-3d25518cf10f72d280ed9c6bf79956919a484d02.tar.xz serverdata-3d25518cf10f72d280ed9c6bf79956919a484d02.zip |
Prevent a few false-positives on status reset
-rw-r--r-- | npc/001-11/Soren.txt | 2 | ||||
-rw-r--r-- | npc/005-6/zitoni.txt | 4 | ||||
-rw-r--r-- | npc/functions/resetstatus.txt | 12 |
3 files changed, 12 insertions, 6 deletions
diff --git a/npc/001-11/Soren.txt b/npc/001-11/Soren.txt index c4f393131..c840d92c5 100644 --- a/npc/001-11/Soren.txt +++ b/npc/001-11/Soren.txt @@ -48,7 +48,7 @@ L_Purpose: mes ""; switch (@menu) { case 2: - ConfirmStatusReset(1); + ConfirmStatusReset(1, false); break; case 3: goto L_Swap; diff --git a/npc/005-6/zitoni.txt b/npc/005-6/zitoni.txt index 35b51f225..9d232f3d7 100644 --- a/npc/005-6/zitoni.txt +++ b/npc/005-6/zitoni.txt @@ -85,9 +85,9 @@ L_ResetStats: L_ConfirmReset: if (BaseLevel <= 10) - ConfirmStatusReset(0); + ConfirmStatusReset(0, false); else - ConfirmStatusReset(); + ConfirmStatusReset(-1, false); goto L_Quit; L_OtherPotion: 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."), |