Heysus
2008-10-20 16:57:57
This is in addition to the ones that Narcle made…
{*******************************************************************************
Function MoveItemToTab(T: integer): Boolean;
by: Heysus
Description: Moves the item at x,y to the specified bank tab.
Creates a new bank tab if T is 0.
*******************************************************************************}
Function MoveToBankTab(x, y, T: integer): Boolean;
var
i: integer;
begin
if not BankScreen then
Exit;
if T = 0 then
begin
for i:=1 to 9 do
if ExistsBankTab(i) then T := i+1;
end;
if (T < 1) or (T > 9) then
begin
srl_Warn('MoveToBankTab', 'Bank Tab '+inttostr(T) +' does not Exist.', warn_AllVersions);
Result := false;
exit;
end;
MMouse(x, y, 4, 4);
if IsUpText('ithdraw') then
begin
GetMousePos(x,y);
Wait(50 + random(50));
HoldMouse(x, y, true);
Wait(200 + random(100));
if FindColor(x, y, 1448221, x-21, y-18, x+21, y+18) then //faded outline
begin
MMouse(48 * T, 64, 4, 4);
Wait(200 + random(100));
GetMousePos(x, y);
ReleaseMouse(x, y, true);
Wait(150);
if CurrentBankTab = T then
Result := true;
end;
end;
end;