SRL Archive - Research & Development Lounge

procedure BankWithdraw(W1,W2,HM:Integer;WHICHBANK,PINNUMBER: String);


Daniel

2007-12-07 03:07:10

UPDATE 1.1: Added deposit. Added a True or False statement. Added FailSafe's (Only one, thanks to JuKKa. Didn't know i needed them).

I haven't tested the new version. Can somebody do it for me?

Information:

{*******************************************************************************
procedure BankWithdraw(W1,W2,HM,ICN,S1,S2,T1:Integer;PINNUMBER,WHICHBANK:String;DI:Boolean):Boolean;
by: IP-Drowner
Description: Will open WHICHBANK and will withdraw HM at column W1 at row W2.
If it find's the pin screen, it will enter PINNUMBER. Return's True when
it has completed.
*******************************************************************************}

Usage:

BankWithdraw(1,1,28,13,4,28,0,'0000','varrock east',True);

The Code:

procedure BankWithdraw(W1,W2,HM,ICN,S1,S2,T1:Integer;PINNUMBER,WHICHBANK:String;DI:Boolean):Boolean;
begin
if(Not(LoggedIn)) then Exit;
if(DI) then
begin
if(InvCount>=ICN)) then
begin
Deposit(S1, S2, T1: Integer);
end;
end;
OpenBankFast(WHICHBANK);
if(PinScreen = True) then
begin
repeat
InPin(PINNUMBER);
Until(PinScreen = False);
end;
if(PinScreen = False) then
begin
Wait(327 + Random(191))
FixBank;
Wait(400 + Random(329))
WithDraw(W1,W2,HM);
Wait(129 + Random(97))
repeat
CloseBank;
Until(CloseBank=True);
Result:=True;
end;
end;

Variable List for WHICHBANK:

'akb', 'al-kharid' - Al-Kharid Bank (South of gate, furnace and mining site)
'lb', 'lumbridge' - Lumbridge Bank (Top level of Lumbridge Castle)
'veb', 'varrock east' - Varrock East Bank (North-West of Iron Mining Site)
'vwb', 'varrock west' - Varrock West Bank (South of the Grand Exchange, North of anvil's)
'feb', 'falador east' - Falador East Bank (South of Hair Cutter)
'fwb', 'falador west' - Falador West Bank (North of Mining Guild)
'db', 'draynor' - Draynor Bank (North of fishing spot's and willow tree's)
[i]Edgeville Bank Variable's removed because it does not function correctly[/i]


This part of script coding has been tested over 20 time's and it work's very well.

I hope the community will like it. I will be using this in my script's, and if you do use this in your script's please credit me by adding: //Thanks IP-Drowner. Like this:

procedure BankWithdraw(W1,W2,HM:Integer;PINNUMBER,WHICHBANK:String); //Thanks IP-Drowner
.

Enjoy!
Also remember to post feedback and comment's for improvement. This may be edited freely but not to be distributed to the public freely unless without my permission.

PwNZoRNooB

2007-12-07 12:41:29

Nice looking procedure, you should do it though so that it returns true if it is succesful and false if not.

Naum

2007-12-07 12:46:04

Yes pretty good. Should be used alot as a combination.

Daniel

2007-12-07 16:47:37

From: PwNZoRNooB
Nice looking procedure, you should do it though so that it returns true if it is succesful and false if not.

Thanks, and yes i should do that.

I just made this so it could make banking and withdrawing a whole lot easier. I hope it make's it into SRL.

Maybe i should make it deposit too. Well, what do you guy's think?

King of Knives

2007-12-07 17:21:53

I don't think simple procedures like these get into SRL. It is really rare to get anything into SRL unless you're a developer, and I've seen things way better than this, that didn't get in.

No offence.

-Knives

JuKKa

2007-12-07 20:33:18

Add failsafes like If(Not Loggedin)Then Exit; Timers, Counters etc..

Raskolnikov

2007-12-08 01:18:58

I am putting together some includes, and, I'd like to use this. I will give credits to you.

Daniel

2007-12-10 01:06:29

Added update, will now deposit item's. Also, i haven't tested this, so if anybody could then thanks.

Sir R. M8gic1an

2007-12-19 14:54:32

in most scripts when banking/ withdrawing people will look for dtms, not really for a specific place. so i think you should add in a dtm part in there.
instead of the spot just make it look for the dtm. (and possibly the bankscreen scroll down if it doesn't find it)

~RM

Fruity-Lo0py

2007-12-22 17:01:01

Creds placed in script, you never fail to dissapoint :D