ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: enrod on December 11, 2011, 12:09:37 PM
-
I'd like to start off by saying that I'm not an experienced scripter, but I am just a guy who can usually get his scripts to work looking for a fairly simple script through easyuo, instead of razor. What I'm looking for, is a simple action of using a pet greater heal potion on my pet when it's health is below 100%. No need for vet/bandies, just the potion! Any help would be greatly appreciated :)
-
unfortunately, this sounds like a non osi shard, we would need some information how how the process works to use potions on a pet.
-
The process is straight forward. You double click a "pet greater heal potion", a target hand comes up, and you select your pet. I could easily find ID's for both the potion, and my pet if needed for this script. Add an additional if statement, if health<100%, use potion ID on pet ID. That's the theory, I just don't know how to script it :P
-
To do this, You would need to Find code for Checking the Healthbar of a pet (Pixel Scanning through EUO), and then after that its pretty straight forward
set %Pet XXXXX ; Id for pet
While Penguins <> Leprachauns
{
Gosub Get_Health ; <- The code to actually check health you would have to get from someone else.
if %Pet_Hits < 80
{
Finditem (Heal Potion Type) C_ , #Backpackid
if #findcnt = 0
Halt
set #lobjectid #Findid
event macro 17 0
Target 30
set #ltargetid %Pet
set #ltargetkind 1
Event macro 22 0
wait 20
}
}
-
Looks like EN Has a Sub for Checking Health Bars.
http://www.scriptuo.com/index.php?topic=1513.0;highlight=pet+health+bar (http://www.scriptuo.com/index.php?topic=1513.0;highlight=pet+health+bar)
I have never Personally Used it, but EN's stuff is always Top Notch.
-
You can easily adapt something from our tutorials to do this for you.
-
Hmm I must not be as good with these scripts as I thought if it should be easily adaptable :P. It's also possible that the OSI subs for pulling healthbars is different than the freeshard I currently play on. Is there a way to go around pulling the health bar? Maybe something along the lines of view health of current health bar pulled and heal petid with potionid?
-
Pixel Scan?
-
I'm not quite familiar with pixel scanning :-[
-
Here's another example of pet gump healing. I used this on a freeshard that was post-AOS. It's not really supported, but it might give you some ideas along with ENs work.
http://www.scriptuo.com/index.php?topic=31.msg31#msg31
-
That didn't take much to fix to my needs at all. Thanks TrailMyx! :D
It appears to be based off of highlighting the healthbar. Is that how it's supposed to work? I assume that's what is meant by pixel scanning.