SRL Archive - SRL Snippets

DepositAllExcept


[Nathan]

2011-12-28 18:25:01

Found a large error in code, will update with fixed code soon.

I think this is a pretty worthwhile function, it will deposit all items in ones inventory except the items specified in the parameters.


Procedure DepositAllExcept(items: Array of String);
var i,ii:integer;
begin
if(BankScreen) then
begin
for i := 1 to 28 do
begin
if(ExistsItem(i)) then
begin
MMouseItem(i);
sleep(50+random(50));
for ii := 0 to (Length(items)-1) do
begin
if not(IsUpText(items[ii])) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
WaitOptionMulti(['Deposit-All', 'All', 'Deposit'], 200);
sleep(200+random(100));
end;
end;
sleep(200+random(200));
end;
end;
end;
end;

H_N

2012-01-02 18:58:55

I agree, good idea, useful if you have a pickaxe or axe you cant equip.

Coh3n

2012-01-04 02:34:37

Hm, I like this. Would be useful in SRL for sure, but I think it should take a TIntegerArray rather than strings. Have it deposit all except certain inventory slots. Or maybe that one and yours?