This script takes advantage of the masteries for gaining skill in taming.
It checks some basic setup requirements. If it all passes, then it will prompt you to target a pet and it proceeds.
Active meditation, and calculates your LMC at the start (if you need to swap out your suit properties, then restart the script), to keep track of how much mana you require when casting.
Seems to be pretty resilient, since I was able to click on various gumps without it breaking (changing current focus). I also noticed that when disconnected - I reconnected with the script running and it picked up where it left off. The one item is, it needs the status (for mana calculation) when you login again to work smoothly.
It expects you to be on the animal taming mastery (it will not switch mastery for you), and to have appropriate skills. It will verify your skill cap and skill lock status and give appropriate dialogue to match.
I ran this with a variety of meditation, focus, suit configurations and then partied up with my 4x legendary bard to run the peace mastery that boosts party members' regens. Performed well, so I thought I would share it.