NCDS
2010-09-30 23:28:11
Made it so it will wait until the 'Enter amount' screen pops up in Chat box to avoid mis-typing. Also made it actually search for the Withdraw-'amount', before just typing in the number.
Thread: http://villavu.com/forum/showthread.php?p=740278#post740278
Do with it what you will.
Thread: http://villavu.com/forum/showthread.php?p=740278#post740278
{*******************************************************************************
function WithdrawEx(Col, Row, Amount: Integer; Uptexts: TStringArray): Boolean;
By: Starblaster100, Town, Wizzup? and Narcle, small fixes by r!ch!e & EvilChicken!
Description: Withdraws Amount at Column/Row.
*******************************************************************************}
function WithdrawEx(Col, Row, Amount: Integer; Uptexts: TStringArray): Boolean;
var
BBox: TBox;
X, Y: Integer;
begin
Result := False;
FixBank;
FixBankTab;
BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col, Row)));
GetMousePos(X, Y);
if (not PointInBox(Point(X, Y), BBox)) then
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 3);
if (Length(Uptexts) > 0) then
if (not WaitUptextMulti(Uptexts, 500)) then
Exit;
ClickMouse2(Amount = 1);
if (Amount = 1) then
begin
Result := True;
Wait(RandomRange(250, 550));
Exit;
end;
case (Amount) of
0: Result := WaitOptionMulti(['Withdraw-All', 'w-A'], 300);
5, 10: Result := WaitOptionMulti(['Withdraw-' + IntToStr(Amount), 'w-' + IntToStr(Amount)] , 300);
else
Result := WaitOptionMulti(['Withdraw-' + IntToStr(Amount), 'w-' + IntToStr(Amount)] , 300);
end;
if (not (Result)) and (Amount > 0) then
Result := WaitOptionMulti(['Withdraw-X', 'w-X'], 300);
if (Result) and (not InIntArray([0, 1, 5, 10], Amount)) then
begin
x := GetSystemTime + 5000;
while (x >= GetSystemTime) and (not (InRange(CountColor(0, 250, 396, 307, 410), 155, 165))) do
Wait(50);
Wait(RandomRange(500, 1250));
TypeSend(IntToStr(Amount));
end;
end;
Do with it what you will.