SRL Archive - OSR Outdated Tutorials

For the Starters


NiCbaZ

2008-04-10 22:45:37

Welcome to my first TuT


I am not much of a scripter so this for the very basic scripting


Logging Your Player In


When you open up scar you will have this.

program New;
begin
end.

Name your Program (please note do not put any spaces in the program name or you will get an error..


Also PLease not there are prob heaps better ways to do all this i am not much of a scripter and not that good so bare with me…
program login;
begin
end.

when your scripting make sure you always include
{.include SRl/SRl.scar}

so you should now have

program New;
{.include SRl/SRl.scar}


procedure

begin


now we need to make a Players procedure

name the procedure Declare Players

procedure Declareplayers;

then add in the procedure which is this
..

begin

HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'ser';// 3 letters from the middle of your username
Players[0].Active := True;
end;


simple yes?

after that procedure go down a few lines and make your mainloop

put a begin in the script like this

begin

HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'ser';// 3 letters from the middle of your username
Players[0].Active := True;
end;

begin


now before you do anything you have to setup the SRL so in the mainloop you need to add setup SRL under begin like this

begin
setupSRL;

now we add in the players procedure into the mainloop

begin
setupSRL;
DeclarePlayers;

now we have to login that player

begin
setupSRL;
DeclarePlayers;
LoginPlayer

simple yes?

so your script should look like

program New;
{.include SRl/SRl.scar}


procedure DeclarePlayers;

begin

HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;

Players[0].Name := 'user';
Players[0].Pass := 'pass';
Players[0].Nick := 'ser';
Players[0].Active := True;
Players[0].Integers[0]:= 100; //Loads to Do;
end;

begin
setupSRL;
DeclarePlayers;
LoginPlayer;
end.

Note: always remember to add semi-columns after almost every line!

ok so now that will logg your player in.. from then on to add things into you script all you have to do is add the procedure in then add it into the mainloop!

say if your doing a dranor cutter you would make a new procedure called
procedure WalkToTree

then add in the procedure the easy way to walk around in this part of runescape is symbles so we want the script to walk to the fishing symble near the willow trees in dranor so we would do this.. wait but before we do anything with x, y in it we need to add a var into ou script so at the start of the script before declare players add this line in

var
x, y:integer;

your script should look like this

program New;
{.include SRl/SRl.scar}

var
x, y:integer;


procedure DeclarePlayers;

begin

HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0]:= 100; //Loads to Do;
end;

procedure WalkToTree
begin

begin
setupSRL;
DeclarePlayers;
LoginPlayer;
end.

add in the walking procedure which will be symbles so we will be useing this


if(FindSymbol(x,y,'fish'))then
Mouse(x,y,2,2,true);
Fflag(5);
it will find the symble and wait till we walk to it the Fflag(5) is what makes it walk all the way to the symble before going onto the next part of the script

so add that to your script and main loop your script should look like this

program New;
{.include SRl/SRl.scar}

var
x, y:integer;


procedure DeclarePlayers;

begin

HowManyPlayers :=1;
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0]:= 100; //Loads to Do;
end;

procedure WalkToTree
begin

if(FindSymbol(x,y,'fish'))then
Mouse(x,y,2,2,true);
Fflag(5);
end;

begin
setupSRL;
DeclarePlayers;
Wait(1000)
LoginPlayer;
WalkToTree
end.

Well thats most of the TuT so far Next section i will be telling you about anti ban and anti randoms and how to use them in your script.
thanks

NiCbaZ

2008-04-11 03:04:06

I Left My User And Pass In One Section Some1 Hacked Me Is You Did When I Recover This Account I Will Post Your Ip And Hopefully You Will Be Banned

Waddo

2008-04-11 05:37:07

go on nick gud idea

also when u get there ip

find out where they live

=Þ

(there loads of websites that do it ) for example iptect.com/net/org/co.uk (not sure in the ending)

kor

2008-04-11 16:10:31

From: nicbaz
I Left My User And Pass In One Section Some1 Hacked Me Is You Did When I Recover This Account I Will Post Your Ip And Hopefully You Will Be Banned


It Is A Nice Guide For Beginners, Just A Few Spelling Mistakes. Oh, I Almost Forgot To Say, Why Did You Make All The First Letters In Every Word Big? I Just Found Out That It Takes A Hell Lot More Time To Write This Way.

oh and i thought that part of your message was really funny :) (the part that i made bold and underlined)

x_²

2008-04-11 16:25:49

From: kor
It Is A Nice Guide For Beginners, Just A Few Spelling Mistakes. Oh, I Almost Forgot To Say, Why Did You Make All The First Letters In Every Word Big? I Just Found Out That It Takes A Hell Lot More Time To Write This Way.

oh and i thought that part of your message was really funny :) (the part that i made bold and underlined)


if you ever lear c+ or most computer code you learn to make main words capitalized

kor

2008-04-11 16:41:44

From: x_²
if you ever lear c+ or most computer code you learn to make main words capitalized

oh i didnt know that, but still. this is a forum, not some coding stuff :P he didnt use capital letters in the first post.

sorry for making these useless posts!

Richard

2008-04-11 17:11:34

Well, this is a good tut, but the first bit with logging in looks like a copy of mine, just with the text explaining what it does removed, look at it to see what I mean:
http://www.villavu.com/forum/showthread.php?t=28079

And I think you could have added on the symbol finding, lke symbol accuracy, and all the valid arguements for the symbols. And you could have talked about the mouse function, and why you put in the "2, 2" after the x and y coords (randomness incase you don't know).

I think you could basically just explained how the functions work and about the SRL funcitons and thing.

Its a good tut with a good purpose, I just think you could have added more information on the different bits. But other than that, keep scripting and making tuts!

I'll give you rep as I think I may have sounded harsh in some bits of this…

NiCbaZ

2008-04-12 02:05:51

ah thanks for that its not finshed yet and no i didnt copy from your tut i wrote it out all my self from scratch and yer i need to add in heaps more its not done yet as i said

thanks.

brent8900

2008-04-12 03:24:08

cool it is good for the people that need help with there scripting

trav280

2008-04-13 18:48:37

thanks, this will help me alot

ozozo

2008-04-14 17:21:49

I'll try…

sk8terbitu

2008-04-15 19:55:33

umm did any one notice this??
program New;
{.include SRl/SRl.scar}


procedure

begin

i thought it was supposed to be like this

{.include SRl/SRl.scar}
program New;

procedure

begin

Richard

2008-04-17 04:50:41

No, it isn't. Nicbaz, why don't you explain why you include SRL, instead of just telling people to do it?

Also, sk8terbitu, why have you put that thing about you donating in your sig, the admins wont give you site suporter status if you make it look like you want the benefits.