SRL Archive - OSR Help

Scripting: How am I doing?


SamSatanas

2012-04-19 22:19:29

Been learning how to script and i just want to know how I am doing. Is it neat and up to standards? What do you recommend that I practice next? Been playing around with variables and if then else statements.

Thank you to all the great script teachers.

program ThisIsMyScript;


Procedure IfThen;
var
a, b, c, d, e, f, g : Integer;
I : String;
begin
a :=10;
if (a = 9) then
begin
writeln('A Equals To 10');
end else
writeln('A Is Not Equal To 10');
begin
b := - 25;
begin
repeat
b := b + 1;
writeln('This Is Line Number ' + IntToStr(b));
until (b > - 1);
begin
c :=234 - 128;
d := c;
if (c <> 25) then
writeln('This is the answer to D ' + IntToStr(c));
begin
e := 125 / 3;
f := e * 47;
g := f + 15;
I :='I am Shocked.';
writeln('(125 Devided by 3) Times 47 (Plus 15) Equals ' + IntToStr(g));
g :=g -1832;
writeln('G Minus 1832 Equals What? ' + IntToStr(g) );
writeln('Wow, you are getting good at this. ' +(I));
end;
end;
end;
end;
end;

begin
IfThen;
end.

Debug Box

Compiled successfully in 33 ms.
A Is Not Equal To 10
This Is Line Number -24
This Is Line Number -23
This Is Line Number -22
This Is Line Number -21
This Is Line Number -20
This Is Line Number -19
This Is Line Number -18
This Is Line Number -17
This Is Line Number -16
This Is Line Number -15
This Is Line Number -14
This Is Line Number -13
This Is Line Number -12
This Is Line Number -11
This Is Line Number -10
This Is Line Number -9
This Is Line Number -8
This Is Line Number -7
This Is Line Number -6
This Is Line Number -5
This Is Line Number -4
This Is Line Number -3
This Is Line Number -2
This Is Line Number -1
This Is Line Number 0
This is the answer to D 106
(125 Devided by 3) Times 47 (Plus 15) Equals 1942
G Minus 1832 Equals What? 110
Wow, you are getting good at this. I am Shocked.
Successfully executed.

NKN

2012-04-19 22:23:32

Not bad, but this is in the wrong section.

Silentcore

2012-04-19 22:33:52

That's a good wait to practice some script making.

Markus

2012-04-20 05:02:38

Kicked to scripting help, please post in the right section next time.
edit: stuff like this could also be posted in general or idk where as it isn't really asking for help, but really, NOT in tutorial section.

Tickyy

2012-04-20 05:10:52

program ThisIsMyScript;

Procedure IfThen;
var
a, b, c, d, e, f, g : Integer;
I : String;
begin
a :=10;
if (a = 9) then
writeln('A Equals To 10')
else
writeln('A Is Not Equal To 10');

b := - 25;
repeat
b := b + 1;
writeln('This Is Line Number ' + IntToStr(b));
until (b > - 1);
c :=234 - 128;
d := c;

if (c <> 25) then
writeln('This is the answer to D ' + IntToStr(c));

e := 125 / 3;
f := e * 47;
g := f + 15;
I :='I am Shocked.';
writeln('(125 Devided by 3) Times 47 (Plus 15) Equals ' + IntToStr(g));
g :=g -1832;
writeln('G Minus 1832 Equals What? ' + IntToStr(g) );
writeln('Wow, you are getting good at this. ' +(I));
end;

begin
IfThen;
end.

why so many begins? here… everything fixed for ya

Imanoobbot

2012-04-20 05:14:56

From: SamSatanas
Been learning how to script and i just want to know how I am doing. Is it neat and up to standards? What do you recommend that I practice next? Been playing around with variables and if then else statements.

Thank you to all the great script teachers.


You could start making simply runescape scripts as one just finding a tree and clicking it then let it wait 3 seconds(waited until chopped you could add later) and let it find an click the next tree and so on. Until the invintory is full.

You should find all the stuff you need in the tutorial section.