Mor
2012-04-07 12:07:51
Hi,As you can see there is "repeat…until" in the MainLoop procedure
The problem is that it doesnt make this loop.
after picking one banana(in Karamja), the mouse returns to the inventory tab and doesnt pick anymore.
the strange thing here is that: if I put "until(not(loggedIn));" instead of the
"until(InvFull)", the script works well, and the loop is done.
The problem is that it doesnt make this loop.
after picking one banana(in Karamja), the mouse returns to the inventory tab and doesnt pick anymore.
the strange thing here is that: if I put "until(not(loggedIn));" instead of the
"until(InvFull)", the script works well, and the loop is done.
procedure PickBanana;
Var
x, y : Integer;
TPA : TPointArray;
I : Integer;
begin
if not FindColorsSpiralTolerance(MSCX,MSCY,TPA, 1503736, MSX1, MSY1, MSX2, MSY2, 17) then
Exit;
for I := 0 to High(TPA) do
begin
x := TPA[I].x;
y := TPA[I].y;
MMouse(x, y, 3, 3);
wait(400);
if IsUpText('ick') then
begin
Wait(100 + Random(150));
GetMousePos(x, y);
Mouse(x, y, 1, 1, True);
Wait(500 + Random(250));
Break;
end;
end;
end;
procedure MainLoop;
begin
WalkToPort;
TalkWithNPC;
GoToBananas;
[B]repeat
if(not(loggedin)) then
Exit;
PickBanana;
until(InvFull);[/B]
end;
begin
//{$IFDEF SMART}
// Smart_Server := 0;
// Smart_Members := True;
// Smart_Signed := True;
// Smart_SuperDetail := False;
//{$ENDIF}
SetUpSRL();
ActivateClient();
DeclarePlayers();
LoginPlayer();
repeat
Wait(1000)
until(RsReady());
MainLoop;
end.