PvH
05-31-2008, 06:52 AM
Hi everyone,
This is my first tutorial:)
In this tutorial you will learn:
How to make an autotyper including:
multiplayer, smart, antirandoms, antiban, a progress report and different sentences in the autotalker:D
Lets start:
You simply start with:
program New;
begin
end.
Now, give the program another name and include smart and srl.scar.
So it will look something like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
begin
end.
Why do you put smart before srl?
I do that, because smart overwrites srl.scar.. and it is the ONLY way to get it working;)
Now, lets make a few variables.
Where are they used for?
We use them to count the anitbans performed, how many times talked in this tutorial.
We also use the times talked fir multiplayer.. but I will explain that later;)
Variables are used often for variables, but also for mouse moving etc.
Lets move on.
In this tutorial, we would have something like this:
var
Talked, Antibans, TotalTalks :integer;
Var means variables.
Talked, Antibans and TotalTalks are now integers.
You simply copy this, or change the names
(MAKE SURE YOU DO THIS LATER TOO IF YOU DO SO)
below the srl.scar thing.
Your script will now look something like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
var
Talked, Antibans, TotalTalks :integer;
begin
end.
Lets make some consts.
Consts are a kind of variables, but they NEVER CHANGE!
So they arn't variables..
We need 3 messages, the smart world to load in, Signed and the run direction.
So our const will look something like this:
const
Message1 = 'message 1 here';
Message2 = 'message 2 here';
Message3 = 'message 3 here';
SmartWorld = 1; //What world to load smart in
Signed = True; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
RunDirection = 'N';//N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
You simply past it below your variables..
So now your script will look like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
var
Talked, Antibans, TotalTalks :integer;
const
Message1 = 'message 1 here';
Message2 = 'message 2 here';
Message3 = 'message 3 here';
SmartWorld = 1; //What world to load smart in
Signed = True; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
RunDirection = 'N';//N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
begin
end.
Now it is time to add declareplayers.
I guess you already heard of it.
It is the most used way to make accounts login into runescape by using srl.
Lets have a look at it.
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username'; //your runescape account
Players[0].Pass := 'password'; // your runescape password of your account
Players[0].Nick := 'ser';
//3 or 4 letters of the name, used for finding randoms
//zezima would be ezi for example
Players[0].Active := True;
//do you want this account to auto? true = yes, false = no
end;
procedure Declareplayers is the name of the procedure.
Begin tells scar that there are some things coming which scar needs to do/remember.
HowManyPlayers := 1; is the ammount of players you have.
NumberOfPlayers(HowManyPlayers); Is for srl. It tells srl how many players you filled in at HowManyPlayers:=1;.
CurrentPlayer := 0; is the number of the player you want to start autoing with.
Players[0].Name := 'username'; //your runescape account Is your runescape account. You simply put your name in the place where I putted username;)
Players[0].Pass := 'password'; This is the same as for the above thing.. But now with your password of your runescape account.
Players[0].Nick := 'ser'; Is your nickname.
This is 3 letters of your name (lowercase).
Nicknames are VERY important. They search for antirandoms, and srl will solve them (if you have that in your script).
Players[0].Active := True; tells srl if this account is going to auto or not.
True means yes, False means no.
end; tells scar the he doesn't need to remember/do anything anymore.
But if ou have more begins (we don't have that here).
It will stop doing something from the last begin.. and will continue from the first begin..
So you need to put another end; for it;)
Lets make our first antirandom thing.. the fightavoider!
Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Successfully ran away from fight!');
end;
end;
end;
Let me explain this:
Procedure FindFightEx; is the name of the procedure.
Begin is what you have learned before;)
If(FindFight) then searches for a fight. Srl does this.
Begin is what you have learned before.
Status('Fight found!'); changes the status in the scar window to Fight found!
It is below your debug window in scar;)
Writeln('Our player is being attacked!') will write out : player is being attacked! in the debug window in scar.
Writeln('Lets run away!') same as above.. just another sentence.
Begin is what you have learned before.
Status('Running away!'); same as the other status.. just another sentence.
Writeln('Running....'); is the same as you learned before about writeln's.
RunAway(RunDirection,False,1,8000+Random(3000)) this is something new.
This runs away, not far (that is where false is for... to the rundirection (which you made in the const) and waits 8000 miliseconds (8 seconds) and 3000 random miliseconds (3 seconds) and then will run back.
Writeln('Successfully ran away from fight!'); is what you have learned before.
end; is what you have learned before.
end; is what you have learned before.
end; is what you have learned before.
Good job! You just made your own fightavoider!
Now lets move on to an antirandoms procedure.
I recommend using this:
Procedure AntiRandoms;
var
i : Integer;
Begin
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;
Since it never fails:p
Let me explain it;)
Procedure AntiRandoms; is the name
var is variables, you learned that before.
i: Integer; creates a new integer, as learned before.. but now ONLY in this procedure.
Begin is what you learned before.
Status('Doing AntiRandoms'); Does changes the status, as learned before
for i := 0 to 3 do is something new.
You made an integer, i.
for i := 0 to 3 do will do 4 things.
Now I guess you think:
:O I count 3!
Yes, but you started at 0;)
0,1,2,3 is 4.:)
So it will do 4 things;)
It will do these things.
FindNormalRandoms; Searches for all talking and inventory randoms, made in srl. If found.. it will solve them (if possible).
FindFightEx; is the procedure you made:D
If it finds a fight.. it will run away and come back later.
FindNonInventoryRandoms; also solves randoms, made in srl.
wait(1); waits 1 millisecond.
Now the variable i did 4 things.. so it won't do anything anymore.
end; is what you learned before.
Good job.. you made an antirandoms procedure:spot:
Lets move on to Antiban.
Why antiban?
Antiban makes you look like a normal player.
Lets have a look at this example.
Of course you can change things;)
procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(68) of
0:
begin
HoverSkill('Mining', False);
Antibans:=Antibans+1;
end;
1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;
3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;
4:
begin
AlmostLogout;
Antibans:=Antibans+1;
end;
5:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;
Looks difficult?
No.. It isn't;)
Let me explain it:)
procedure Antiban; is the name
begin is what you have learned before.
if not LoggedIn then Exit; This will search if you are logged in or not.. If you are logged in, it will do the procedure.. If you are logged out.. It exits the procedure and won't do the procedure.
case Random(68) of
This does 1 thing of 68 options..
Now I guess you think:
:O We only got 6 options!
Yes.. thats true.. and thats what we want:)
When you play runescape legit.. You don't hover over skills always.. And things like that..
So now, the chance of doing antiban is just how it would be normal;)
0:
begin
HoverSkill('Mining', False);
Antibans:=Antibans+1;
end;
This is the first option of the 68.
If it chooses to do this one..
It will hover the skill mining, and will add 1 to Antibans (which we need in the progress report later;)
Let me explain this.
0: Is the number of the option.
begin is what we learned before.
HoverSkill('Mining', False); hovers over the mining skill, but won't click;)It will look like you are checking your exp.
Antibans:=Antibans+1;
This means: thats we add 1 to the Antibans.
Let me explain this more..
If Antibans is 5 now.. It will look like this:
Antibans:=5+1 So now Antibans is 6;)
end; is what we learned before.
You can change this mining to another skill if you want;)
1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;
This is the same as above.. just with the smithing skill;)
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;
This will click a random gametab (magic for example), wait a few about 1 second, click on the inventory gametab and add 1 to the Antibans.
Let me explain this:
2: Is the number.
begin is what we learned before.
GameTab(1 + Random(12));
This will click gametab 1+ a random 12..
So if it chooses 3 of the random 12..
It will click: 1+3 = 4 .
So it will click gametab 4 then.
wait(800 + random(500));
This waits 800 milliseconds and a random 500 miliseconds.
GameTab(4); Clicks on the inventory gametab
Antibans:=Antibans+1; I explained this above.
end; is what we learned before.
3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;
This will examine things and add 1 to the Antibans..
BoredHuman; Is made in srl and examines things and moves the mouse randomly.
I won't explain option 3 more, since we already know everything.
4:
begin
AlmostLogout;
Antibans:=Antibans+1;
end;
This will look like the player wants to logout..
It will hover over: "Click here to logout", but then it goes on with the script:p
This is all done with AlmostLogout; which is made in srl.
I won't explain option 4 more, since we already know everything.
5:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;// closes option 5
end; // closes the random case
end; // closes the first begin, at the beginning of the procedure
This will do a random emote.
that is all made in DoEmote (numbers here) in srl.
I won't explain anything more of this function, since we already know it;)
Good job.. You just made your first antiban:D
Now we come to the part of.... AutoTalking:)
I used this procedure:
procedure AutoTalk;
begin
if not LoggedIn then Exit;
case Random(3) of
0: Typesend(Message1);
1: Typesend(Message2);
2: Typesend(Message3);
end;
Talked:= Talked+1;
TotalTalks:=TotalTalks+1;
end;
It is pretty simple.. Let me explain it;)
procedure AutoTalk; Is the name of the procedure.
begin is what you learned before.
if not LoggedIn then Exit; checks if you are logged in or not.. explained before;)
case Random(3) of Chooses 1 of the 3 options.
Now I bet you think:
:O But in antiban... we made it miss some things.. and.. here.. it will always choose one.
True.. But here we want to talk always.. and in antiban, we don't want that;)
0: Typesend(Message1); Is the first option, and will type message1 (which you made in const).
Now you might think:
:O don't we need begin's and end's here=O
No, we don't need them.. since we just give 1 command to scar;)
1: Typesend(Message2); is the same as the first option..
The only difference is that it types message 2 and has another option number.
2: Typesend(Message3);Same as for option 2.. only another sentence and another option number.
end;//closes the case is what we learned before;)
Talked:= Talked+1; is the same as we did in the antiban procedure..We add 1 to the Talked.
TotalTalks:=TotalTalks+1;Same as above.. but now we add it To TotalTalks.
end; is what we learned before.
Good job! You made it talking:)
Time to make a progress report;)
Lets have a look at this:
procedure Proggy;
begin
cleardebug;
writeln('+++++++++++++++++++++++++++++++++++++');
writeln('Talked ' +IntToStr(TotalTalks)+' Times!');
writeln('Performed '+IntToStr(Antibans)+' Antibans');
writeln('Ran for ' +TimeRunning);
writeln('+++++++++++++++++++++++++++++++++++++');
end;
Does it look hard?
No.. Let me explain it;)
procedure Proggy; is the name of the procedure.
begin is what we learned before.
cleardebug; clears the debug in scar.
writeln('+++++++++++++++++++++++++++++++++++++'); writes ++++++++++++++++++++++++++++++++++++++ in the debug in scar.
writeln('Talked ' +IntToStr(TotalTalks)+' Times!');
This will write Talked xxxx Times! in the debug.
+IntToStr(TotalTalks)+ tells scar to give the number of the integer TotalTalks. So if That number is 3.. It will look like this:
Talked 3 Times!
writeln('Performed '+IntToStr(Antibans)+' Antibans'); is the same as above.. just with another integer and another sentence;)
writeln('Ran for ' +TimeRunning); will write the time the script is running.
+TimeRunningwill tell the time it is running.
This is counted in scar;)
writeln('+++++++++++++++++++++++++++++++++++++'); same as a few lines above;)
end; is what have we learned already:garfield:
Good job! You now made a progress report;)
Now lets make the script have smart..
I recommend not changing it.
procedure SetUpSmart;
begin
smartSetupex(SmartWorld, False, Signed);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
end;
This sets up scar in SmartWorld (the number you gave it in const) with Signed (You told scar True or not in the const.. true = signed.. false = unsigned).
Lets make a procedure called mainloop;)
procedure mainloop;
begin
repeat
if Talked >= 25 then
begin
writeln('We talked 25 times, next player!');
NextPlayer(True);
Talked:=Talked-Talked;
mainloop;
end;
AutoTalk;
AntiRandoms;
Antiban;
AntiRandoms;
Proggy;
until(false);
end;
This will talk, check for randoms, do antiban, do antirandoms again and give a progress report.. and repeat that.
It will also check if you talked 25 times.. if so.. it will go to the next player;)
Let me explain this:
procedure mainloop; is the name of the procedure.
begin is what we learned before.
repeattells scar to repeat this
if Talked >= 25 thenchecks if the integer Talked is 25.
Since we add 1 to that integer, every time we talk it will do that if we talked 25 times;)
If it talked 25 times.. it will do this:
begin is what we learned before.
writeln('We talked 25 times, next player!'); writes in the debug of scar.. you learned that before;)
NextPlayer(True); will log you out.. and log in the next player:)
Talked:=Talked-Talked;sets the integer talked to 0, so it won't logout since the integer would be 25;)
mainloop; calls the procedure mainloop again.. so it will start talking and things;)
end; is what we learned before;)
AutoTalk; calls the procedure Autotalk and starts talking.
AntiRandoms; calls the procedure AntiRandoms and will search for randoms.
Antiban; calls the procedure Antiban and will do antiban.
AntiRandoms;is the same as 2 lines above.
Proggy;calls the procedure Proggy and will write down a progress report in the debug box of scar.
until(false);makes the repeat go until we can't do it anymore.
end; is what we learned before.
We now got the script almost done.
Lets make it do it..
so saw the
begin
end. ?
That is the scar mainloop.
It will do everything there stands..
begin
DeclarePlayers;
SetUpSmart;
SetupSRL;
LoginPlayer;
SetAngle(true);
MakeCompass('N');
mainloop;
end.
begin we learned that before.
DeclarePlayers; calls the DeclarePlayers procedure and loads your accounts.
SetUpSmart; sets up smart.
SetupSRL;will setup srl.
LoginPlayer; will login your first player.
SetAngle(true); moves your compass up.
MakeCompass('N'); will make your compass north.
mainloop; calls the procedure mainloop and will start typing and things.
end. is the end of the scar mainloop.
Your script will now look like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
var
Talked, Antibans, TotalTalks :integer;
const
Message1 = 'message 1 here';
Message2 = 'message 2 here';
Message3 = 'message 3 here';
SmartWorld = 1; //What world to load smart in
Signed = True; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
RunDirection = 'N';//N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username'; //your runescape account
Players[0].Pass := 'password'; // your runescape password of your account
Players[0].Nick := 'ser'; //3 or 4 letters of the name, used for finding randoms
//zezima would be ezi for example
Players[0].Active := True; //do you want this account to auto? true = yes, false = no
end;
Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Successfully ran away from fight!');
end;
end;
end;
Procedure AntiRandoms;
var
i : Integer;
Begin
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;
procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(68) of
0:
begin
HoverSkill('Mining', False);
Antibans:=Antibans+1;
end;
1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;
3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;
4:
begin
AlmostLogout;
Antibans:=Antibans+1;
end;
5:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;
procedure AutoTalk;
begin
if not LoggedIn then Exit;
case Random(3) of
0: Typesend(Message1);
1: Typesend(Message2);
2: Typesend(Message3);
end;
Talked:= Talked+1;
TotalTalks:=TotalTalks+1;
end;
procedure Proggy;
begin
cleardebug;
writeln('+++++++++++++++++++++++++++++++++++++');
writeln('Talked ' +IntToStr(TotalTalks)+' Times!');
writeln('Performed '+IntToStr(Antibans)+' Antibans');
writeln('Ran for ' +TimeRunning);
writeln('+++++++++++++++++++++++++++++++++++++');
end;
procedure SetUpSmart;
begin
smartSetupex(SmartWorld, False, Signed);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
end;
procedure mainloop;
begin
repeat
if Talked >= 25 then
begin
writeln('We talked 25 times, next player!');
NextPlayer(True);
Talked:=Talked-Talked;
mainloop;
end;
AutoTalk;
AntiRandoms;
Antiban;
AntiRandoms;
Proggy;
until(false);
end;
begin
DeclarePlayers;
SetUpSmart;
SetupSRL;
LoginPlayer;
SetAngle(true);
MakeCompass('N');
mainloop;
end.
Good job!
You made your first autotalker..
Please leave a comment, post bugs.
If you liked the tut.. you can always rep++ me and 5star rate the tread:rolleyes:
Thanks for reading!
This is my first tutorial:)
In this tutorial you will learn:
How to make an autotyper including:
multiplayer, smart, antirandoms, antiban, a progress report and different sentences in the autotalker:D
Lets start:
You simply start with:
program New;
begin
end.
Now, give the program another name and include smart and srl.scar.
So it will look something like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
begin
end.
Why do you put smart before srl?
I do that, because smart overwrites srl.scar.. and it is the ONLY way to get it working;)
Now, lets make a few variables.
Where are they used for?
We use them to count the anitbans performed, how many times talked in this tutorial.
We also use the times talked fir multiplayer.. but I will explain that later;)
Variables are used often for variables, but also for mouse moving etc.
Lets move on.
In this tutorial, we would have something like this:
var
Talked, Antibans, TotalTalks :integer;
Var means variables.
Talked, Antibans and TotalTalks are now integers.
You simply copy this, or change the names
(MAKE SURE YOU DO THIS LATER TOO IF YOU DO SO)
below the srl.scar thing.
Your script will now look something like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
var
Talked, Antibans, TotalTalks :integer;
begin
end.
Lets make some consts.
Consts are a kind of variables, but they NEVER CHANGE!
So they arn't variables..
We need 3 messages, the smart world to load in, Signed and the run direction.
So our const will look something like this:
const
Message1 = 'message 1 here';
Message2 = 'message 2 here';
Message3 = 'message 3 here';
SmartWorld = 1; //What world to load smart in
Signed = True; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
RunDirection = 'N';//N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
You simply past it below your variables..
So now your script will look like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
var
Talked, Antibans, TotalTalks :integer;
const
Message1 = 'message 1 here';
Message2 = 'message 2 here';
Message3 = 'message 3 here';
SmartWorld = 1; //What world to load smart in
Signed = True; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
RunDirection = 'N';//N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
begin
end.
Now it is time to add declareplayers.
I guess you already heard of it.
It is the most used way to make accounts login into runescape by using srl.
Lets have a look at it.
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username'; //your runescape account
Players[0].Pass := 'password'; // your runescape password of your account
Players[0].Nick := 'ser';
//3 or 4 letters of the name, used for finding randoms
//zezima would be ezi for example
Players[0].Active := True;
//do you want this account to auto? true = yes, false = no
end;
procedure Declareplayers is the name of the procedure.
Begin tells scar that there are some things coming which scar needs to do/remember.
HowManyPlayers := 1; is the ammount of players you have.
NumberOfPlayers(HowManyPlayers); Is for srl. It tells srl how many players you filled in at HowManyPlayers:=1;.
CurrentPlayer := 0; is the number of the player you want to start autoing with.
Players[0].Name := 'username'; //your runescape account Is your runescape account. You simply put your name in the place where I putted username;)
Players[0].Pass := 'password'; This is the same as for the above thing.. But now with your password of your runescape account.
Players[0].Nick := 'ser'; Is your nickname.
This is 3 letters of your name (lowercase).
Nicknames are VERY important. They search for antirandoms, and srl will solve them (if you have that in your script).
Players[0].Active := True; tells srl if this account is going to auto or not.
True means yes, False means no.
end; tells scar the he doesn't need to remember/do anything anymore.
But if ou have more begins (we don't have that here).
It will stop doing something from the last begin.. and will continue from the first begin..
So you need to put another end; for it;)
Lets make our first antirandom thing.. the fightavoider!
Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Successfully ran away from fight!');
end;
end;
end;
Let me explain this:
Procedure FindFightEx; is the name of the procedure.
Begin is what you have learned before;)
If(FindFight) then searches for a fight. Srl does this.
Begin is what you have learned before.
Status('Fight found!'); changes the status in the scar window to Fight found!
It is below your debug window in scar;)
Writeln('Our player is being attacked!') will write out : player is being attacked! in the debug window in scar.
Writeln('Lets run away!') same as above.. just another sentence.
Begin is what you have learned before.
Status('Running away!'); same as the other status.. just another sentence.
Writeln('Running....'); is the same as you learned before about writeln's.
RunAway(RunDirection,False,1,8000+Random(3000)) this is something new.
This runs away, not far (that is where false is for... to the rundirection (which you made in the const) and waits 8000 miliseconds (8 seconds) and 3000 random miliseconds (3 seconds) and then will run back.
Writeln('Successfully ran away from fight!'); is what you have learned before.
end; is what you have learned before.
end; is what you have learned before.
end; is what you have learned before.
Good job! You just made your own fightavoider!
Now lets move on to an antirandoms procedure.
I recommend using this:
Procedure AntiRandoms;
var
i : Integer;
Begin
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;
Since it never fails:p
Let me explain it;)
Procedure AntiRandoms; is the name
var is variables, you learned that before.
i: Integer; creates a new integer, as learned before.. but now ONLY in this procedure.
Begin is what you learned before.
Status('Doing AntiRandoms'); Does changes the status, as learned before
for i := 0 to 3 do is something new.
You made an integer, i.
for i := 0 to 3 do will do 4 things.
Now I guess you think:
:O I count 3!
Yes, but you started at 0;)
0,1,2,3 is 4.:)
So it will do 4 things;)
It will do these things.
FindNormalRandoms; Searches for all talking and inventory randoms, made in srl. If found.. it will solve them (if possible).
FindFightEx; is the procedure you made:D
If it finds a fight.. it will run away and come back later.
FindNonInventoryRandoms; also solves randoms, made in srl.
wait(1); waits 1 millisecond.
Now the variable i did 4 things.. so it won't do anything anymore.
end; is what you learned before.
Good job.. you made an antirandoms procedure:spot:
Lets move on to Antiban.
Why antiban?
Antiban makes you look like a normal player.
Lets have a look at this example.
Of course you can change things;)
procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(68) of
0:
begin
HoverSkill('Mining', False);
Antibans:=Antibans+1;
end;
1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;
3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;
4:
begin
AlmostLogout;
Antibans:=Antibans+1;
end;
5:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;
Looks difficult?
No.. It isn't;)
Let me explain it:)
procedure Antiban; is the name
begin is what you have learned before.
if not LoggedIn then Exit; This will search if you are logged in or not.. If you are logged in, it will do the procedure.. If you are logged out.. It exits the procedure and won't do the procedure.
case Random(68) of
This does 1 thing of 68 options..
Now I guess you think:
:O We only got 6 options!
Yes.. thats true.. and thats what we want:)
When you play runescape legit.. You don't hover over skills always.. And things like that..
So now, the chance of doing antiban is just how it would be normal;)
0:
begin
HoverSkill('Mining', False);
Antibans:=Antibans+1;
end;
This is the first option of the 68.
If it chooses to do this one..
It will hover the skill mining, and will add 1 to Antibans (which we need in the progress report later;)
Let me explain this.
0: Is the number of the option.
begin is what we learned before.
HoverSkill('Mining', False); hovers over the mining skill, but won't click;)It will look like you are checking your exp.
Antibans:=Antibans+1;
This means: thats we add 1 to the Antibans.
Let me explain this more..
If Antibans is 5 now.. It will look like this:
Antibans:=5+1 So now Antibans is 6;)
end; is what we learned before.
You can change this mining to another skill if you want;)
1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;
This is the same as above.. just with the smithing skill;)
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;
This will click a random gametab (magic for example), wait a few about 1 second, click on the inventory gametab and add 1 to the Antibans.
Let me explain this:
2: Is the number.
begin is what we learned before.
GameTab(1 + Random(12));
This will click gametab 1+ a random 12..
So if it chooses 3 of the random 12..
It will click: 1+3 = 4 .
So it will click gametab 4 then.
wait(800 + random(500));
This waits 800 milliseconds and a random 500 miliseconds.
GameTab(4); Clicks on the inventory gametab
Antibans:=Antibans+1; I explained this above.
end; is what we learned before.
3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;
This will examine things and add 1 to the Antibans..
BoredHuman; Is made in srl and examines things and moves the mouse randomly.
I won't explain option 3 more, since we already know everything.
4:
begin
AlmostLogout;
Antibans:=Antibans+1;
end;
This will look like the player wants to logout..
It will hover over: "Click here to logout", but then it goes on with the script:p
This is all done with AlmostLogout; which is made in srl.
I won't explain option 4 more, since we already know everything.
5:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;// closes option 5
end; // closes the random case
end; // closes the first begin, at the beginning of the procedure
This will do a random emote.
that is all made in DoEmote (numbers here) in srl.
I won't explain anything more of this function, since we already know it;)
Good job.. You just made your first antiban:D
Now we come to the part of.... AutoTalking:)
I used this procedure:
procedure AutoTalk;
begin
if not LoggedIn then Exit;
case Random(3) of
0: Typesend(Message1);
1: Typesend(Message2);
2: Typesend(Message3);
end;
Talked:= Talked+1;
TotalTalks:=TotalTalks+1;
end;
It is pretty simple.. Let me explain it;)
procedure AutoTalk; Is the name of the procedure.
begin is what you learned before.
if not LoggedIn then Exit; checks if you are logged in or not.. explained before;)
case Random(3) of Chooses 1 of the 3 options.
Now I bet you think:
:O But in antiban... we made it miss some things.. and.. here.. it will always choose one.
True.. But here we want to talk always.. and in antiban, we don't want that;)
0: Typesend(Message1); Is the first option, and will type message1 (which you made in const).
Now you might think:
:O don't we need begin's and end's here=O
No, we don't need them.. since we just give 1 command to scar;)
1: Typesend(Message2); is the same as the first option..
The only difference is that it types message 2 and has another option number.
2: Typesend(Message3);Same as for option 2.. only another sentence and another option number.
end;//closes the case is what we learned before;)
Talked:= Talked+1; is the same as we did in the antiban procedure..We add 1 to the Talked.
TotalTalks:=TotalTalks+1;Same as above.. but now we add it To TotalTalks.
end; is what we learned before.
Good job! You made it talking:)
Time to make a progress report;)
Lets have a look at this:
procedure Proggy;
begin
cleardebug;
writeln('+++++++++++++++++++++++++++++++++++++');
writeln('Talked ' +IntToStr(TotalTalks)+' Times!');
writeln('Performed '+IntToStr(Antibans)+' Antibans');
writeln('Ran for ' +TimeRunning);
writeln('+++++++++++++++++++++++++++++++++++++');
end;
Does it look hard?
No.. Let me explain it;)
procedure Proggy; is the name of the procedure.
begin is what we learned before.
cleardebug; clears the debug in scar.
writeln('+++++++++++++++++++++++++++++++++++++'); writes ++++++++++++++++++++++++++++++++++++++ in the debug in scar.
writeln('Talked ' +IntToStr(TotalTalks)+' Times!');
This will write Talked xxxx Times! in the debug.
+IntToStr(TotalTalks)+ tells scar to give the number of the integer TotalTalks. So if That number is 3.. It will look like this:
Talked 3 Times!
writeln('Performed '+IntToStr(Antibans)+' Antibans'); is the same as above.. just with another integer and another sentence;)
writeln('Ran for ' +TimeRunning); will write the time the script is running.
+TimeRunningwill tell the time it is running.
This is counted in scar;)
writeln('+++++++++++++++++++++++++++++++++++++'); same as a few lines above;)
end; is what have we learned already:garfield:
Good job! You now made a progress report;)
Now lets make the script have smart..
I recommend not changing it.
procedure SetUpSmart;
begin
smartSetupex(SmartWorld, False, Signed);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
end;
This sets up scar in SmartWorld (the number you gave it in const) with Signed (You told scar True or not in the const.. true = signed.. false = unsigned).
Lets make a procedure called mainloop;)
procedure mainloop;
begin
repeat
if Talked >= 25 then
begin
writeln('We talked 25 times, next player!');
NextPlayer(True);
Talked:=Talked-Talked;
mainloop;
end;
AutoTalk;
AntiRandoms;
Antiban;
AntiRandoms;
Proggy;
until(false);
end;
This will talk, check for randoms, do antiban, do antirandoms again and give a progress report.. and repeat that.
It will also check if you talked 25 times.. if so.. it will go to the next player;)
Let me explain this:
procedure mainloop; is the name of the procedure.
begin is what we learned before.
repeattells scar to repeat this
if Talked >= 25 thenchecks if the integer Talked is 25.
Since we add 1 to that integer, every time we talk it will do that if we talked 25 times;)
If it talked 25 times.. it will do this:
begin is what we learned before.
writeln('We talked 25 times, next player!'); writes in the debug of scar.. you learned that before;)
NextPlayer(True); will log you out.. and log in the next player:)
Talked:=Talked-Talked;sets the integer talked to 0, so it won't logout since the integer would be 25;)
mainloop; calls the procedure mainloop again.. so it will start talking and things;)
end; is what we learned before;)
AutoTalk; calls the procedure Autotalk and starts talking.
AntiRandoms; calls the procedure AntiRandoms and will search for randoms.
Antiban; calls the procedure Antiban and will do antiban.
AntiRandoms;is the same as 2 lines above.
Proggy;calls the procedure Proggy and will write down a progress report in the debug box of scar.
until(false);makes the repeat go until we can't do it anymore.
end; is what we learned before.
We now got the script almost done.
Lets make it do it..
so saw the
begin
end. ?
That is the scar mainloop.
It will do everything there stands..
begin
DeclarePlayers;
SetUpSmart;
SetupSRL;
LoginPlayer;
SetAngle(true);
MakeCompass('N');
mainloop;
end.
begin we learned that before.
DeclarePlayers; calls the DeclarePlayers procedure and loads your accounts.
SetUpSmart; sets up smart.
SetupSRL;will setup srl.
LoginPlayer; will login your first player.
SetAngle(true); moves your compass up.
MakeCompass('N'); will make your compass north.
mainloop; calls the procedure mainloop and will start typing and things.
end. is the end of the scar mainloop.
Your script will now look like this:
program FirstAutoTalker;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
var
Talked, Antibans, TotalTalks :integer;
const
Message1 = 'message 1 here';
Message2 = 'message 2 here';
Message3 = 'message 3 here';
SmartWorld = 1; //What world to load smart in
Signed = True; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
RunDirection = 'N';//N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username'; //your runescape account
Players[0].Pass := 'password'; // your runescape password of your account
Players[0].Nick := 'ser'; //3 or 4 letters of the name, used for finding randoms
//zezima would be ezi for example
Players[0].Active := True; //do you want this account to auto? true = yes, false = no
end;
Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Successfully ran away from fight!');
end;
end;
end;
Procedure AntiRandoms;
var
i : Integer;
Begin
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;
procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(68) of
0:
begin
HoverSkill('Mining', False);
Antibans:=Antibans+1;
end;
1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;
3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;
4:
begin
AlmostLogout;
Antibans:=Antibans+1;
end;
5:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;
procedure AutoTalk;
begin
if not LoggedIn then Exit;
case Random(3) of
0: Typesend(Message1);
1: Typesend(Message2);
2: Typesend(Message3);
end;
Talked:= Talked+1;
TotalTalks:=TotalTalks+1;
end;
procedure Proggy;
begin
cleardebug;
writeln('+++++++++++++++++++++++++++++++++++++');
writeln('Talked ' +IntToStr(TotalTalks)+' Times!');
writeln('Performed '+IntToStr(Antibans)+' Antibans');
writeln('Ran for ' +TimeRunning);
writeln('+++++++++++++++++++++++++++++++++++++');
end;
procedure SetUpSmart;
begin
smartSetupex(SmartWorld, False, Signed);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
end;
procedure mainloop;
begin
repeat
if Talked >= 25 then
begin
writeln('We talked 25 times, next player!');
NextPlayer(True);
Talked:=Talked-Talked;
mainloop;
end;
AutoTalk;
AntiRandoms;
Antiban;
AntiRandoms;
Proggy;
until(false);
end;
begin
DeclarePlayers;
SetUpSmart;
SetupSRL;
LoginPlayer;
SetAngle(true);
MakeCompass('N');
mainloop;
end.
Good job!
You made your first autotalker..
Please leave a comment, post bugs.
If you liked the tut.. you can always rep++ me and 5star rate the tread:rolleyes:
Thanks for reading!