SRL Archive - SRL Archives

Withdraw


Nava2

2008-09-04 16:38:26

Bank.scar:
function WithdrawMod(col, row, Amount: Integer): boolean;

Var
ResInt, I, Count : Integer;
P : TPoint;
BBox: TBox;

begin
FixBank;
//FixBankTab;
Result := false;
ResInt := InvCount;
BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col, Row)));
BBox := IntToBox(BBox.x1 + 8, BBox.y1 + 8, BBox.x2 - 8, BBox.y2 - 8);
GetMousePos(P.x, P.y);
if PointInBox(P, BBox) then
BBox := IntToBox(P.x - 8, P.y - 8, P.x + 8, P.y + 8);
case Amount of
0: begin
MouseBox(BBox.X1, BBox.Y1, BBox.X2, BBox.Y2, 2);
Wait(RandomRange(75, 125));
ChooseOption('Withdraw-All');
end;
1: begin
MouseBox(BBox.X1, BBox.Y1, BBox.X2, BBox.Y2, 1);
Wait(RandomRange(50, 150));
end;
else
begin
MouseBox(BBox.X1, BBox.Y1, BBox.X2, BBox.Y2, 2);
Wait(RandomRange(75, 125));
if not ChooseOption('Withdraw-' +IntToStr(Amount)) then
begin
GetMousePos(P.x, P.y);
MouseBox(P.x - 3, P.y - 3, 3, 3, 2);
Wait(RandomRange(75, 125));
if (ChooseOption('Withdraw-X')) then
begin
Wait(RandomRange(700, 1200));
TypeSend(IntToStr(Amount));
end;
end;
end;
end;
Count := InvCount;
while (Count <= ResInt) or (I < 200) do
begin
Wait(RandomRange(15, 40));
Inc(i);
Count := InvCount;
if Count > ResInt then Break;
end;
Result := ResInt < InvCount;
end;

Like? :)

Naike

2008-09-04 16:43:40

Would be alot easier if you actully posted what you changed :)

Nava2

2008-09-04 16:57:08

Second function, I created based off of Fwaki's, and the first was completely revamped from SRL.

Nava2

2008-09-05 14:53:54

Added PointInBox so that when withdrawing, if the mouse was already in that box, it wouldn't move crazy far in the box. Just a little bit more undetectable. :)

EvilChicken!

2008-09-06 06:00:21

Looks really nice, I can't find any flaws :( xD


Just one thing, you need waits before ChooseOption ^^
I do 145 + Random(275) ms.

Nava2

2008-09-06 10:31:00

From: EvilChicken!
Looks really nice, I can't find any flaws :( xD


Just one thing, you need waits before ChooseOption ^^
I do 145 + Random(275) ms.


Only 75ms is needed. But I CANT BELIEVE I forgot that :duh:

Edit: Added some waits etc, cleaned up a bit. Removed yet another annoying MMouse twitch.

Narcle

2008-09-13 01:15:08

Here's my modded one its very similar and less lines. Been using it for couple months. I do like your wait until the invcount is what the amount it is you took out.

procedure MyWithdraw(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 Not ChooseOption('Withdraw-' +IntToStr(Amount)) then
begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
if (ChooseOption('Withdraw-X')) then
begin
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
end;
End;
end;

There's one problem that I've seen happen. (and i think i've mentioned it before)

If say you do "Withdraw-9" and the last option recorded was "Withdraw-999" it doesn't recognize its "999" instead of just "9". Maybe this can be fixed by adding a space to the end? idk haven't tried it yet.

Nava2

2008-09-13 01:47:12

Hmm, I could test that. I will do it in the morning though. It is almost 2am.. :(