
Originally Posted by
Harry
I got a fun infinite loop, I think.
I came back to
http://i.imgur.com/8Oqha.jpg .. the mouse flipping around the screen for quite a bit, I assume was going on for a while. Was trying to find banker when it failed to find him the first time, when it actually clicked him properly, I think?
I believe this has something to do with withdrawing essence after having just previously repaired a rune pouch. I'm not entirely sure why it happens, but a simple solution would be to modify this part of code in the 'OpenBankEniola' function:
Simba Code:
if (BankScreen or RunesMenu) then
begin
Result := True;
Exit;
end;
So it should never try finding the banker again if the RunesMenu is visible.
Edit:
Nevermind, the RunesMenu is handled within that function, we can't exit out.
"This" should work:
Simba Code:
Function OpenBankEniola: Boolean;
var
X,Y,T,T2,F,B: Integer;
GoOn: Boolean;
label
Start,MenuStage;
begin
Result := False;
GoOn := False;
Start:
if BankScreen then
begin
Result := True;
Exit;
end;
if RunesMenu then
goto MenuStage;
FindNormalRandoms;
if not LoggedIn then Exit;
if (FindBanker(X, Y) or FindBanker2(X, Y)) then
begin
GoOn := True
end else
begin
if (F > 4) then
TeleportOut;
HumanMMouse(255, 325, 20, 10);
if not WaitUpTextMulti(['Walk', 'alk h', 'here'], 300) then
begin
ClickMouse2(False);
WaitOptionMulti(['Walk', 'alk h', 'here'], 300);
end else
ClickMouse2(True);
FFlag(5);
Inc(F);
goto Start;
end;
if GoOn then
begin
ClickMouse2(False);
if not WaitOptionMulti(['Bank','ank','nk E'], 500) then
begin
Inc(B);
if (B > 5) then
begin
Writeln('Error finding Banker text, teleporting...');
TeleportOut;
Exit;
end;
goto Start;
end else
HumanMMouse(MPoint.X, MPoint.Y, 25, 25);
While IsMoving_F do
Wait(1);
MarkTime(T);
repeat
FindNormalRandoms;
if (TimeFromMark(T) > 3000) then
Exit;
if RunesMenu then
break;
until(false);
MenuStage:
if RunesMenu then
begin
HumanMMouse(MPoint.X, MPoint.Y, 7, 7);
ClickMouse2(True);
MarkTime(T2);
repeat
FindNormalRandoms;
if (TimeFromMark(T2) > 5000) then
Exit;
if (BankScreen) or (PinScreen) then
break;
Wait(100);
until(false)
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Shutdown('No PIN # given');
Wait(RandomRange(175, 350));
end;
end;
Result := BankScreen;
end;