Okay, I made SOME progress.
set %SavePetPixX ( %PetbarX + 86 )
set %SavePetPixY ( %PetbarY + 43 )
savepix %SavePetPixX %SavePetPixY 1
display #pixcol
halt
This, inside the script, will return a number. That number changes when pet is healthy or poisoned.
Buuuuttt, if I understand this correctly, it only works if THAT pixel changes. So, if the pet's health is past that point, the number won't change to the saved poisoned value.
Problem is constant adjustment of pixel count. It seems the number changes as the health bar goes from right to left. I KNOW that comparing to 100 different points is NOT the best way to do this.
Any suggestions? I am very far out of my league, but trying.