SRL Archive - OSR Help

Funtions help =[


BlueWorld

2010-05-01 06:02:48

i need help explanation on how to use

function OpenBank(WhichBank: string; ChangeCompass, ChangeAngle: Boolean): Boolean;

Frement

2010-05-01 06:04:05

From: BlueWorld
i need help explanation on how to use

function OpenBank(WhichBank: string; ChangeCompass, ChangeAngle: Boolean): Boolean;


You use it like:
OpenBank('VEB', True, True);
Means that it opens Varrock East Bank (VEB) and changes compass to one it needs and also the angle to up.

BlueWorld

2010-05-01 06:42:44

how do you know to put true true?

Frement

2010-05-01 06:45:14

From: BlueWorld
how do you know to put true true?


The angle, is true because i want it to go as up as it can, so it can find the bank booth, and the compass is good to be true to because some banks are in different angles?

BlueWorld

2010-05-01 06:51:06


function OpenBankFast(Location: String): Boolean;
how about this? how do you know what to put for string and boolean?

Frement

2010-05-01 06:52:14

From: BlueWorld

function OpenBankFast(Location: String): Boolean;
how about this? how do you know what to put for string and boolean?


I think theres a list somewhere, 'VEB' 'VWB' for example.

Bank_FE = 'feb'; // (Falador East Bank)
Bank_FW = 'fwb'; // (Falador West Bank)
Bank_VE = 'veb'; // (Varrock East Bank)
Bank_VW = 'vwb'; // (Varrock West Bank)
Bank_GE = 'geb'; // (Varrock GE Bank)
Bank_DR = 'db' ; // (Draynor Bank)
Bank_AK = 'akb'; // (Al-Kharid Bank)
Bank_EV = 'eb' ; // (Edgeville Bank)
Bank_CT = 'ctb'; // (Catherby bank)
Bank_CM = 'clt'; // (Camelot bank)
Bank_NA = 'nab'; // (North Ardougne bank)
Bank_SA = 'sab'; // (South Ardougne bank)
Bank_YN = 'ynb'; // (Yanille bank)
Bank_NG = 'ngb'; // (North gnome bank)
Bank_SG = 'sgb'; // (South gnome bank)
Bank_WG = 'wgb'; // (Warrior guild bank)
Bank_FG = 'fgb'; // (Fishing guild bank)

BlueWorld

2010-05-01 06:54:44

wanna msn its faster?

Frement

2010-05-01 06:56:30

From: BlueWorld
wanna msn its faster?


Well, if someone else uses the search, they get the answer too :)

Anyway, more questions?

BlueWorld

2010-05-01 06:58:04

well i need to know how to use

procedure SearchBank(Item: string);
function OpenBankFast(Location: String): Boolean;
i don't get how you know how to fill it out

mind telling the difference between funtion and procedure btw?

Frement

2010-05-01 07:05:16

From: BlueWorld
well i need to know how to use

procedure SearchBank(Item: string);
function OpenBankFast(Location: String): Boolean;
i don't get how you know how to fill it out

mind telling the difference between funtion and procedure btw?


Function returns something, procedure just does something.

And theres usually some sort of explanation on the function, thats how i know how to fill.

And once you have scripted for few months you get to know what to fill in what and you remember the functions without looking at the files :)

BlueWorld

2010-05-01 07:06:50

can we msn or something cause this is getting tetious

Frement

2010-05-01 07:10:52

Well you can add me.

BlueWorld

2010-05-01 07:16:34

well if your not gonna be on i don't really see i point in me addin >_<


procedure SearchBank(Item: string);
function OpenBankFast(Location: String): Boolean;
function WithdrawItemEx(Ident: integer; IdentType: string; var Index: integer; Amount: integer; UpText: string; Tol: TIntegerArray): Boolean;
how do i use these procedure and funtions?

Frement

2010-05-01 07:21:03

From: BlueWorld
well if your not gonna be on i don't really see i point in me addin >_<


procedure SearchBank(Item: string);
function OpenBankFast(Location: String): Boolean;
function WithdrawItemEx(Ident: integer; IdentType: string; var Index: integer; Amount: integer; UpText: string; Tol: TIntegerArray): Boolean;
how do i use these procedure and funtions?


function OpenBankFast(Location: String): Boolean;
OpenBankFast('VWB'); The location is one of the ones i posted above.

procedure SearchBank(Item: string);
SearchBank('iron axe'); It searches the bank for such item.

function WithdrawItemEx(Ident: integer; IdentType: string; var Index: integer; Amount: integer; UpText: string; Tol: TIntegerArray): Boolean;

{Description: Withdraws an item from the bank by using "Ident" with tol[0]
as color tolerance, tol[1] as contour tolerance in case of bmp
masks, or the count of colors for TPA item finding.
Valid IdentTypes are all in FindItem.
Index: The Bank Index where the item is found, must be a variable.
Speeds up future withdraws.
Amount: Amount to withdraw from bank.
UpText: The UpText which the function checks for.}

BlueWorld

2010-05-01 07:28:25

for

SearchBank('iron axe');
what do i set the identifier as? not a DTM i know that much >.> i tried

For

function WithdrawItemEx(Ident: integer; IdentType: string; var Index: integer; Amount: integer; UpText: string; Tol: TIntegerArray): Boolean;
it should work something like
WithdrawItemEX(idk,'item',idk,2;'iron hatchet';
something like that?

Frement

2010-05-01 07:35:44

From: BlueWorld
for

SearchBank('iron axe');
what do i set the identifier as? not a DTM i know that much >.> i tried

For

function WithdrawItemEx(Ident: integer; IdentType: string; var Index: integer; Amount: integer; UpText: string; Tol: TIntegerArray): Boolean;
it should work something like
WithdrawItemEX(idk,'item',idk,2;'iron hatchet';
something like that?


I suggest you open rs and try the functions and see what they do :)

BlueWorld

2010-05-01 07:43:50

that won't help if it won't even execute ……

Frement

2010-05-01 07:47:37

From: BlueWorld
that won't help if it won't even execute ……


program New;
{.Include SRL/SRL.scar}

begin
SetupSRL;
OpenBankFast('VEB');
SearchItem('iron axe');
CloseBank;
end.

EDIT: You should really read some beginner tutorials.

Coh3n

2010-05-01 09:25:19

Yeah, there are a lot of guides that will answer all your questions. :)

http://villavu.com/forum/forumdisplay.php?f=191