Bixby Sayz
2009-09-06 06:33:44
I've been having a lot of trouble with the various withdraw methods not working if your bank does not have a scroll bar. I've tracked it down to FixBank going into an infinite loop waiting for a color indicating the scroll bar is at the top.
And since the update I've been having issues with it on bank screen that does have a scroll bar as well.
So I added a failsafe timeout and corrected colors and added color check for no scroll bar.
I'm off to bed. I'll read the feedback/comments (if any) tomorrow.
Cheers
Edit: Updated to include Dev's changes/modifications.
For comparison sake, the original. Note the original will fail to scroll to the top if the random coords specified come up as the far leftmost possible, and the other edges as well I think.
Edit: What is it with the devs that they treat comments like they were some form of communicable disease?
And since the update I've been having issues with it on bank screen that does have a scroll bar as well.
So I added a failsafe timeout and corrected colors and added color check for no scroll bar.
I'm off to bed. I'll read the feedback/comments (if any) tomorrow.
Cheers
Edit: Updated to include Dev's changes/modifications.
{*******************************************************************************
procedure FixBank;
by: lordsaturn, Nava2 & Bixby Sayz
Description: Scrolls the bank screen up.
*******************************************************************************}
procedure FixBank;
var
Timer : Integer;
begin
if (BankScreen) then
begin
if (InIntArray([2830905, 1316634], GetColor(489, 101))) then
Exit;
Timer := GetTimeRunning + 5000;
MouseBox(482, 101, 488, 111, 1);
while (GetColor(489, 101) <> 1316634) and (GetTimeRunning < Timer) do
Wait(50 + Random(50));
Wait(RandomRange(100, 200));
end;
end;For comparison sake, the original. Note the original will fail to scroll to the top if the random coords specified come up as the far leftmost possible, and the other edges as well I think.
procedure FixBank;
begin
if GetColor(489, 101) = 2830904 then exit;
if BankScreen then
if GetColor(489, 101) <> 1316634 then
begin
Mouse(485, 102, 7, 10, True);
while GetColor(489, 101) <> 1316634 do
Wait(20);
Wait(100 + Random(200));
end;
end;Edit: What is it with the devs that they treat comments like they were some form of communicable disease?