
Originally Posted by
Mat
I'll give it you on that, but I still see no point, but thats just me

, I see the point on Item not exist, thats good and useful

, but the for loop? Meh

Mat
Well, I can only find a few ways that would make the for loop useful, but it would require a whole new function:
Simba Code:
function WithdrawBankSearchMulti(Search: String; Uptext: TStringArray): Boolean;
var
lUptext, Res, i: Integer;
begin
if not BankScreen then
Exit;
lUptext := Length(Uptext);
SetLength(Result, lUptext);
Result := False;
for i := 1 to 40 do
begin
if not ExistsBankItem(i) then
Break;
MouseBankSlot(i, mouse_move);
if WaitUptextMulti(Uptext, 500) then
begin
ClickMouse2(mouse_left);
Inc(Res);
end;
if (Res >= lUptext) then
begin
Result := True;
Break;
end;
end;
BankTab(Tab);
end;
You used cannon as an example before; with this you could call:
Code:
WithdrawBankSearchMulti('cannon', ['base', 'barr', 'furn', 'stan', 'ball']);
And it would search for cannon and withdraw those 5 pieces. Can't think of many other things this would apply to though...