summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-29 19:46:54 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-29 19:46:54 -0300
commitda1a1038d8ad71358042d7d9311486d0c75bfc64 (patch)
tree1efa5c3817b1e08b5486dd33af3018ad39fe82e2
parent9402f60bd66dc24b406906d97e4164da33a0c78d (diff)
downloadserverdata-da1a1038d8ad71358042d7d9311486d0c75bfc64.tar.gz
serverdata-da1a1038d8ad71358042d7d9311486d0c75bfc64.tar.bz2
serverdata-da1a1038d8ad71358042d7d9311486d0c75bfc64.tar.xz
serverdata-da1a1038d8ad71358042d7d9311486d0c75bfc64.zip
Status Reset Potion - return fruits
-rw-r--r--db/re/item_db.conf3
-rw-r--r--npc/functions/resetstatus.txt10
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) {