PDA

View Full Version : A SRL Usefull Function Guide



NiCbaZ
11-17-2008, 09:49 AM
Usefull Function Guide


Contents

Intro.
Functions.
-- AutoColor.
-- Banking.
-- MapWalking.
-- Inventory.
-- Object.
-- Symbol.
conclusion.





Intro

What Is this Tut? In this tutorial i will ge going over most the usefull functions in SRL for your benifit in scripts so you dont go off making functions that are already in SRL.



Functions



AutoColor


Description
AutoColoring is Used in Scripts lots for walking, as runescape colors changes everytime you re-load the runescape client, thus making it we have to write autocolor functions to " grab" the color from the MiniMap.



// » function FindWaterColor:
// » function FindRoadColor: Integer;
// » function FindVarrockRoadColor: Integer;
// » function FindFallyRoadColor: Integer;
// » function FindLumbyRoadColor: Integer;
// » function FindRockColor: Integer;
// » function FindStoneColor: Integer;
// » function FindDirtRoadColor: Integer;
// » function FindBridgeColor: Integer;
// » function FindLadderColor: Integer;
// > function FindSandColor: Integer;


Theese Function are Self exspain their self.


Use:


To Use theese Functioons it Would be,
RadialWalk(FindRoadColor,160,90,70,2,2);


Banking


Description
The Banking functions are used to open bank Search bank, change bank tabs, it saves heaps of coding.




// * function BankScreen:Boolean;
// * Procedure Fixbank;
// * Function BankTab(T: Integer): Boolean;
// * procedure SearchBank(Item: string);
// * procedure DepositAll;
// * Procedure CloseBank;
// * function OpenBankFast(Location: String): Boolean;



Use:


BankScreen;

If BankSceen then // Returns if bank is open or not.

Fixbank

Scroll's bank to the top.

BankTab

BanTab(5) // changes current bank tab to tab 5.

SearchBank

SearchBank('fire') // Searches the bank for fire.

DepositAll

Desposits Iventrory into bank.

CloseBank

Closes the bank.

OpenBankFast

OpenBankFast('feb')l // Opens FEB , fally east bank, vaild bank names are...


feb,
fwb,
veb,
vwb,
db,
lb.




MapWalking





// *function MakeCompass(Direction: string): Boolean;
// *function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
// * procedure SetAngle(highest : Boolen);


MakeCompass

MakeCompass('n') // Makes the compass turn north.

RadialWalk

RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;

The color = A color or a autocolor function
StartRadial = The Angle To start searching From.
EndRadial = The Angle To start searching From.

Example for start and end Radial :

If start radial Was 0 and end was 90 it would search for the color on the MiniMap between The top of it and the first quater of it.

Radius = how far to search for it on the MM say if it was 70 it would search for it almost to the border of the MM if it was 35 it would search from the center to half way out of it.

Xmod, Ymod = Randomness.

SetAngle

Setangle(true) // Sets the angle of compass at highest angle.


Inventory




// * procedure DropAll;
// * procedure DropItem(i: Integer);

// * function InvFull: Boolean;
// * function InvEmpty: Boolean;
// * function InvCount: Integer;


DropAll

Drops all items in invenotory.

DropItem

DropItem(5) // would drop ithe fith item in your inventory.

InvFull

Gets if you inventory is full or not.

InvEmpty

Gets if you inventory is empty or not.

InvCount

Counts how many items you have in your inventory.


Object



// » function FindObjTPA(Var x, y: Integer; color, tol, cts, ObjWidth, ObjHeight,minCount: Integer; UpText: string): Boolean;


FindObjTPA

Finds object using WizzyPlugin functions.
Starts with a Spiral from x and y.
Put in the color, Tolerance and ColorToleranceSpeed.
If you don't know what colortolerancespeed to choose, put in -1.
ObjWidth and ObjHeight are the parameters TPAToATPAEx uses, thus filtering
the MS's FindColorsSpiralTolerance points in boxes defined by
ObjWidth and ObjHeigth.
minCount is the amount of colors it should at least find in a Object box.
UpText, is ofcourse the text the object should have. In the Multi variant the
UpText is a string array.


Symbol



// * function FindSymbol(var rx, ry: Integer; Name: String): Boolean;

FindSymbol

FindSymbol(x,y,'FunctionNameHere');

For function name here place one of theese there


{************************************************* ******************************
Valid Arguments are:
- agility - furnace - quest
- altar - gem stall - rare trees, tree
- anvil - guide - sandpit
- apothecary - hair dresser - saw mill
- archery shop - herbalist - scimitar shop
- arrow - house - shield
- axe shop - hunter store - shop, store
- bar - hunter training - short cut
- candle shop - jewelery - silk stall
- churn - kebab shop - silver stall
- clothes shop - mace shop - slayer master
- cookery shop - magic shop - spice stall
- cookery, cook - makeover mage - spinning wheel, spin
- crafing shop - mill - staff shop
- dungeon - minigame - summoning store
- farming shop - mining shop - sword shop
- farming spot - pet shop - training dummy
- fishing shop, fish store - platebody shop - underground
- fishing spot, fish - plateskirt shop - water source, water
- food shop - portal (to player owned houses) - weave
- fur trader - pottery, pot - windmill
************************************************** *****************************}





Conclusion

Do you understand? I hope you learnt that there is lots in the SRL include, and you dont have to waste time writing lots of code , when there is lots in the srl Include. ;)


*** Warning This Tutorial Is Not Finshed **

poolikemax
11-18-2008, 07:50 PM
great tut tought me alot thnks

Jakez27
11-26-2008, 06:43 AM
Thanks a lot, needed clearing on the FindSymbol function... helped a lot.
Jakez

NCDS
11-26-2008, 12:48 PM
Ahh thank you and nice tut!
we needed an updated one severely bad!

Tniffoc
11-26-2008, 01:09 PM
Nice job. You should add "Color" functions....

FindColor
FindColorTolerance
FindColorsTolerance
FindColorsSpiralTolerance

NCDS
11-26-2008, 01:10 PM
Nice job. You should add "Color" functions....

FindColor
FindColorTolerance
FindColorsTolerance
FindColorsSpiralTolerance


yes, I agree with that ;)

Wizzup?
11-26-2008, 01:21 PM
Nice job. You should add "Color" functions....

FindColor
FindColorTolerance
FindColorsTolerance
FindColorsSpiralTolerance


Those aren't SRL Functions?

NCDS
11-26-2008, 01:38 PM
Those aren't SRL Functions?

What would they be called then?

Wizzup?
11-26-2008, 02:18 PM
What would they be called then?

Function in SCAR.

NCDS
11-26-2008, 02:21 PM
Ohh alright, thanks for clearin that up.

ilikenubs
11-29-2008, 03:36 AM
ty vm

wired357
12-04-2008, 06:49 AM
I have been wanting to use this function:



function EquipArrows: Boolean;
By: Freddy1990
Description:
Equips arrows if they are found in the inventory.


I'm not exactly clear on the usage. How do you specify what arrows to equip?

mikemox
12-11-2008, 01:16 AM
good guide

StrikerX
12-13-2008, 10:04 AM
I have been wanting to use this function:





I'm not exactly clear on the usage. How do you specify what arrows to equip?

It will equip any arrows found in the inventory.

PoPC0rN
12-23-2008, 06:39 AM
It will equip any arrows found in the inventory.

orly? i thought that was only do-able with Reflection. >.>

Hot Script
03-07-2009, 02:16 AM
very nice, needed this. rep++