How would I go about more accurately finding an npc then being able to tell if it is in combat. Want to keep current scrit private atm.will pm only
How would I go about more accurately finding an npc then being able to tell if it is in combat. Want to keep current scrit private atm.will pm only
>:)
Use a color finding function based off of the head of the NPC and then create a static search box for the health bar "y" amount of pixels above the location of the color found on the NPC's head.
Might run into problems in populated combat areas.
View my OSR Script Repository!
Botted to max
Guides: How to Report Bugs to the Scripter
~~~~ Moved to Java. Currently Lurking ~~~~
GetMousePos(var x, y: integer);
http://docs.villavu.com/simba/script...dkeyboard.html
Will return mouse position
But you'd be better off just using using the variables the position was stored in using the findColor function:
FindColor(var x, y: Integer; col, x1, y1, x2, y2: Integer)
http://docs.villavu.com/simba/scriptref/color.html
Then you would just use the findColors within a specific region relating to the point where you found the color.
Because health bars are typically above the NPCs head, you would just search for health bar colors (green/red) at a Y distance downwards of color found.
So If your color of the npc is found at 100, 100, you would search the NPCs health bar at around 90, 80 - 110, 90.
If found, you know that NPC is in combat.
-Aspect Abyss-https://villavu.com/forum/showthread.php?t=117559
-WaterfallQuest Runner- https://villavu.com/forum/showthread.php?t=116562-GiantRat Slayer- https://villavu.com/forum/showthread.php?t=116523
Yes, you are on the right track.
FindColor will store the color position(if found) in the x y value you passed to it. You can then use those for parameters for your next color search functions area
-Aspect Abyss-https://villavu.com/forum/showthread.php?t=117559
-WaterfallQuest Runner- https://villavu.com/forum/showthread.php?t=116562-GiantRat Slayer- https://villavu.com/forum/showthread.php?t=116523
There are currently 1 users browsing this thread. (0 members and 1 guests)