Log in

View Full Version : Need help with first script



anuparockz
06-22-2012, 04:31 PM
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
06-22-2012, 04:37 PM
your login and password is in the script, remove it now.

Based Lord
06-22-2012, 04:40 PM
I recommend looking at how to use DTMs. They are much better for finding spells and inv objects

Abu
06-22-2012, 04:41 PM
Anyway, check the link in my sig to Common Scripting Errors.

Benny
06-22-2012, 04:41 PM
Change your pass!!!

Benny
06-22-2012, 04:50 PM
i tried to change it but someone was on it?!!

masterBB
06-22-2012, 04:59 PM
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
06-22-2012, 05:01 PM
Damn I was so foolish!

anuparockz
06-22-2012, 05:05 PM
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
06-22-2012, 05:08 PM
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
06-22-2012, 05:09 PM
How much did you lose?

anuparockz
06-22-2012, 05:20 PM
I lost 25m!

Benny
06-22-2012, 05:26 PM
Shucks dude.. I hate when people take advantage of peoples mistakes.

anuparockz
06-22-2012, 05:51 PM
Can someone edit this script so that it makes 27 hunter kits, banks and repeats?

Tniffoc
06-22-2012, 05:54 PM
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.