SRL Archive - SRL Archives

Withdraw Tweak


Nava2

2008-08-14 14:19:48

Here are some tweaked withdraw functions, to accomodate the new Withdraw-X thinger. They work flawlessly, small tweak but yeah! :)

{*******************************************************************************
procedure Withdraw(Col, Row, Amount: Integer);
by: Starblaster100, Town, Wizzup? and Nava2
Description: Withdraws Amount at Column/Row.
*******************************************************************************}

procedure Withdraw(col, row, Amount: Integer);

Var
BBox: TBox;

begin
FixBank;
FixBankTab; // <- That is really annoying at times... :(
BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col - 1, Row - 1)));
If Amount = 1 Then
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
Wait(RandomRange(50, 150));
End
Else
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
if Amount = 0 then
ChooseOption('Withdraw-All')
else
if not(ChooseOption('Withdraw-' +IntToStr(Amount)) then
begin
ChooseOption('Withdraw-X');
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
End;
end;

This is a function made by me, well, I edited to use :D.
{*******************************************************************************
procedure WithdrawPoint(px, py, Amount: Integer);
by: Starblaster100, Town, Wizzup? and Nava2
Description: Withdraws Amount at MSPoint, (px, py).
*******************************************************************************}

procedure WithdrawPoint(px, py, Amount: Integer);

Var
BPoint : TPoint;
BBox: TBox;

begin
FixBank;
FixBankTab; // <- That is really annoying at times... :(
BBox := BankIndexToMSBox(BankPointToBankIndex(MSTPointToBankPoint(Point(px, py));
If Amount = 1 Then
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
Wait(RandomRange(50, 150));
End Else
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
if Amount = 0 then
ChooseOption('Withdraw-All')
else
if not(ChooseOption('Withdraw-' +IntToStr(Amount)) then
begin
ChooseOption('Withdraw-X');
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
End;
end;

Old:

{*******************************************************************************
procedure Withdraw(Col, Row, Amount: Integer);
by: Starblaster100, Town and Wizzup?
Description: Withdraws Amount at Column/Row.
*******************************************************************************}

procedure Withdraw(col, row, Amount: Integer);

Var
BBox: TBox;

begin
FixBank;
FixBankTab;
BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col - 1, Row - 1)));
If Amount = 1 Then
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
Wait(RandomRange(50, 150));
End
Else
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
if (Amount = 5) or (Amount = 10) then
ChooseOption('Withdraw-' +IntToStr(Amount))
else if Amount = 0 then
ChooseOption('Withdraw-All')
else
if (ChooseOption('Withdraw-X')) then
begin
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
End;
end;



Nava2

ShowerThoughts

2008-08-14 14:26:25

It's always good to add the old so we can see difference ;)

Nava2

2008-08-14 14:32:24

Ugh, Fine :).

Edit: added old to first post.

Nava2