SRL Archive - SRL Archives

Bank tab functions


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;

Dynamite

2009-06-18 23:41:32

Sweet, I made a personal empty invent, but didnt think anyone wanted :p
Thank you :)
Will use in my next script :)

T~M

Sir R. M8gic1an

2009-06-19 00:21:23

they're good, but i think that none except the first are useful. i don't really imagine a bot organizing the bank for you

~RM

Naum

2009-06-19 01:12:59

DepositAll already uses one variant of your first procedure. Although I have to agree with Rasta, this does not seem applicable for a bot to do.

Cazax

2009-06-19 01:19:37

function DepositAll: Boolean;
? It doesn't have a variant.
Well the other functions aren't useful…

Naike

2009-06-19 02:24:02

I agree with Rasta…

Note: Wouldn't this be better?

procedure FastDeposit(Items : (Carried, Worn, BeastOfBurden));
Var
TP : TPoint;
V : Variant;
Begin
If Not BankScreen then
Exit;
V := Items;
TP := Point(399 + (36 * (V - 1)), 309);
Mouse(TP.X, TP.Y, 10, 10, True);
End;

mormonman

2009-06-19 03:13:50

From: The Man
Sweet, I made a personal empty invent, but didnt think anyone wanted :p
Thank you :)
Will use in my next script :)

T~M


didn't depositall already use the button?

Naum

2009-06-19 19:19:14

By variant i meant, that It Does The Same Thing as one of your ones.