Autoheal Pet

eppy

Grandmaster
if not findalias 'pet'
promptalias 'pet'
endif
if not inrange 'pet' 1
headmsg 'Get closer.'
unsetalias 'pet'
stop
endif
if diffhits 'pet' <= 0
headmsg 'Pet full health.'
unsetalias 'pet'
stop
endif
if @findtype 0xe21
@useobject 'found'
else
headmsg 'out of bandages'
stop
endif
clearjournal
waitfortarget 1000
target! 'pet'
if injournal 'not damaged' 'system'
headmsg 'not hurt'
unsetalias 'pet'
stop
endif
clearjournal
while not @injournal 'you finish applying' 'system'
//headmsg 'pausing'
pause 50
endwhile
replay
 

Young Star

Grandmaster
Thanks for this. I am finally getting back to grinding taming and high enough for mobs that I need to use another pet to kill off the tames and work vet as well.

Couple questions. Why do you unset alias for each step where you don't actually heal? Won't that cause you to prompt which pet you are vetting each time you end up too far away or if it isn't damaged when you hit the hotkey?

Also isn't the lines for "diff hits <=0" and "in journal 'not damaged'" serving the same purpose?
 

eppy

Grandmaster
I like to unset alias so i can just step away and change pet. I had one that automatically swapped but sometimes I dont care if one gets hurt more.

Yes they serve the same purpose. Only one really needs to be there.
 

eppy

Grandmaster
if not findalias 'pet1' or not inrange 'pet1' 20
headmsg 'Select first pet'
promptalias 'pet1'
endif
if not findalias 'pet2' or not inrange 'pet2' 20
headmsg 'Select second pet'
promptalias 'pet2'
endif
if not findalias 'bandages' and findtype 0xe21
headmsg 'found bandages'
@setalias 'bandages' 'found'
endif
if not findalias 'bandages'
headmsg 'Select bandages'
promptalias 'bandages'
endif
//Heal the lowest HP pet
if diffhits 'pet1' > diffhits 'pet2'
@setalias 'healpet' 'pet1'
else
@setalias 'healpet' 'pet2'
endif
if not inrange 'pet1' 1
setalias 'healpet' 'pet2'
endif
if not inrange 'pet2' 1
setalias 'healpet' 'pet1'
endif
if not inrange 'healpet' 1
headmsg 'Get closer.'
stop
endif
if diffhits 'healpet' <= 0
headmsg 'Pet full health.'
stop
endif
if @findobject 'bandages'
@useobject 'found'
endif
clearjournal
waitfortarget 1000
target! 'healpet'
if injournal 'not damaged' 'system'
stop
endif
while not @injournal 'you finish applying' 'system'
pause 50
endwhile
 

MZ3K

Grandmaster
if not findalias 'pet1' or not inrange 'pet1' 20
headmsg 'Select first pet'
promptalias 'pet1'
endif
if not findalias 'pet2' or not inrange 'pet2' 20
headmsg 'Select second pet'
promptalias 'pet2'
endif
if not findalias 'bandages' and findtype 0xe21
headmsg 'found bandages'
@setalias 'bandages' 'found'
endif
if not findalias 'bandages'
headmsg 'Select bandages'
promptalias 'bandages'
endif
//Heal the lowest HP pet
if diffhits 'pet1' > diffhits 'pet2'
@setalias 'healpet' 'pet1'
else
@setalias 'healpet' 'pet2'
endif
if not inrange 'pet1' 1
setalias 'healpet' 'pet2'
endif
if not inrange 'pet2' 1
setalias 'healpet' 'pet1'
endif
if not inrange 'healpet' 1
headmsg 'Get closer.'
stop
endif
if diffhits 'healpet' <= 0
headmsg 'Pet full health.'
stop
endif
if @findobject 'bandages'
@useobject 'found'
endif
clearjournal
waitfortarget 1000
target! 'healpet'
if injournal 'not damaged' 'system'
stop
endif
while not @injournal 'you finish applying' 'system'
pause 50
endwhile


I tried for hours to modify this to handle three pets, but it didn't like the changes I made. How do I change it to handle three pets?
 
Top