View Full Version : Any way for a script to see bleeding? (Empath self-healing)
Tuxedo Gin
12-02-2021, 01:56 AM
I want to make a script for my empath to heal down all wounds and scars so I'm clean for a hunt. If possible I want it to heal the most severely bleeding wounds first, but I don't see any way in the documentation to get that info. I suppose the best way to do this in that case would be to just start with all rank 3s, then 2s, then 1s?
Also, if anybody thinks this would be easy and wants to write it, that'd be good too. I don't know Ruby so I have to get up to speed on that first.
Tgo01
12-02-2021, 03:12 AM
Yeah I don't think there is a built in way for Lich to check how bad bleeders are, that's probably something you would need to check via HEALTH first and get the values that way.
Other than that though this should do what you're looking for:
wounds_array = nil
wound_value = 3
heal_it = proc{
wounds_array.each{ |key,value|
if value == wound_value
waitrt?
waitcastrt?
if checkmana < 10
echo "Waiting for mana."
wait_until { checkmana(10) }
end
fput "cure #{key}"
sleep 0.2
end
}
wound_value -= 1
}
until wound_value < 1
wounds_array = Hash[ "head" => Wounds.head, "right eye" => Wounds.reye, "left eye" => Wounds.leye, "neck" => Wounds.neck, "chest" => Wounds.chest, "abdomen" => Wounds.abs, "back" => Wounds.back, "left arm" => Wounds.larm, "right arm" => Wounds.rarm, "left hand" => Wounds.lhand, "right hand" => Wounds.rhand, "left leg" => Wounds.lleg, "right leg" => Wounds.rleg, "nerves" => Wounds.nerves ]
heal_it.call
end
wound_value = 3
until wound_value < 1
wounds_array = Hash[ "head" => Scars.head, "right eye" => Scars.reye, "left eye" => Scars.leye, "neck" => Scars.neck, "chest" => Scars.chest, "abdomen" => Scars.abs, "back" => Scars.back, "left arm" => Scars.larm, "right arm" => Scars.rarm, "left hand" => Scars.lhand, "right hand" => Scars.rhand, "left leg" => Scars.lleg, "right leg" => Scars.rleg, "nerves" => Scars.nerves ]
heal_it.call
end
Rinualdo
12-02-2021, 08:06 AM
There are quite a few existing scripts that will heal wounds based on rank already. ;healself and ;cure are two popular ones.
Tuxedo Gin
12-02-2021, 09:03 AM
Yeah I don't think there is a built in way for Lich to check how bad bleeders are, that's probably something you would need to check via HEALTH first and get the values that way.
Other than that though this should do what you're looking for:
wounds_array = nil
wound_value = 3
heal_it = proc{
wounds_array.each{ |key,value|
if value == wound_value
waitrt?
waitcastrt?
if checkmana < 10
echo "Waiting for mana."
wait_until { checkmana(10) }
end
fput "cure #{key}"
sleep 0.2
end
}
wound_value -= 1
}
until wound_value < 1
wounds_array = Hash[ "head" => Wounds.head, "right eye" => Wounds.reye, "left eye" => Wounds.leye, "neck" => Wounds.neck, "chest" => Wounds.chest, "abdomen" => Wounds.abs, "back" => Wounds.back, "left arm" => Wounds.larm, "right arm" => Wounds.rarm, "left hand" => Wounds.lhand, "right hand" => Wounds.rhand, "left leg" => Wounds.lleg, "right leg" => Wounds.rleg, "nerves" => Wounds.nerves ]
heal_it.call
end
wound_value = 3
until wound_value < 1
wounds_array = Hash[ "head" => Scars.head, "right eye" => Scars.reye, "left eye" => Scars.leye, "neck" => Scars.neck, "chest" => Scars.chest, "abdomen" => Scars.abs, "back" => Scars.back, "left arm" => Scars.larm, "right arm" => Scars.rarm, "left hand" => Scars.lhand, "right hand" => Scars.rhand, "left leg" => Scars.lleg, "right leg" => Scars.rleg, "nerves" => Scars.nerves ]
heal_it.call
end
Thank you. I'll give this a try. You're a hero, don't let anyone tell you otherwise.
There are quite a few existing scripts that will heal wounds based on rank already. ;healself and ;cure are two popular ones.
I didn't know about ;cure, I'll check it out. ;healself throws some deprecation errors, but still works. I just hate errors so I was hoping for something cleaner. Thanks for the reply.
Rinualdo
12-02-2021, 10:06 AM
I didn't know about ;cure, I'll check it out. ;healself throws some deprecation errors, but still works. I just hate errors so I was hoping for something cleaner. Thanks for the reply.
Those are some GTK errors that looks like the author didn't update for. It still functions, though.
I released an updated/fixed ;cure not to long ago, so I know that one works also. I think ;cure is more suited to the hunting empath type.
lexbubba
12-02-2021, 12:05 PM
;healself works great for me. But i am still on lich 4
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.