SRL Archive - SRL Bugs

DepositAll


Sin

2012-01-04 11:56:41

Function DepositAll:Boolean;
var
x,y:Integer;
begin
FindObjCustom(x, y, ['eposit','items'], [2052490], 2);
Mouse(x, y, 0, 0, True);
end;
Apparently the old deposit ran on coordinates, this new one replaces it since that particular coordiante got replaced with deposit Money Pouch.

Scaper

2012-01-04 12:00:39

{*******************************************************************************
function DepositAll: Boolean;
by: ZephyrsFury & Quickmarch
Description: Deposits all items in your inventory
*******************************************************************************}
function DepositAll: Boolean;
var
T, X, Y: Integer;
BScreen, DScreen: Boolean;
begin
Result := false;
BScreen := BankScreen;
if (not(BScreen)) then
DScreen := DepositScreen;
if (BScreen) or (DScreen) then
if (InvCount > 0) or (FindColor(X, Y, srl_outline_black, 98, 68, 436, 257) and (DSCreen)) then
begin
Mouse(390 - 50 * Integer(DScreen), 305 - 30 * Integer(DScreen), 15, 10, True);
Wait(200 + Random(300));
T := GetSystemTime;
while (InvCount > 0) or (FindColor(X, Y, srl_outline_black, 98, 68, 436, 257) and (DSCreen)) and (GetSystemTime - T < 2000) do
Wait(100);
Result := (InvEmpty) or (not(FindColor(X, Y, srl_outline_black, 98, 68, 436, 257)) and (DScreen));
end else begin
srl_Warn('DepositAll', 'No items to deposit ', warn_AllVersions);
result := true;
end;
end;

theres the old one do you have a fix for it as im on me phone right now

legoace

2012-01-04 12:01:34

E: Since this is an SRL bug, we should probably keep discussion to the SRL bug subforum. I've already posted a committable fix there.

I believe the reason we had it running on coordinates is so that there is little to no CPU usage to find the button, and to introduce randomness in the clicking of the button - yours has to search for the color and wait for UpText, and will also probably click in the same spot every time (depending on how FindObjCustom works).

Kyle Undefined

2012-01-04 12:04:29

http://villavu.com/forum/showpost.php?p=881685&postcount=8

^ Fix was posted already :D But good attempt! :)

mike-gee420

2012-01-04 12:10:00

thankyou! :]

Sin

2012-01-04 15:15:15

F U Kyle, 17 Minutes short :L