Specifically (right now) I would like to create a script that will detect if I have the "doom" status, and if so, to use a Holy Water in an attempt to dispel it. If the attempt fails, I would like it to repeat.
I understand that the actual command is simple enough to employ:
Code
function undoom() local player = windower.ffxi.get_player() if S(player.buffs):contains(15) then send_command('@input /item "Holy Water" <me>') end end
I am unsure of when exactly I should be calling it, though. (Note that "15" is "Doom" in \Windower\res\buffs.lua .)
I have been looking at the Events page for an answer, so that I could call it like so:
Code
windower.register_event('EVENT', undoom)
1) Am I going about this the right way?
2) What EVENT should I be using if I want it to be continously checking? I can't just do it on the status change, since Holy Water doesn't have a 100% chance of working, and if it doesn't work the first time, then it won't check again, right?
Sorry for the newb question. I've been searching and can't quite find what I'm looking for.
P.S., if anyone has links to resources and tutorials that I might find useful, I'd highly appreciate it.