PDA

View Full Version : All About Banking!



Tickyy
10-30-2009, 03:01 PM
All About Banking!
By Tickyy






Table Of Contents:

What Do You Need
Lets Get Started
Intermediate
Banking With Failsafes (Advanced)


Since most of the Junior members usually always need some banking for their script application(because 70% usually say no just because of no banking :p), I decided I would make up for it with this cute little tutorial. It's mostly about banking and a bit of failsafes, like ZephyrsFurys(<3) said "The key of success". I hope you enjoy reading it.

What Do You Need

Before we are going to start with examples and stuff you should know the basics(variables, constants, procedures, etc), if you don't know them, then please learn them and come back again:). Also the last version of scar and srl is needed of course.

Actually, i should not complicate this any longer because its just about banking and to bank on runescape is very easy (because of SRL :D!), I'm just going to make examples and explain about them. Once again, i hope you enjoy this tutorial and really learn from it. :D

Tickyy
10-30-2009, 03:26 PM
Lets Get Started:

BASIC

First, please open the srl and select the bank.scar file, which is usually on this path "....\SCAR 3.20\Includes\srl\SRL\core". So you clearly can see the Functions and procedures there. Each Function/Procedure actually has a comment that looks like a tittle of something, that explains about what the function/procedure does. So, lets move on with examples now. :D!


procedure Bankit;
begin
OpenBankFast('veb');
DepositAll;
CloseBank;
end;


As you can see, i made a few lines, this might be the smallest banking procedure out there:p, but it still banks. It is supposed to be small and simple to understand.


What does the OpenBankFast do?

The OpenBankFast will open the selected bank, i used the Varrock East Bank as example ('veb')

What does the DepositAll do?

The DepositAll will deposit ALL your items from your inventory to the bank, so your inventory is empty

What does the CloseBank do?

The CloseBank will just simply close the bank, so you can continue.

Well, I guess you understand the basic now, now i am going to complicate it a little bit more.

Tickyy
10-30-2009, 03:44 PM
Intermediate


procedure Bankit;
begin
OpenBank('veb', True, True);
if (PinScreen) then InPin('1337');
if (bankscreen) then
DepositAll;
Withdraw(1, 1, 27);
CloseBank;
end;


Banking and Withdraw from the bank this time...

What does the OpenBank do?

The OpenBank will open the selected bank, i used the Varrock East Bank as example ('veb'), and it will change the compass (The First Boolean), and it will change the angle (The second Boolean).

What does the PinScreen do?

The PinScreen Will turn true if there is a Pin on your screen.

What does the InPin do?

The InPin will enter the pin on your runescape bank (Don't worry this won't scam you :p.)

What does the BankScreen do?

The BankScreen will turn True if there appears a bank on your screen.

What does the Withdraw do?

On my example it'll withdraw an item from the bank which is at the first Column(First Integer) and first row(second Integer), and it will also withdraw an amount of 27(Third Integer).

Tickyy
10-30-2009, 03:57 PM
Banking With Failsafes

This method is really recommended if you're going to use a banking method at any day. If you really are at the bank place, i don't think you will ever fail with failsafes. Here is the way i use them:


Procedure Bankit;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then Exit;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Not going to repeat the Question & Answer this time.

As you can see I've added a small loop. I do not recommend using repeat here, it might be unstable sometimes, so i simply used a integer.It will repeat until it finds the bank screen or pin screen or it will stop if it repeated 3 times, and it'll terminate the script. Of course you can add something else at the TerminateScript, like i said on the comment. I've also added the Fixbank, it Scrolls the bank screen up.

If you greedily want to take a part(Copy) from this tutorial, you can do it, but please credit me (Tickyy). :)

marpis
11-04-2009, 05:06 PM
OpenBank already checks BankScreen and inputs Pin I think.
Find out and update your loops etc accordingly..

In fact, I think your Bankit can be shortened to this

procedure Bankit;
var
i : Integer;
begin
if (not(LoggedIn)) then Exit;
for i:=1 to 4 do
if OpenBank('veb', True, True) then
Break;
end;


And this is pretty useless because OpenBank has a loop already :p

Tickyy
11-04-2009, 08:50 PM
OpenBank already checks BankScreen and inputs Pin I think.
Find out and update your loops etc accordingly..

In fact, I think your Bankit can be shortened to this

procedure Bankit;
var
i : Integer;
begin
if (not(LoggedIn)) then Exit;
for i:=1 to 4 do
if OpenBank('veb', True, True) then
Break;
end;


And this is pretty useless because OpenBank has a loop already :p

Hmmmm. Never really thought of that, looks shorter but i'll take another look later if that really works :), if yes then i guess there's no problem if i use yours ?

Edit: yep, yours works well, but the " If i = 3 then" still has to stay imo. Thx (i haven't script for a while i'm still a bit rusty :crying:)

rogeruk
11-04-2009, 10:20 PM
Just use

Procedure Bankit;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then Exit;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Tickyy
11-05-2009, 02:38 PM
Just use

Procedure Bankit;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then Exit;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Well, this would just bank... what about Inpin and stuff xD?

Sabzi
11-05-2009, 05:13 PM
Well, this would just bank... what about Inpin and stuff xD?

As far as I know all of the functions that this function uses got Inpin in itself. But just look in the include.

rogeruk
11-06-2009, 11:34 AM
As far as I know all of the functions that this function uses got Inpin in itself. But just look in the include.

Correct.

Part of OpenBankFast

MMouse(Booths[i].X, Booths[i].Y, 3, 3);
if WaitUpText('ooth', 300) Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
if WaitOption('uickly', 300) then
begin
FFLag(0);
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 3000);
Wait(Random(300));
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
end;
end;