Greetings all,
Some priests in my guild know that I'm handy with scripting, but I've never actually coded any addons from scratch, so what they're requesting of me is quite the chore. I've got some pseudocode drawn up, and I'll be the 1st to admit that it's ugly, nasty, terrible, has gaping holes in the logic, and is pretty much just bad....however....if any of you wouldn't mind taking a look at it, and posting any relevant feedback, I'd love to hear it. Hopefully you can read my half-pseudo, half-lua mess:
http://wow.pastebin.com/654829
The jist of it is, "Automagically finds a PI target, i.e. either a warlock or mage, with mana > x, in-range, in-raid or in-party, and able to cast (not seduced, etc). Has a favorites list and a skip list."
EDIT: the favorite & skip lists (tables) are going to be saved in saved vars, sorry if that's not evident in the pseudocode.