SRL Archive - Outdated Tutorials

HowTo Set up a Script [DeclarePlayers, const]


Runescapian321

2008-04-19 10:11:49

Another short tut :) Many people have been having problems with this recently, so I'll help by posting a short tutorial on how to do it.

You'll see this in most scripts, or something like it

procedure DeclarePlayers;
begin
SRLID:= '';
SRLPassword:= '';


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

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;


Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active:=True;


Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active:=True;

end;

Now, let me explain each part separately.


SRLID:= '';
SRLPassword:= '';

This is your SRL Stats ID (the number) and your password (for SRL Stats). If you have no idea what this is, look through the various tuts on how to get one.



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

Usually, you don't have to touch HowManyPlayers. This is saying how many player arrays* there are. Many people wrongly edit this thinking that is how many players they're using, but that causes an error. I'll explain how to set the amount of players you want to use later.

*A player array is one of these


Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;


CurrentPlayer is what player you want to start with. In a player array, after the word 'Players' there is a [0] or any other number in it. Whichever player array you used to set up the player you want to use first, take a look at the number after Players and put that in after 'CurrentPlayer :='.

Don't touch NumberofPlayers unless you know what you're doing ;)



Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;


Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active:=True;


Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active:=True;

Ah, the player arrays They're pretty simple really. Lets break it down to just one…

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;

The Name is your runescape name. The Pass is your runescape password. The Nick* is 3-4 letters from the middle of your runescape name. You CANNOT use a part of your name that has spaces in it. Active is whether you want to use this player or not (true or false). This is how you can set the amount of players you want to use. For every player you DONT want to use, make it False.

* Examples of a Nick…If your name is Ilikecheese, you can use 'like', 'ike', 'eese', 'chee', 'hee', whatever you want. If your name is Ilike cheese, you CANNOT use 'ke_c' or 'e_ch', on account of there being a space. Nicks are used for random event detection.

Sometimes there may be something like this

Players[0].Booleans[0]:=false; //Instructions should be here

These can be used for a variety of things. The author usually labels what to put in where I labeled 'Instructions should be here'.

And one last thing…

You may see something like this…

const

FirstPlayer = 0; //Player to start with
world = 49;

Well, that's usually pretty simple. The author should label what to put in, and put that in.

I hope you liked my tut :)

Happy Autoing!

Richard

2008-04-19 10:17:30

Great tut, explains about what to put in scripts perfectly. Rep++

EDIT: Grr, need to "spread some more around"

Runescapian321

2008-04-19 18:57:43

Lol, yeah, I hate that. Happens to me pretty often :p

EDIT: Wow, people must like to rep me (look at below post :p)

sunny

2008-04-19 23:23:35

this is realy good, i've been having a bit of trouble with this part of the scripts but i think i have it now :)

rep++(got to spread it around :(

Richard

2008-04-20 04:27:05

Lol, people must really love you. I might just give bad to rep to gravediggers in the first script section, always fun :p Then I coul give it too you :)

Runescapian321

2008-04-20 10:40:13

I'm starting to near in on 100 rep xD Need…to…write….more…tuts….

Any ideas on other tuts anybody? :p

Harry

2008-04-20 10:41:41

From: Runescapian
I'm starting to near in on 100 rep xD Need…to…write….more…tuts….

Any ideas on other tuts anybody? :p


How to not ask for rep :p
Don't forget about the Rep++ button (that is, if you liked the tut)

Runescapian321

2008-04-20 10:50:23

You see…. That would be an OK idea, but the catch is…I can't write a tut on something I can't do… :p

EvilChicken!

2008-04-20 10:55:01

From: Hy71194
How to not ask for rep :p


And what comes from WHO?!

mogio

2008-06-10 17:01:32

Very Helpful. Thanks.

Runescapian321

2008-06-29 18:23:04

From: God
Just a question would we have to put are runescape name and password in between the pink/red colors? and what if are character has a short letter name?


Yes to your first question, and to your second question, you mean if it's a 3 letter name or a name with spaces (ex: I_O_W_N)? Then sorry, Scar won't be able to solve randoms for you.

xSaintias

2008-06-30 00:57:28

damn…..
but could you put a name like add_O_I_O
cause then ur nick would be add?

Runescapian321

2008-06-30 09:04:11

You mean if your RS username is 'Add_O_I_O'? You're probably out of luck there too, as all but two letters of your name are capitalized. You could try just 'dd', but it might not work too well.

PvH

2008-06-30 09:08:56

From: Runescapian
You mean if your RS username is 'Add_O_I_O'? You're probably out of luck there too, as all but two letters of your name are capitalized. You could try just 'dd', but it might not work too well.


I thought all names were compitable with the new nickname thing from srl:rolleyes:
Doesn't matter, caps, special characters, I heard it can solve all:D

Btw, nice tut, rep++;)

Runescapian321

2008-06-30 09:27:54

Oh? Really? Link me please :) I haven't seen anyone say that yet :p

PvH

2008-06-30 09:29:21

Hmm, it was a time ago Nauman said it..
And more people too, I'll try to find a link for it:)

EDIT:
Here it is..
It is not the post I wanted to find..
But it tells that srl uses TPA's to find your nickname.
So it isn't even needed to enter your .nick :p
Go here for the info^^:
http://www.villavu.com/forum/showthread.php?t=29515?t=32075

Luke boro

2008-07-16 06:18:15

thanx scapian it did help me alot, but im stuck again lol