Anyone know of a script which automatically checks if I have spirit guard (1712) and martial prowess (1705) already cast on character and if not - check inventory and if I have the right item (small statue/moonstone cube) - activate them to refresh the spells ?

I tried writing something but it's not very intellegent and repeatedly looks for moontstone cubes (even though I dont have any).

if (!Spell[1712].active?) and dothis "take my small statue", /You remove a small statue from in your/
pause_script 'go2'
pause_script 'bigshot'
fput "rub my statue"
fput "stow my statue"
unpause_script 'go2'
unpause_script 'bigshot'
end


if (!Spell[1705].active?) and dothis "take my moonstone cube", /moonstone cube/
pause_script 'go2'
pause_script 'bigshot'
fput "rub my cube"
fput "stow my cube"
unpause_script 'go2'
unpause_script 'bigshot'
end

I really just want to tag on 1705/1712 onto bigshot