View Full Version : If my targeted NPC keeps moving?
JMCross
12-06-2012, 08:01 PM
Hey, I was wondering if there was a way to keep up with my targeted NPC if it keeps moving? I've tried the Painter, but sometimes it clicks the painted spot right as the NPC moves away from it, Is there like any Object ID reader or something, that could help with this? (I.E, trying to buy items from shop-keeper, but he keeps moving, as he moves away, it F***s up the entire script, causing me to have to restart it.
Also, if anyone has time, Is there a way for the script/simba to know if your standing right over your selected target? So it'll right click your body and select the target?
Roflme
12-06-2012, 08:48 PM
If you're standing on the target, you can always have the script hover the mouse over you, and if the specified uptext is found do whatever you want it to do.
Slashed
12-06-2012, 09:29 PM
Try to get him stuck before running the script OR use TPA/ATPA on your script :\ There are tutorials for this in the Tutorial Island section.
You could just increase the mouse speed and add uptext checks so It doesn't click some random place.
JMCross
12-06-2012, 10:19 PM
Thank you all for the replies :D Very Helpful!. I'll go do some studying and try it out again :D
Thank you all for the replies :D Very Helpful!. I'll go do some studying and try it out again :D
I would read this tutorial ~ http://villavu.com/forum/showthread.php?t=90767
Taught me TPA's very well. Make sure you change the TPA to right click then check the uiptext, with a TPA it wont even click unless he is there, then it will be near instant
Example from my beer buying script to find the bartender
Function FindBartender:Boolean;
var
tmpCTS, i, l, r, counter: integer;
BTTPA:TPointArray;
begin tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.06, 0.34);
FindColorsTolerance(BTTPA, 6973285, MSX1, MSY1, MSX2, MSY2, 10);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BTTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
mmouse(BTTPA[r].x, BTTPA[r].y, 2, 2);
if waituptext('tender', 300) then
Break;
if timefrommark(counter) > 3000 then
begin
writeln('Failed to find the bartender');
end;
end;
writeln('Found the bartender');
clickmouse2(mouse_right);
WaitOption('Talk-to', 500);
MarkTime(b);
repeat
wait(50+random(5));
until((FindNPCChatText('yer', nothing)) or (TimeFromMark(b) > 2000));
end;
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.