Inspired by this thread recently I attempted to write a script to list all trusts a character had. However res.spells:type('Trust') is always 0.
Listing total spells and total white magic works fine (listing 514 and 143 respectively as of 15-Nov-2015).
Any ideas?
res = require('resources') windower.add_to_chat(24, "+----------------------------------------+") windower.add_to_chat(24, " Simple Trust Spell Checklist by Zubis ") windower.add_to_chat(24, "+----------------------------------------+") total_spells = res.spells total_whitemagic = res.spells:type('WhiteMagic') total_trust = res.spells:type('Trust') windower.add_to_chat(24, 'Total Spells: ' .. #total_spells) windower.add_to_chat(24, 'Total White Magic: ' .. #total_whitemagic) windower.add_to_chat(55, 'Total Trust: ' .. #total_trust)