Disclaimer: been looking for PSL header info, but cant find it. Of course, this is nowhere near ready. My problem is three fold.
1)
Despite numerous configurations, have to keep the health bar in original place, or script breaks. Tried offset sub and generator (now commented out), tried hard coding the cont pos + location, and tried fixed location (cheat method).
2)
Archcure will not target pet. But will target toon if ID is reset, OR if you changed to Event Macro 23.
3) Most beguiling. This script was (almost) working last night. Only thing left was arch cure, then continue.
NOW, it continually loops at my distance check of greater than 10 from the pet, even though finddist is 1. I have messed around with copies, and cant get it back to working order.
Have run this through scriptuo, corrected all but one problem. Line 116 is nested without return. Don't rightly understand that fully.
The script is meant to evaluate pet condition, and cast / use aids depending on distance (for now, user configs coming once operational) and condition (hurt, poison, mortal). I have set several conditions meant to focus on playability and survivability of the player. Most scripts wont allow you to peace or provo while they are active. I plan to enable all skills through journal scan once I get it casting correctly.
Still working on mana conservation, fast cast timing and checking for skill use (got those lined up though, thanks to snippets section).
Have an on-the fly menu set-up planned out, thanks to TM's menu post. Still trying to figure out how he got his tool gump health percent to work so well (want to add that in as well).
I have been putting a lot of time into this, and a lot of research. Any help to get me unstuck would be greatly appreciated. Almost ready to pull my hair out. Gotta grow some first though

. Thank you for the help and ideas so far! This is gonna be a fun project, once I actually know what I am doing.
script pulled from attachment. Two major bugs fixed.