SRL Archive - Help

Need help with first script


anuparockz

2012-06-22 12:31:32

Guys I'm trying to make my first script. It will cast make hunter kit spell. But Ik eep getting identifier expected error. What am I doing wrong? Here's the script. Please help.

Program HunterKitMaker;
{$DEFINE SMART}
{$i srl/srl.simba}

const
{==========Smart Setup==========}
World = 0;
MEMBERS = True;
SIGNED = True;
{===============================}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

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

procedure AntiBan;
begin
repeat
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Magic', false);
wait(1500+Random(250));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(25+random(150));
MakeCompass('S');
wait(75+Random(150));
MakeCompass('N');
end;
end;

procedure CastHunterKit;
var x, y: integer;
begin
if FindObj(x, y, 'in', 2965080, 10) then
begin
repeat
ClickMouse2(1);
ChooseOption('ast');
wait(1500+random(1000));
until(InvFull);
end;
end;

CephaXz

2012-06-22 12:37:17

your login and password is in the script, remove it now.

Based Lord

2012-06-22 12:40:44

I recommend looking at how to use DTMs. They are much better for finding spells and inv objects

Abu

2012-06-22 12:41:08

Anyway, check the link in my sig to Common Scripting Errors.

Benny

2012-06-22 12:41:42

Change your pass!!!

Benny

2012-06-22 12:50:59

i tried to change it but someone was on it?!!

masterBB

2012-06-22 12:59:11

procedure AntiBan;
begin
repeat
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Magic', false);
wait(1500+Random(250));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(25+random(150));
MakeCompass('S');
wait(75+Random(150));
MakeCompass('N');
end;
//need end; to end the case
//need until(x); to end the loop
end;

You also need an begin end. for the mainloop.

anuparockz

2012-06-22 13:01:17

Damn I was so foolish!

anuparockz

2012-06-22 13:05:46

Thanks for the help you tried to do Benny. I didn't know that in villavu community, there are people who would steal if they are given the chance.

PS: I'm asking nicely, who ever took my stuff, can you please give it back?

CephaXz

2012-06-22 13:08:27

Common mistake by many of the people here. As long as you're online, there are surely people like that. Try recovering the account and tell admin the IP of last logged in, then we can know who stole it.

Jim

2012-06-22 13:09:14

How much did you lose?

anuparockz

2012-06-22 13:20:01

I lost 25m!

Benny

2012-06-22 13:26:59

Shucks dude.. I hate when people take advantage of peoples mistakes.

anuparockz

2012-06-22 13:51:26

Can someone edit this script so that it makes 27 hunter kits, banks and repeats?

Tniffoc

2012-06-22 13:54:45

From: anuparockz
Can someone edit this script so that it makes 27 hunter kits, banks and repeats?


I won't edit it but I'd be willing to help you work with it. For starters, you're missing your main loop. You have a bunch of procedures and methods defined, but you're not using them anywhere so they're kind of useless in their current form. Once you get your main loop, you should be able to do the rest of it yourself fairly easily. Keep in mind that because this is your first script, its going to fail somewhere along the way most likely, and you will have to make some edits to make it more reliable. As you become a better scripter, your scripts will continually become more complex and more reliable.