ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: baldielocks on June 13, 2010, 03:28:35 PM
-
*bangs head on wall* been reading documentation and googling my bald head off :'(. I can't seem to find any reference to the health gump colors for poison and mortal strike.
Anyone know how I could get them?
-
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.
-
Why not choose a pixel color far to the left on the health bar? If the pet's health gets to that point, it will be too late anyhow...
:)
-
been considering it. Tried it, but ran into the issue below. So I am
One other issue (for me) is the the EUO documentation is not really clear on cmppix. I assume that I would use cmppix to set off a condition in brackets if it equals that color. But the example given in the documentation does not match the pix colors I am getting returned.
http://wiki.easyuo.com/index.php/CmpPix (http://wiki.easyuo.com/index.php/CmpPix)
savePix 580 13 1
comparePixelAgain:
cmpPix 1 f
{
key F4 Alt
halt
}
goto comparePixelAgain
The example is 6 digits, the returns are 7, with no spaces.
-
If you're trying to heal, and you can't heal, then it's mortaled right? So if you check for damaged, try to apply a bandage... and you CANNOT heal, then you KNOW it's mortaled? Why do you need to scan pixels? heh
-
Here's a silly little heal pet sub that checks for the message "current_state" because if you can't heal your pet in it's "current state" it's mortaled. I think that's what you're trying to do right? So then you do whatever you need if you find that message. In this sub it casts remove curse.
SUB healpet
FINDITEM ZLF C_ , #backpackid
IF #findcnt < 1
{
display alert You are out of bandaids!!
halt
}
SET %jstart #jindex
SET #lobjectid #findid
EVENT macro 17
TARGET 5s
FINDITEM %pet
SET #ltargetid #findid
SET #ltargetkind 1
EVENT macro 22 0
WAIT 15
SET %jend #jindex
FOR %r %jstart %jend
{
SCANJOURNAL %r
IF current_state in #journal
{
EVENT macro 15 209
TARGET 5s
EVENT macro 22
WAIT 20
}
}
DELETEJOURNAL
RETURN
-
wow. good stuff. I really needed to see the journal scan being used in something I could relate to. POWERFUL.
I am trying something a little different from the rest of the pack. A full flavored cast / vet heal. Your snippet is EXACTLY one thing I had planned, remove curse using JOAT (or jewels if elf).
With cast healing / curing in mind, you also get the "current state" message when you attempt to cast greater heal on a poisoned or mortal pet. Remove curse will remove both, sometimes. Definitely not 100% at low level
-
This only works for VET healing. If you do it with casting you'll get a message when you try to heal and the animal is only poisoned and that's bad. If you're vet healing, you'll only get the message when it's mortaled. Here's an easy new player tutorial for journal scanning too.
http://www.scriptuo.com/index.php?topic=4001.0;highlight=journal+scanning+tutorial
-
set %primepix (#pixcol you want)
savePix 111 111 1 (position to check)
if #PIXCOL <> %primepix
{ heal }
i use it to crossheal macro, i hope it helps.