diff options
Diffstat (limited to 'npc/items/require_stat.txt')
-rw-r--r-- | npc/items/require_stat.txt | 16 |
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; } |