NiCbaZ
2008-04-10 22:45:37
Welcome to my first TuT
I am not much of a scripter so this for the very basic scripting
Logging Your Player In
When you open up scar you will have this.
program New;
begin
end.Name your Program (please note do not put any spaces in the program name or you will get an error..
Also PLease not there are prob heaps better ways to do all this i am not much of a scripter and not that good so bare with me…
program login;
begin
end.when your scripting make sure you always include
{.include SRl/SRl.scar}
so you should now have
program New;
{.include SRl/SRl.scar}
procedure
begin
now we need to make a Players procedure
name the procedure Declare Players
procedure Declareplayers;then add in the procedure which is this
..
begin
HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;
Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'ser';// 3 letters from the middle of your username
Players[0].Active := True;
end;
simple yes?
after that procedure go down a few lines and make your mainloop
put a begin in the script like this
begin
HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;
Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'ser';// 3 letters from the middle of your username
Players[0].Active := True;
end;
begin
now before you do anything you have to setup the SRL so in the mainloop you need to add setup SRL under begin like this
begin
setupSRL;
now we add in the players procedure into the mainloop
begin
setupSRL;
DeclarePlayers;
now we have to login that player
begin
setupSRL;
DeclarePlayers;
LoginPlayersimple yes?
so your script should look like
program New;
{.include SRl/SRl.scar}
procedure DeclarePlayers;
begin
HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;
Players[0].Name := 'user';
Players[0].Pass := 'pass';
Players[0].Nick := 'ser';
Players[0].Active := True;
Players[0].Integers[0]:= 100; //Loads to Do;
end;
begin
setupSRL;
DeclarePlayers;
LoginPlayer;
end.Note: always remember to add semi-columns after almost every line!
ok so now that will logg your player in.. from then on to add things into you script all you have to do is add the procedure in then add it into the mainloop!
say if your doing a dranor cutter you would make a new procedure called
procedure WalkToTreethen add in the procedure the easy way to walk around in this part of runescape is symbles so we want the script to walk to the fishing symble near the willow trees in dranor so we would do this.. wait but before we do anything with x, y in it we need to add a var into ou script so at the start of the script before declare players add this line in
var
x, y:integer;your script should look like this
program New;
{.include SRl/SRl.scar}
var
x, y:integer;
procedure DeclarePlayers;
begin
HowManyPlayers :=1
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0]:= 100; //Loads to Do;
end;
procedure WalkToTree
begin
begin
setupSRL;
DeclarePlayers;
LoginPlayer;
end.add in the walking procedure which will be symbles so we will be useing this
if(FindSymbol(x,y,'fish'))then
Mouse(x,y,2,2,true);
Fflag(5);it will find the symble and wait till we walk to it the Fflag(5) is what makes it walk all the way to the symble before going onto the next part of the scriptso add that to your script and main loop your script should look like this
program New;
{.include SRl/SRl.scar}
var
x, y:integer;
procedure DeclarePlayers;
begin
HowManyPlayers :=1;
NumberOfPlayers (HowManyPlayers);
CurrentPlayer :=0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0]:= 100; //Loads to Do;
end;
procedure WalkToTree
begin
if(FindSymbol(x,y,'fish'))then
Mouse(x,y,2,2,true);
Fflag(5);
end;
begin
setupSRL;
DeclarePlayers;
Wait(1000)
LoginPlayer;
WalkToTree
end.Well thats most of the TuT so far Next section i will be telling you about anti ban and anti randoms and how to use them in your script.
thanks