Cazax
2009-06-18 23:39:45
Bank tab functions for bank.scar:
{*******************************************************************************
procedure FastDeposit(Items : (Carried, Worn, BeastOfBurden));
by: Cazax
Description: Deposists using the bank buttons. Can deposit carried, worn items or Bust
of Burden items(All of them).
*******************************************************************************}
procedure FastDeposit(Items : (Carried, Worn, BeastOfBurden));
Var
TP : TPoint;
V : Variant;
Begin
V := Items;
TP.X := 399 + (36 * (V - 1));
TP.Y := 309;
Mouse(TP.X, TP.Y, 10, 10, True);
End;
{*******************************************************************************
Procedure MakeTab(Col, Row : Integer);
by: Cazax
Description: Creates a tab with the item at the specified column and row.
*******************************************************************************}
Procedure MakeTab(Col, Row : Integer);
Var
TP : TPoint;
I : Integer;
Begin
TP := BankIndexToMSPoint(BankPointToBankIndex(Point(Row, Col)));
MMouse(TP.X, TP.Y, 5, 5);
Wait(50 + Random(100));
GetMousePos(TP.X, TP.Y);
HoldMouse(TP.X, TP.Y, True);
For I := 1 To 9 Do
If Not ExistsBankTab(I) Then
Begin
MMouse(48 * I, 57, 10, 10);
Wait(50 + Random(100));
GetMousePos(TP.X, TP.Y);
ReleaseMouse(TP.X, TP.Y, True);
Exit;
End;
End;
{*******************************************************************************
Procedure MakeTabEx(X, Y : Integer);
by: Cazax
Description: Creates a tab with the item at the specified coordinate.
*******************************************************************************}
Procedure MakeTabEx(X, Y : Integer);
Var
Temp : TPoint;
Begin
Temp := MSTPointToBankPoint(Point(X, Y));
MakeTab(Temp.X, Temp.Y);
End;
{*******************************************************************************
Procedure AddToTab(Col, Row, Tab : Integer);
by: Cazax
Description: Adds to the desired tab the item at the spefied column and row.
*******************************************************************************}
Procedure AddToTab(Col, Row, Tab : Integer);
Var
TP : TPoint;
Begin
TP := BankIndexToMSPoint(BankPointToBankIndex(Point(Row, Col)));
MMouse(TP.X, TP.Y, 5, 5);
Wait(50 + Random(100));
GetMousePos(TP.X, TP.Y);
HoldMouse(TP.X, TP.Y, True);
MMouse(48 * Tab, 57, 10, 10);
Wait(50 + Random(100));
GetMousePos(TP.X, TP.Y);
ReleaseMouse(TP.X, TP.Y, True);
End;
{*******************************************************************************
Procedure AddToTabEx(X, Y, Tab : Integer);
by: Cazax
Description: Adds to the desired tab the item at the spefied coordinate.
*******************************************************************************}
Procedure AddToTabEx(X, Y, Tab : Integer);
Var
Temp : TPoint;
Begin
Temp := MSTPointToBankPoint(Point(X, Y));
AddToTab(Temp.X, Temp.Y, Tab);
End;