PDA

View Full Version : Find & Click NPC's



drowningtrout
11-08-2006, 09:59 PM
I need help on figuring out how to find and click NPC's.
Right now I need it for auto runebuying script, to click on betty but it will be very usefull for future scripts. Heres what I've gotten so far.


Works great,but once it opens up it still trying to find betty and then after about 20 secs i get an error saying
[Runtime Error] : Out Of Range in line 51 in script

Plz Help



procedure SetupColors;
begin
NPCColors[1] := 2026220;
NPCColors[2] := 6949227;
NPCColors[3] := 593486;
NPCColors[4] := 5441875;
NPCColors[5] := 6031709;
NPCColors[6] := 594515;
NPCColors[7] := 1184278;

end;





Procedure FindShop;
var CBx,CBy, GCIndex: Integer;
begin
if (ShopScreen)= False then
for GCIndex := 1 to 16 do
begin
repeat
if FindColorSpiralTolerance(CBx, CBy, NPCColors[GCIndex], MSX1, MSY1, MSX2, MSY2, 12) then
Writeln('Found Rune Shop! Continuing...');
Mouse(cbx,cby,22,17,false)
wait(30)
popup ('Trade')

until (ShopScreen)= True
end;
end;

Infantry001
11-08-2006, 10:36 PM
change

for GCIndex := 1 to 16 do
to

for GCIndex := 1 to 7 do

Your array is only 7 numbers long, so you cant have the GCIndex length be more than 1-7.

Ransom
11-09-2006, 12:56 AM
I am recanting my previous post because i didn't look close enough...sorry. >_<