summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/resetstatus.txt10
1 files changed, 8 insertions, 2 deletions
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) {