View Full Version : NPC Hover Detect
I haven't scripting in a while. I'm getting used to the library. Is there a function that detects the interface popup thing you see when you hover(not click, not the weakness) over an attackable npc.
Thanks
Foundry
03-07-2014, 10:22 PM
I haven't scripting in a while. I'm getting used to the library. Is there a function that detects the interface popup thing you see when you hover(not click, not the weakness) over an attackable npc.
Thanks
Are you talking about mouseover text? Everything to do with that is located here (http://docs.villavu.com/srl-6/text.html#getmouseovertext).
Are you talking about mouseover text? Everything to do with that is located here (http://docs.villavu.com/srl-6/text.html#getmouseovertext).
There's a compact version of the mouse over info you get when you are attacking an NPC. I think he wants that.
Turpinator
03-08-2014, 03:46 AM
i now not what you speak of... Pics please. :)
Clarity
03-08-2014, 04:22 AM
All I see is normal mouseover text when hovering over attackable NPCs.
Foundry
03-08-2014, 05:48 AM
All I see is normal mouseover text when hovering over attackable NPCs.
Yeah, same here. Is it in the options or something?
It doesn't appear over every attackable NPC. But when it does it looks like this:
http://i.imgur.com/MjUWsx6.png
Notice how the mouse over text is only "Attack" not "Attack NPCNAMEHERE". Actually, for this one it looks like the standard in-combat interface, but there's also another variation of it that happens on some NPC's. Pretty sure these are just bugs that Jagex never got around to fixing.
Clarity
03-08-2014, 11:47 AM
And that's different from just
isMouseOverText['Attack']?
Or are you referring to the HP bar/weakness/etc. over the NPC? Cause I don't think anything for that exists.
I think I tried isMouseOverText with no results. And I am talking about the picture sdf posted. however, this specific npc shows the full name and level. But now that I notice, there are two interface things open in the picture. I am referring to the one without an hp bar.
Clarity
03-12-2014, 02:22 AM
I think I tried isMouseOverText with no results. And I am talking about the picture sdf posted. however, this specific npc shows the full name and level. But now that I notice, there are two interface things open in the picture. I am referring to the one without an hp bar.
That is what isMouseOverText is supposed to recognize.
If it doesn't work try a varying search like isMouseOverText['Attack','oblin','ck G'] etc.
Debug should tell you what mouse-over text finds.
Ok I figured it out. Do we have a function that gets the bounds of the box with the monster's hp in it? The box that contains the weakness?
Clarity
03-13-2014, 10:57 PM
Ok I figured it out. Do we have a function that gets the bounds of the box with the monster's hp in it? The box that contains the weakness?
I don't believe we do, although that would probably speed things up. Right now I just use findDTM with mainscreen.getBounds() which has worked out fine.
{FUNCTION -- areWeFighting
Purpose: Checks if we are fighting a brother.
Comments: None.}
function areWeFighting: boolean;
var
x, y, tries: integer;
begin
if not isLoggedIn then
exit;
result := false;
isAkrisae := false;
ClarityDebug('Checking to see if we are in combat.');
while tries < 4 do
begin
if findDTM(earthWeakness, x, y, mainScreen.getBounds()) or
findDTM(airWeakness, x, y, mainScreen.getBounds()) or
findDTM(rangedWeakness, x, y, mainScreen.getBounds()) or
findDTM(rangedWeaknessAlt, x, y, mainScreen.getBounds()) or
findDTM(fireWeakness, x, y, mainScreen.getBounds()) or
findDTM(stabWeakness, x, y, mainScreen.getBounds()) or
findDTM(waterWeakness, x, y, mainScreen.getBounds()) or
findDTM(boltWeakness, x, y, mainScreen.getBounds()) then
begin
if findDTM(boltWeakness, x, y, mainScreen.getBounds()) then
begin
isAkrisae := true;
ClarityDebug('We are fighting Akrisae!');
end;
result := true;
ClarityDebug('Currently in combat with a brother.');
exit;
end
else
inc(tries);
end;
end;
Looking at it again actually, it would probably be a lot nicer to have a combatInfo.getBounds() or something.
Yea it would give me some search box params for my npc to make the script pretty. But, i'm using the red ring as an extra check for safety.
Thanks guys
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.