summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-12 12:09:56 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-12 12:09:56 -0300
commit4985bd71604b542c588905d5d1a7f34cfa711434 (patch)
tree5fdebde01dab9f83278cb8de8ea0f781c099c7a2 /npc/items
parent28a184d83efd03733f048a2b09b987cc086ae57f (diff)
downloadserverdata-4985bd71604b542c588905d5d1a7f34cfa711434.tar.gz
serverdata-4985bd71604b542c588905d5d1a7f34cfa711434.tar.bz2
serverdata-4985bd71604b542c588905d5d1a7f34cfa711434.tar.xz
serverdata-4985bd71604b542c588905d5d1a7f34cfa711434.zip
Fix required stat
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;
}