Welcome to my first tutorial on SCAR. This tutorial will cover the always needed AntiBan procedure. What an AntiBan procedure does is that it it adds in some random stuff for the script to do, in order to keep your character from doing only certain things, like chopping a tree, over and over again, without doing anything else, making your account very conspicuous.
example-
SCAR Code:
program AntiBanageExample;
{.include SRL\SRL.scar}
Procedure ExampleOfAntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(11) of
0: begin
HoverSkill('Random', false);
wait(2453+Random(432));
end;
1: RandomRClickEvery(3 + Random(2));
2: begin
HoverSkill('Woodcutting',false);
wait(2364+Random(413));
GameTab(4);
end;
3: PickUpMouse;
4: AlmostLogOut;
5: SayCurrentLevels('Woodcutting');
6: begin
case random(4) of
0: TypeSend('Whats up?');
1: TypeSend('wc lvls?');
2: TypeSend('Woodcutting levels?');
3: TypeSend('sup?');
end;
end;
7: begin
MakeCompass('N');
wait(10+random(5));
MakeCompass('S');
wait(10+random(5));
MakeCompass('N');
end;
8: BoredEvery(10+random(5));
9: begin
LowestAngle;
wait(10+random(10));
HighestAngle;
end;
10: SleepAndMoveMouse(600000+random(400000));
end;
end.
Here's what each of the steps of the AntiBan Procedure's Case mean and do.
0- What HoverSKill does is that when you specify what skill you want the script to look, SCAR will move your mouse to the Experience GameTab, then hover over the skill that you specified. If you have it set as false, like i do, in the example, it will only hover the mouse over the skill. If set to true, it will click on the skill, then close the popup box.
1- RandomRClick makes a random right-click on the RS client. Instead of the varible of time being in milliseconds, it is in minutes.
2- Already explained in 1, but instead of specifying a certain skill, it chooses a random skill to hover.
3- For PickUpMouse SCAR simulates you picking up your mouse and setting it back down. If you try it, you notice when you pick up your mouse, the arrow moves up a bit, and when set down, moves down a bit.
4- AlmostLogOut, does what it sounds like, goes to the logout tab, hover the mouse over the logout option, then returns to the inventory tab, as if you thoght about whether or not you wanted to log out, then decided not to.
5- SayCurrentLevels retrieves your current level in the skill that you specified, then types into RS what your current level is for that skill.
6- Just chooses one of the sentences to type, and types in it RS.
7- Makes your compass point north, then south, then north again, as if you are spinning the camera
8- Moves the mouse like a bored person, again, the time is in minutes.
9- Moves the camera up, then down, as if you are just fiddling with it.
10- Moves the mouse, like a bored human, except instead of moving the mouse directly to that point, moves it randomly to the point.
These are just some of the examples of what you can have SCAR do to add some random stuff to do in your scipt, making it less suspicious that your are botting. Without an AntiBan procedure, you are most likely to get banned quite quickly, making it necessary to have one. You would use this in the main "function" of your script, like for a woodcutter script, you would put your antiban a once or twice in the the woodcutting procedure.
Along with this, there is an easy way for the person who is using the script to set the chance of the antiban procedure doing a step in the case, so that when the antiban procedure is called, it doesnt always do it 100% of the time.
example-
SCAR Code:
program AntiBanageExample;
{.include SRL\SRL.scar}
const
AntiBanageAmount= 11//Set this for the chance of Antiban to do something.
//11 is default and 100% antiban. Set to Zero for no Antiban, 21 for 50%, higher for less %
Procedure ExampleOfAntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(AntiBanageAmount) of
0: begin
HoverSkill('Random', false);
wait(2453+Random(432));
end;
1: RandomRClickEvery(3 + Random(2));
2: begin
HoverSkill('Woodcutting',false);
wait(2364+Random(413));
GameTab(4);
end;
3: PickUpMouse;
4: AlmostLogOut;
5: SayCurrentLevels('Woodcutting');
6: begin
case random(4) of
0: TypeSend('Whats up?');
1: TypeSend('wc lvls?');
2: TypeSend('Woodcutting levels?');
3: TypeSend('sup?');
end;
end;
7: begin
MakeCompass('N');
wait(10+random(5));
MakeCompass('S');
wait(10+random(5));
MakeCompass('N');
end;
8: BoredEvery(10+random(5));
9: begin
LowestAngle;
wait(10+random(10));
HighestAngle;
end;
10: SleepAndMoveMouse(600000+random(400000));
end;
end.
Notice this part of the example-
SCAR Code:
const
AntiBanageAmount= 11//Set this for the chance of Antiban to do something.
//11 is default and 100% antiban. Set to Zero for no Antiban, 20 for 50%, higher for less %
What this does is that when the const AntiBanageAmount is set, it relays this number to the amounts of steps the AntiBan case has. When it is set to 11, that mean there are 11 possible steps for the case to perform out of 11, because 11 steps have been declared in the antiban case, and you set it to 11 possible steps. if you were to set it to 21, that would mean that there is a possible 11 steps of a 20 for the case, meaning that there are 10 undefined steps in the case, and if it the procedure chooses one of those undefined steps, it doesn't do anything. it can also be set to 0, so that no antiban is performed. You can set it higher tan 21 so that it is a smaller % chance to antiban.
I do give people permission to use this as their antiban procedure, but if you do, please credit me when you use it in your script. But seriously, everyone should experiment with different different things that you can make SCAR do so that someday you could compose a great antiban procedure.
Post what u think of my first tut, anything i could add to it, anything done wrong, etc...
Esteban