SRL Archive - Help and Support

help with my first script - did i do this right?


krunkjuice

2006-03-31 18:47:46

This is my first scar script. I pretty much just winged it and looked at a script to kinda guide me along. Probably has no chance of working, but could you tell me what i did wrong? Btw its a automager for the lesserdemon in the wizards tower, but i didnt feel like putting in the color for the demon so i just put in col1.

program auto lesser demon mager;
{.include SRL/SRL.scar}
{.include SRL/skill/Magic.scar}
{.include SRL/core/AntiBan.scar}
{.include SRL/core/AntiRandoms.scar}
procedure mage;
begin
setupautocast(1,3);
wait(2500)
fightnpc(col1);//demoncolor goes here
end.
procedure antirandoms;
begin
findlamp(strength);
wait(5000);
fixchat();
wait(4000);
if findtalk then
talktorand();
wait(5000);
finddoctor();
wait(5000);
end.
procedure antiban
begin
antiban();
end.
procedure mainloop;
begin
antirandoms;
mage;
antiban;
end.
repeat
mainloop;
until(100000)
logout;
end

Sdcit

2006-03-31 18:58:57

{.include SRL/core/AntiBan.scar}
{.include SRL/core/AntiRandoms.scar}

is loaded in SRL/SRL.scar

Your missing parameters.

Procedures have a end;

i dont see a main loop for begin, end.

SetupSRL

I cant read the rest sorry :(

XxKanexX

2006-03-31 19:36:52

Lots of errors, but your just beggining.


{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Magic.scar}

procedure mage;
begin
Setupautocast(1, 3);
wait(2500)
fightnpc(col1); //demoncolor goes here
end;


procedure antirandoms;
begin
findlamp('strength');
wait(20);
fixchat;
wait(20);
if findtalk then
talktorand;
wait(20);
finddoctor;
wait(20);
end;

procedure antiban
begin
antiban;
end;

procedure mainloop;
begin
antirandoms;
mage;
antiban;
end;

begin
repeat
mainloop;
until(false)
logout;
end.

Procedures end in a semicolon, ;.
Main loops end in a full stop.

Main loops begin with a begin.

When inputting a string parametre, (Like find lamp) you put half quotes (Don't know the real names.. Apostraphes?).

FindLamp([B]'[/B]Strength[B]'[/B]);

Also if theres no parametres you don't do () after the procedure/function. You can, but it's not needed.

DoSomething();
DoSomething;

You did

until(10000);
That does notihing. You could make a counting integer and count until that integer equals 10 thousand, but if not, just make it false to run forever.

You forgot another folder in including the mage.

{.include SRL/SRL/skill/Magic.scar}

Waiting 5000 ms per random is way to long. Just do 20ms, or sometimes people do less.

There are more errors, that i would fix but i have to go out now.
Remember, i'm not insulting you or saying anything bad. You did good for your first script.

You were just a little off.

Good job and keep learning. :)

krunkjuice

2006-03-31 19:52:59

thanks a bunch guys, maybe ill try something simpler and get back to this one l8er. But I did learn a lot from this. one more question, are parameters the things that go inside of the () after a command?

Pyro

2006-03-31 20:03:06

From: krunkjuice
thanks a bunch guys, maybe ill try something simpler and get back to this one l8er. But I did learn a lot from this. one more question, are parameters the things that go inside of the () after a command?


Yes. say i wrote mouse(x,y,0,true) it would say invalid parameters because i have only one of the random variable. it should be mouse(x,y,0,0,true). I would suggest rune buyer. It taught me heaps. and very easy. And in your first scripts dw about antirandoms and all that stuff just get skeleton of script done

krunkjuice

2006-03-31 20:11:53

Man, this place is great! Its like you read my mind pyro. My next question was gonna be what script do u think i should make. Also thanks for answering my question about parameters. :)