PDA

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



Daniel
12-07-2007, 08:07 AM
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;PINNUMB ER,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;PINNUMB ER,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)
Edgeville Bank Variable's removed because it does not function correctly


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
12-07-2007, 05:41 PM
Nice looking procedure, you should do it though so that it returns true if it is succesful and false if not.

Naum
12-07-2007, 05:46 PM
Yes pretty good. Should be used alot as a combination.

Daniel
12-07-2007, 09:47 PM
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
12-07-2007, 10:21 PM
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
12-08-2007, 01:33 AM
Add failsafes like If(Not Loggedin)Then Exit; Timers, Counters etc..

Raskolnikov
12-08-2007, 06:18 AM
I am putting together some includes, and, I'd like to use this. I will give credits to you.

Daniel
12-10-2007, 06:06 AM
Added update, will now deposit item's. Also, i haven't tested this, so if anybody could then thanks.

Sir R. M8gic1an
12-19-2007, 07:54 PM
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
12-22-2007, 10:01 PM
Creds placed in script, you never fail to dissapoint :D