SRL Archive - SRL Snippets

WithdrawBankSlot(Slot,Amount:Integer):Boolean;


Sin

2012-03-19 10:02:27

function WithdrawBankSlot(Slot,Amount:Integer):Boolean;
var
Much:String;
begin
Result := False;

if BankScreen then
begin
MouseBankSlot(Slot,0);
Wait(250);
Much:= IntToStr(Amount);
if OptionsExist([Much],True) then
begin
ClickMouse2(True);
Result := True;
end else
begin
ChooseOption('X');
TypeSend(Much);
Result := True;
end;
end;
if Result then
exit else writeln('Failed to withdraw');
end;

Thought this might be useful since I use it alot.

footballjds

2012-03-19 12:18:52

From: Sin
function WithdrawBankSlot(Slot,Amount:Integer):Boolean;
var
Much:String;
begin
Result := False;

if BankScreen then
begin
MouseBankSlot(Slot,0);
Wait(250);
Much:= IntToStr(Amount);
if OptionsExist([Much],True) then
begin
ClickMouse2(True);
Result := True;
end else
begin
ChooseOption('X');
TypeSend(Much);
Result := True;
end;
end;
if Result then
exit else writeln('Failed to withdraw');
end;

Thought this might be useful since I use it alot.


this needs fail-safed significantly more if it will ever go in an include.
I'd say start by fail-safing the time between chooseoption and typesend.
note, lag etc could delay the appearance of the text box to type into.

Nebula

2012-03-20 22:14:49

Sorry I can't see how this is different than Withdraw();
(Mind explaining?)