Checking If An Item Is Equipable
echoo
Member Posts: 43
I'm making a tag based scripting widget that checks if an item is equipable (and meets level requirements in a scripted item level restriction system). In this case, the widget only works when clicking on items in a player inventory.
My script checks for base item types that are able to be equipped by the player. The problem is that it always returns as FALSE—no matter which inventory item the widget is used on (equipable or not).
The check relies on a big GetBaseItemType conditional that apparently isn't working.
The script that's not working correctly (script name - j_ilrchecker): https://pastebin.com/igfhRXUP
An include used for the above script (name - j_inc_itemlvl): https://pastebin.com/x1gMLKFz
Widget item tag name: "j_ilrchecker" with Cast Spell: Unique Power (Unlimited Uses/Day)
Any help will be appreciated, especially alternate ways to check if an item can be equipped in an inventory slot.
Thanks
My script checks for base item types that are able to be equipped by the player. The problem is that it always returns as FALSE—no matter which inventory item the widget is used on (equipable or not).
The check relies on a big GetBaseItemType conditional that apparently isn't working.
The script that's not working correctly (script name - j_ilrchecker): https://pastebin.com/igfhRXUP
An include used for the above script (name - j_inc_itemlvl): https://pastebin.com/x1gMLKFz
Widget item tag name: "j_ilrchecker" with Cast Spell: Unique Power (Unlimited Uses/Day)
Any help will be appreciated, especially alternate ways to check if an item can be equipped in an inventory slot.
Thanks
0
Comments
That part will never work!
Should be something like
or at least
I however would probably write something like:
I tried your Get2DAString method. It would have been easier, but it returned TRUE for all items, not just equippable ones (in my initial test).
Thanks again!
It's some nwscript sorcery. Nice work!