SRL Archive - SRL Archives

DepositAll bug fix


Quickmarch

2009-04-19 00:16:19

DepositAll clicks the empty inv button even when the inv was empty so i just fixed it up a little:


{*******************************************************************************
function DepositAll: Boolean;
by: ZephyrsFury
Description: Deposits all items in your inventory
*******************************************************************************}

function DepositAll: Boolean;
var
T, x, y: Integer;
begin
if (BankScreen) then
if (FindColor(x, y, 65536, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(390, 305, 15, 10, True);
Wait(200 + Random(300));
T := GetSystemTime;
while (InvFull) and (GetSystemTime - T < 2000) do
Wait(100);
Result := InvEmpty;
end;
end;

Richard

2009-04-19 00:21:46

Surely this means that it will only use DepositAll if the inventory is full?

Would you change this:

while (InvFull) and (GetSystemTime - T < 2000) do

to

while not(InvEmpty) and (GetSystemTime - T < 2000) do

?

Quickmarch

2009-04-19 00:24:18

From: Richard
Surely this means that it will only use DepositAll if the inventory is full?

Would you change this:

while (InvFull) and (GetSystemTime - T < 2000) do

to

while not(InvEmpty) and (GetSystemTime - T < 2000) do

?


Oh i thought it was meant to deposit even if the inv was about half full aswell.

Richard

2009-04-19 00:25:51

Oh yeah, forgot that colour was the colour that you get behind all object. Sorry :(

ZephyrsFury

2009-04-19 05:43:51

Nice find Quickmarch… stupid Zeph, stupid.. :rolleyes: