diff options
-rw-r--r-- | db/re/item_db.conf | 3 | ||||
-rw-r--r-- | npc/functions/resetstatus.txt | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index ce03d4e38..fdf026076 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -2653,7 +2653,8 @@ item_db: ( Weight: 700 Refine: false Script: <" - resetstatus; + callfunc("StatusResetReinvest", false); + //resetstatus; dispbottom l("Your status points were reset."); "> }, diff --git a/npc/functions/resetstatus.txt b/npc/functions/resetstatus.txt index 71f724170..eb5d0cfc5 100644 --- a/npc/functions/resetstatus.txt +++ b/npc/functions/resetstatus.txt @@ -6,10 +6,16 @@ // Status Reset NPC utils // Reset status and return permanent bonuses -// StatusResetReinvest( - ) +// StatusResetReinvest( {script=True} ) function script StatusResetReinvest { // Compulsory check - inventoryplace NPCEyes, 6; + if (getarg(0, true)) { + inventoryplace NPCEyes, 6; + } else if (!checkweight2(NPCEyes, 6)) { + getitembound StatusResetPotion, 1, 4; + dispbottom l("You cannot carry the fruits."); + end; // Die + } // Permanent boosts were now lost, return the fruits if (STATUSUP_STR) { |