summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
Diffstat (limited to 'npc/items')
-rw-r--r--npc/items/require_stat.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/npc/items/require_stat.txt b/npc/items/require_stat.txt
index cd274b62..7ff2b101 100644
--- a/npc/items/require_stat.txt
+++ b/npc/items/require_stat.txt
@@ -1,13 +1,13 @@
-
+// Unequip if stat not enough
+// callfunc "RequireStat", bDex, 80, EQI_HAND_R;
function script RequireStat {
- @bStatVal = @bStat;
+ .@stat = getarg(0);
+ .@min = getarg(1);
+ .@me = getarg(2);
+ .@val = readparam(.@stat);
// If the requirement isn't met, we set an unequip trigger.
// The item is now removed.
- if (@bStat < @minbStatVal)
- goto L_Unequip;
- return;
-
-L_Unequip:
- callfunc "UnequipLater";
+ if (.@val < .@min)
+ unequip(.@me);
return;
}