SRL Archive - First Scripts

First Script On SCAR


RaiNKhan

2008-11-11 00:12:24

Hi this is my very first script what it does is logs you in teleports you to lumby and then logs out can some1 plz try to tell me if i did good on my very first script? Thank you.

Here is the script All you need to edit is line 12 and 14 for your password.
Please Reply And Rate for first script :spot:

in2it

2008-11-11 00:42:09

Yes its good but it needs alot of work :D Why dont u make it Loop teles and maybe add how many telles you want to do then log out?

mormonman

2008-11-11 00:43:38

i think it uses home tele…

RaiNKhan

2008-11-11 00:43:40

hey can u plz help me with that like loop and stuff cuz i dont understand on tuts

Aser

2008-11-16 22:13:15

Help with the loop stuff attempt

a loop has scar repeat stuff as many times as defined (told to)

it is included within a procedure


program TheLoop;
begin
repeat //this starts the loop everything after will be repeated
TypeSend('ABCDEF');
until(false); // this ends the loop

This loop will endlessly TypeSend the string ABCDEF because
there is nothing to be defined as false
basically everything between repeat and end will be looped

this is a bad idea because you eventually want it to end so you need a way
to make it end eventually or when it has done something a number of times
this is done with variables

program TheLoop;
var //defines there will be a variable following
x: = Integer; //Says that x will be an integer
// an integer is a number
//so x might = 1,7, or 182081 ect.

begin
x: = 0 //defined x as 0
repeat //this starts the loop everything after will be repeated
x: = x + 1; //This makes x = x + 1, so [x = 0 + 1], when it repeats it
//will be [x = 1 + 1] because the first time you added 1 to x
TypeSend('ABCDEF');
until(x > 4); //now it will check if x is greater than 4
{The first time x will equal 1. 1 is less than 4 so it will
keep repeating. Then when it checks again x will = 2 which is
still less than 4 so it will continue and so on}

{Once x = 5, because it is not [x=4], it will stop}

Did that help?
If not then post here or pm me and I will try to do better

kameron_ir_sad

2008-11-16 22:52:16

:(h): u need to work on it but it is pretty good

D1zl3

2008-11-16 23:12:24

it would use up less space if you used CastSpell(1); in your tele procedure instead of what you have, might be more reliable, and you could use your current procedure as a failsafe.

RaiNKhan

2008-12-21 12:09:30

thanks for the replys will be making new script which logs you in then you stand near willows at rimmington and it will cut willows for you and then drop them extra fast i just need help with the detecting trees

hamish909

2008-12-21 12:15:34

From: Aser
Help with the loop stuff attempt

a loop has scar repeat stuff as many times as defined (told to)

it is included within a procedure


program TheLoop;
begin
repeat //this starts the loop everything after will be repeated
TypeSend('ABCDEF');
until(false); // this ends the loop

This loop will endlessly TypeSend the string ABCDEF because
there is nothing to be defined as false
basically everything between repeat and end will be looped

this is a bad idea because you eventually want it to end so you need a way
to make it end eventually or when it has done something a number of times
this is done with variables

program TheLoop;
var //defines there will be a variable following
x: = Integer; //Says that x will be an integer
// an integer is a number
//so x might = 1,7, or 182081 ect.

begin
x: = 0 //defined x as 0
repeat //this starts the loop everything after will be repeated
x: = x + 1; //This makes x = x + 1, so [x = 0 + 1], when it repeats it
//will be [x = 1 + 1] because the first time you added 1 to x
TypeSend('ABCDEF');
until(x > 4); //now it will check if x is greater than 4
{The first time x will equal 1. 1 is less than 4 so it will
keep repeating. Then when it checks again x will = 2 which is
still less than 4 so it will continue and so on}

{Once x = 5, because it is not [x=4], it will stop}

Did that help?
If not then post here or pm me and I will try to do better


Wow, you really helped me understand stuff there!

Any chance you could maybe give me a break down guide to finding trees and cutting them down, for learning purposes you seem to be good at explaining!

Thanks in advance.