rya
2010-03-17 12:26:04
Well i run this and it just moves the mouse of me and not the iron ore im standing right next to, any idea's how to stop this?
~Rya
program test;
{.include srl/srl.scar}
function WriteAndResult(Text: string; MyResult: Boolean): Boolean;
begin
Result := MyResult;
WriteLn(Text);
end;
function SetOre(Ore, What: Integer): Integer;
begin
case What Of
0: begin //Colour
case Ore of
0: Result := 1;//Bronze Colour
1: Result := 1;//tin colour
2: Result := 2634057;//Iron colour
end;
end;
1: begin
case Ore of //Toll
0: Result :=1;
1: Result :=1;
2: Result :=22;
end;
end;
end;
end;
function FindOre(Ore: Integer): Boolean;
var
Time, Colour, Toll, i, a, x, y, g, h: Integer; //Time = for failsafe latter
MyTpa: TPointArray;
ClickPoint: TPoint;
begin
X := MSCX
Y := MSCY
Colour := SetOre(Ore,0);
Toll := SetOre(Ore,1);
if not FindColorsSpiralTolerance(x, y, MyTpa, Colour, MSX1, MSY1, MSX2, MSY2, Toll) then
Begin
Result := WriteAndResult('Did not find colour :( A sad day ',False);
Exit;
End;
for i := 0 to High(MyTpa) do
begin
ClickPoint := MyTpa[i]
Inc(a);
MMouse(ClickPoint.x, ClickPoint.y, 4, 4);
GetMousePos(g,h);
WriteLn('We clicked at'+IntToStr(G)+(',')+IntToStr(H)+' also I:'+IntToStr(i))
if IsUpText('ine') then
begin
GetMousePos(x, y);
Result := True
if (Random(20) = 5) then
begin
Mouse(x, y, 0, 0, False);
ChooseOption('ine');
Exit;
end else begin
Mouse(x, y, 0, 0, True);
Exit;
end;
if A>=25 then
begin
Result := WriteAndResult('UpText not found after moving mouse 25 time!!!',False);
Exit;
end;
end;
end;//<-- Here
end;
begin
SetupSRL;
ActivateClient;
If FindOre(2) Then
WriteLn('Found ore');
end.
Thanks~Rya