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;
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;