SphereCommunity

Full Version: Need Help With Simple RESTEST To Require Str Lvl To Equip Item
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys it seems this sound be fairly easy but having problems with this script. I am just trying to make a test for 150 STR for a character to be able to equip an item. If they don't have 150 STR I want the item to go in the pack and for them to receive the sys message they aren't strong enough to equip. These are all the methods I've tried so far with no luck..

ONTRIGGER=EQUIP
IF <SRC.STR> == 150
EQUIP
SRC.SYSMESSAGE You Feel Magic In The Item
ELSE
BOUNCE
SRC.SYSMESSAGE You Are Not Strong Enough To Use This!
-------------------------------------------------------------------------------------------------
ONTRIGGER=EQUIP
IF <SRC.STR> == 150
SRC.SYSMESSAGE You Feel Magic In The Item
ELSE
BOUNCE
SRC.SYSMESSAGE You Are Not Strong Enough To Use This!
-------------------------------------------------------------------------------------------------
ONTRIGGER=EQUIP
if (<src.str> >= <150>)
SRC.SYSMESSAGE You Feel Magic In The Item!
else
SRC.BOUNCE
SRC.SYSMESSAGE You Are Not Strong Enough To Use This!

//Haven't be able to get any working, it keeps letting me equip the item with less than 150 STR.. Any help would be much appreciated!!!
This should work

ON=@EQUIPTEST // or ON=@EQUIP
IF <SRC.STR> > 149
EQUIP
SRC.SYSMESSAGE You Feel Magic In The Item
ELSE
BOUNCE
SRC.SYSMESSAGE You Are Not Strong Enough To Use This!
ENDIF
Code:
ONTRIGGER=EQUIP
IF (<SRC.STR> < 150)
   SRC.SYSMESSAGE You are not strong enough to use this!
   RETURN 1
ELSE
   SRC.SYSMESSAGE You feel magic in the item
ENDIF
Thanks Mulambo this last method worked!
Reference URL's