So I'm trying to make a pet healing macro.
uses bandage on target, then uses touch of life on target.
not sure how to calculate the wait time in between banding and touch of life.
wanting it to pull both of the heals off one after another with a single macro press.
does bandage time on pets depend on dex?
and how do i calculate wait time with faster casting and fcr? or do i even need to?
help with pet healing macro
- nocturne7saint
- Elder Scribe
- Posts: 180
- Joined: Thu May 30, 2019 9:32 pm
help with pet healing macro
blackstone from the ILV guild
Re: help with pet healing macro
Not sure what the formula is. I typically just bandage once manually, then count in my head, then use that as the delay.
What Assist program are you using? I do something like this for UOSteam. I only run one pet usually so if you have more this would need a lot of work.
I don't usually run always-on scripts, so this needs to be pressed once for each action. It'll find the nearest friend, then purge poison if they're poisoned, else bandage them if they're in range (1 tile), else cast touch of life on them.
What Assist program are you using? I do something like this for UOSteam. I only run one pet usually so if you have more this would need a lot of work.
I don't usually run always-on scripts, so this needs to be pressed once for each action. It'll find the nearest friend, then purge poison if they're poisoned, else bandage them if they're in range (1 tile), else cast touch of life on them.
Code: Select all
@getfriend 'friend' 'nearest'
if poisoned 'friend'
msg '[cs purge'
waitfortarget 2000
target! 'friend'
endif
if @inrange 'friend' 1
usetype 0xe21 'any' 'backpack' 1
waitfortarget 1500
target! 'friend'
else
msg "[cs touchoflife"
waitfortarget 3000
target! 'friend'
endif
Re: help with pet healing macro
Generally in programming there are more than one means to an end.
You could
* Calculate FC - This you'll need to lookup or understand from server code (RunUO, probably)
* Calculate bandage/dex time - This should be common and some scripts have a breakdown of this (DEX a-b takes X milliseconds, DEX b-c take Y ms)
* Grep journal for bandage messages
* Use a reasonable delay (simplest and most error prone)
* Find an existing pet healing script (there are numerous ones lying around) and adapt it to your flavor (i.e. use touch of life instead of greater heal)
Note that depending on the approach, you may have to compensate for latency/lag spikes as well as bake in 'waits' for when you are hiding or have a in the middle of targeting.
It very much depends on what you focus on (healing vs DPS) and how much you're willing to invest into the script.
P.S - this answer might not be exactly what you wanted but the 'right' solution will vary depending on your exact needs
V
You could
* Calculate FC - This you'll need to lookup or understand from server code (RunUO, probably)
* Calculate bandage/dex time - This should be common and some scripts have a breakdown of this (DEX a-b takes X milliseconds, DEX b-c take Y ms)
* Grep journal for bandage messages
* Use a reasonable delay (simplest and most error prone)
* Find an existing pet healing script (there are numerous ones lying around) and adapt it to your flavor (i.e. use touch of life instead of greater heal)
Note that depending on the approach, you may have to compensate for latency/lag spikes as well as bake in 'waits' for when you are hiding or have a in the middle of targeting.
It very much depends on what you focus on (healing vs DPS) and how much you're willing to invest into the script.
P.S - this answer might not be exactly what you wanted but the 'right' solution will vary depending on your exact needs
V
- nocturne7saint
- Elder Scribe
- Posts: 180
- Joined: Thu May 30, 2019 9:32 pm
Re: help with pet healing macro
i run 5 imp dogs, what would i need to do to tailor it to that many?Eremite wrote: ↑Sun Apr 23, 2023 7:48 amNot sure what the formula is. I typically just bandage once manually, then count in my head, then use that as the delay.
What Assist program are you using? I do something like this for UOSteam. I only run one pet usually so if you have more this would need a lot of work.
I don't usually run always-on scripts, so this needs to be pressed once for each action. It'll find the nearest friend, then purge poison if they're poisoned, else bandage them if they're in range (1 tile), else cast touch of life on them.
Code: Select all
@getfriend 'friend' 'nearest' if poisoned 'friend' msg '[cs purge' waitfortarget 2000 target! 'friend' endif if @inrange 'friend' 1 usetype 0xe21 'any' 'backpack' 1 waitfortarget 1500 target! 'friend' else msg "[cs touchoflife" waitfortarget 3000 target! 'friend' endif
blackstone from the ILV guild
Re: help with pet healing macro
For UOSteam, you could set up a list, then loop through them. I haven't tested this, but I whipped it up real quick. May need some cleaning up:
Just fill in the serials of the pets. Might also be able to loop through all friends and populate the list dynamically. with a `while @getfriend` to add friend to the list, then ignoreobject on the friend - not sure if ignoreobject works on friend/enemy or if it's limited to findtype, etc.
Just fill in the serials of the pets. Might also be able to loop through all friends and populate the list dynamically. with a `while @getfriend` to add friend to the list, then ignoreobject on the friend - not sure if ignoreobject works on friend/enemy or if it's limited to findtype, etc.
Code: Select all
if not @listexists 'mypets'
@createlist 'mypets'
@pushlist 'mypets' 0x111111 // Pet 1's serial.
@pushlist 'mypets' 0x222222 // Pet 2's serial.
@pushlist 'mypets' 0x333333 // Pet 3's serial.
@pushlist 'mypets' 0x444444 // Pet 4's serial.
@pushlist 'mypets' 0x555555 // Pet 5's serial.
endif
for 0 in 'mypets'
@setalias 'friend' mypets[]
if poisoned 'friend'
msg '[cs purge'
waitfortarget 2000
target! 'friend'
pause 2000
endif
if @inrange 'friend' 1
usetype 0xe21 'any' 'backpack' 1
waitfortarget 1500
target! 'friend'
else
msg "[cs touchoflife"
waitfortarget 3000
target! 'friend'
endif
endfor