PDA

View Full Version : AntiBan Tut



Esteban
06-24-2007, 02:10 AM
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-


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-


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-

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

BobboHobbo
06-24-2007, 03:13 AM
Never use talking in antiban. Because it might repeat the same thing after each other and will look very boty.

ZephyrsFury
06-24-2007, 03:17 AM
lol good tut.

just one thing:
10: SleepAndMoveMouse(500000+random(1500000));


isn't waiting 8 mins 20 secs plus a random 25 mins a bit long lol.

and also, since you put random(11); the script will do antiban every time the procedure is called. if you make it say random(21); its will only go antiban 50% of the time.

other than that good tut ;) , it will help all the new scripters with their antiban procedures.

Esteban
06-24-2007, 04:14 AM
well if the case was increased to 21, but only 11 steps of the case were called for, making it a 50% chance for antiban, and the chat step of the case being a random of 4 cases, i doubt it would repeat the same sentence twice.

Added a part explaining how to use consts to set the antiban %. Changed the SleepAndMoveMouse to max of 10 mins.

ZephyrsFury
06-24-2007, 06:40 AM
you haven't made the script do anything with the antibanageamount const yet. i think you wanted to make it Random(AntiBanageAmount); or something.

Esteban
06-24-2007, 03:05 PM
oh geez. whoops. That'll get a fixing.

the flea
06-25-2007, 03:32 PM
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


this will make it exit the procedure eve if you are logged in... you need


Procedure ExampleOfAntiBan;
begin
if(not(LoggedIn))then
begin
Exit;
end;
case Random(AntiBanageAmount) of

Esteban
06-25-2007, 10:53 PM
I'm pretty sure that it is the correct setup, i have seen it set up that way in many scripts, and i have seen it displayed that way in tutorials containing antiban.

kemico2
06-26-2007, 10:25 PM
This is a wonderfull tutorial i havent seen one yet on antiban. Thank you very much for making it. I use this all the time.

Esteban
06-26-2007, 11:43 PM
heh, thanks man, and yea, i haven't seen much of AntiBan tutorials, except for one in beginner, but it goes along with an AntiRandoms Tut, so that's why i'm guessing it's in beginner.

sukomabawls
07-12-2007, 05:52 AM
cool, this will help on my autofighter coming soon! i'll give you full credit for antiban , thanks.

Esteban
07-13-2007, 01:35 AM
yea, like I said, anyone may feel free to use this as their antiban, as long as they credit me as the one who put it together. If you need some ideas for you own antiban, look in SRL\SRL\core\antiban.scar

idk why, but for some reason, for all the procedures i use in procedure antiban; that are in the extended file of antiban in SRL, i get a unknown identifier error. I tried using {.include SRL\SRL\extended\xantiban.scar} but that doesn't work either.

Haxor
07-13-2007, 11:23 PM
hmmmm seems cool. a thing you could add is a auto responder.

haxor

Esteban
07-13-2007, 11:39 PM
That is usually a procedure in itself, but i could add an auto responder procedure ;). I'll add the one i'll be using in EZChopper i'll be releasing soon.

destroyface
07-19-2007, 02:51 AM
i completly copy and paste ur script in my scar and it says Line 9: [Error] (14458:1): Semicolon (';') expected in script

Esteban
07-19-2007, 02:57 AM
it would be something like this-


Program Whatever;

Procedure Antiban;
begin
//Antiban stuff in here
end;

Procedure RestOfScript;
begin
//Rest of the script here
end;

begin
Antiban;
RestOfScript;
end.

ZephyrsFury
07-19-2007, 03:08 AM
idk why, but for some reason, for all the procedures i use in procedure antiban; that are in the extended file of antiban in SRL, i get a unknown identifier error. I tried using {.include SRL\SRL\extended\xantiban.scar} but that doesn't work either.

The reason xAntiBan doesn't work is because it needs PolyGlotTalk or something. That appears in xAutoTalk.scar so you need to add that BEFORE you add xAntiBan.scar in your includes.

Ie.

program New;
{.include SRL/SRL.scar}
{.include SRL/SRL/extended/xAutoTalk.scar}
{.include SRL/SRL/extended/xAntiBan.scar}

Esteban
07-19-2007, 03:23 AM
Really? but shouldn't {.include SRL/SRL.scar} include Antiban.scar anyways?

ZephyrsFury
07-19-2007, 03:49 AM
{.include SRL/SRL.scar} doesn't include any extra's such as xAntiBan.scar or xAutoTalk.scar. I believe you were talking of an unknown identifier while using xAntiBan.scar in the posts above.

Esteban
07-19-2007, 03:53 AM
Well the thing is, i had SRL included along with Xantiban.scar, and what i was saying was that i shouldn't need to include antiban.scar because I believe that is included by including SRL, but correct me if I am mistaken.

ZephyrsFury
07-19-2007, 04:03 AM
Yea your right. I'm just telling you that the reason for your unknown identifier is probably because you need to add xAutoTalk.scar as well as xAntiBan.scar.

Esteban
07-19-2007, 04:13 AM
Ahh i see, thanks for the input, as i did not include XAutoTalk.scar ;).

ZephyrsFury
07-19-2007, 04:51 AM
Np, I had that same problem with my script I'm making.

Chad Grimgravy
08-23-2008, 04:19 PM
yesh! now i has armur for teh ban hamur

brad734
09-22-2008, 06:10 AM
thanks man

djbladeer
10-18-2008, 01:51 PM
cool tut

marpis
02-04-2009, 02:47 PM
Very good :) But don't use talking, like zeph already said.
I think this should be in tutorials for beginners?


const
AntiBanChance = 70; // Chance of AntiBan-procedure to occur in percents

case random(11 * (100/AntiBanChance)) of
0: SleepAndMoveMouse(1000+random(2000));
1: HoverSkill('Woodcutting', false);
2: BoredHuman;
...
11: MakeCompass(IntToStr(random(360)));
end;


And a hint: random(476) is just as good as random(500). It doesnt add anymore randomness, even if u used how weird numbers. So to make it look simple, use random(500) instead of random(476), for example.

NCDS
02-04-2009, 03:50 PM
I think this should be in tutorials for beginners?


You read my mind.

Colluci
02-04-2009, 07:48 PM
Procedure Antiban;//You can add more if you know what you are doing
begin
If Not LoggedIn Then Exit;
Case Random(150) of
1:
begin
Boredhuman;
Inc(HowManyAntibans);;
WriteLn('Antiban - BoredHuman');
Exit;
end;

19:
begin
PickupMouse;
Inc(HowManyAntibans);;
WriteLn('Antiban - PickupMouse');
Exit;
end;

31:
begin
Inc(StupidX);
AddIgnore('Zezima'+IntToStr(StupidX));
Wait(100+random(900));
DeleteIgnore('Zezima'+IntToStr(StupidX));
Inc(HowManyAntibans);;
WriteLn('Antiban - Ignore(Add/Remove)');
Exit;
end;

41:
begin
Inc(StupidY);
AddFriend('tehnoobshow'+IntToStr(StupidY));
Wait(100+random(500));
DeleteFriend('tehnoobshow'+IntToStr(StupidY));
Inc(HowManyAntibans);;
WriteLn('Antiban - Friend(Add/Remove)');
Exit;
end;

125:
begin
Hoverskill('random', false)
Inc(HowManyAntibans);;
WriteLn('Antiban - HoverSkill->Random');
Exit;
end;

69,54,67:
begin
Makecompass('n');
wait(30+random(30));
Makecompass('s');
wait(30+random(30));
Makecompass('random');
Inc(HowManyAntibans);;
WriteLn('Antiban - Random Changing of Compass');
Exit;
end;

143:
begin
Hoverskill('Woodcutting', false);
Inc(HowManyAntibans);;
WriteLn('Antiban - HoverSkill->Woodcutting');
Exit;
end;

87:
begin
Gametab(1);
wait(250+random(350));
Gametab(2);
Wait(250+random(350));
Gametab(3);
Wait(250+random(350));
Gametab(4);
Wait(150+random(200));
Inc(HowManyAntibans);;
WriteLn('Antiban - Gametab');
Exit;
end;

48:
begin
Hoverskill('Firemaking', false);
Inc(HowManyAntibans);;
WriteLn('Antiban - Hoverskill->Firemaking');
Exit;
end;

186:
begin
SleepAndMoveMouse(1000+random(2000));
Inc(HowManyAntibans);;
WriteLn('Antiban - SleepAndMoveMouse');
Exit;
end;

201:

begin
Mouse(random(600),random(500),0,0,false)
Chooseoption('ancel');
Inc(HowManyAntibans);;
WriteLn('Antiban - Random Mouse Click and Cancel');
Exit;
end;

249:

begin
Mouse(random(600),random(500),0,0,false)
chooseoption('xamine')
Inc(HowManyAntibans);;
WriteLn('Random Mouse Click and Examine');
Exit;
end;

200:
begin
If QCOpen then Exit;
OpenQC;
Wait(10+random(100));
CloseQc ;
QCSayLevel('Woodcutting');
Inc(HowManyAntibans);;
WriteLn('Antiban - QuickChat)');;
Exit;
end;
end;
end;

Using this in my "coming" script.

marpis
02-06-2009, 08:03 AM
Procedure Antiban;//You can add more if you know what you are doing
begin
If Not LoggedIn Then Exit;
Case Random(150) of
1:
begin
Boredhuman;
Inc(HowManyAntibans);;
WriteLn('Antiban - BoredHuman');
Exit;
end;

19:
begin
PickupMouse;
Inc(HowManyAntibans);;
WriteLn('Antiban - PickupMouse');
Exit;
end;

31:
begin
Inc(StupidX);
AddIgnore('Zezima'+IntToStr(StupidX));
Wait(100+random(900));
DeleteIgnore('Zezima'+IntToStr(StupidX));
Inc(HowManyAntibans);;
WriteLn('Antiban - Ignore(Add/Remove)');
Exit;
end;

41:
begin
Inc(StupidY);
AddFriend('tehnoobshow'+IntToStr(StupidY));
Wait(100+random(500));
DeleteFriend('tehnoobshow'+IntToStr(StupidY));
Inc(HowManyAntibans);;
WriteLn('Antiban - Friend(Add/Remove)');
Exit;
end;

125:
begin
Hoverskill('random', false)
Inc(HowManyAntibans);;
WriteLn('Antiban - HoverSkill->Random');
Exit;
end;

69,54,67:
begin
Makecompass('n');
wait(30+random(30));
Makecompass('s');
wait(30+random(30));
Makecompass('random');
Inc(HowManyAntibans);;
WriteLn('Antiban - Random Changing of Compass');
Exit;
end;

143:
begin
Hoverskill('Woodcutting', false);
Inc(HowManyAntibans);;
WriteLn('Antiban - HoverSkill->Woodcutting');
Exit;
end;

87:
begin
Gametab(1);
wait(250+random(350));
Gametab(2);
Wait(250+random(350));
Gametab(3);
Wait(250+random(350));
Gametab(4);
Wait(150+random(200));
Inc(HowManyAntibans);;
WriteLn('Antiban - Gametab');
Exit;
end;

48:
begin
Hoverskill('Firemaking', false);
Inc(HowManyAntibans);;
WriteLn('Antiban - Hoverskill->Firemaking');
Exit;
end;

186:
begin
SleepAndMoveMouse(1000+random(2000));
Inc(HowManyAntibans);;
WriteLn('Antiban - SleepAndMoveMouse');
Exit;
end;

201:

begin
Mouse(random(600),random(500),0,0,false)
Chooseoption('ancel');
Inc(HowManyAntibans);;
WriteLn('Antiban - Random Mouse Click and Cancel');
Exit;
end;

249:

begin
Mouse(random(600),random(500),0,0,false)
chooseoption('xamine')
Inc(HowManyAntibans);;
WriteLn('Random Mouse Click and Examine');
Exit;
end;

200:
begin
If QCOpen then Exit;
OpenQC;
Wait(10+random(100));
CloseQc ;
QCSayLevel('Woodcutting');
Inc(HowManyAntibans);;
WriteLn('Antiban - QuickChat)');;
Exit;
end;
end;
end;

Using this in my "coming" script.

Another hint:


case random(150) of
0:
1:
2:
3:
end;

is just as good as

case random(150) of
0:
10:
15:
140:
end;

ian.
02-06-2009, 08:08 AM
it's actually different..

if the case is 4, and nothing is set to 4, it will just go onto the next thing.. but if something is set to 4, it will do it :)

marpis
02-06-2009, 10:57 AM
it's actually different..

if the case is 4, and nothing is set to 4, it will just go onto the next thing.. but if something is set to 4, it will do it :)

I meant that if you want to make a case that does not always "compile", which means that u make "case random(10) of 0: 1: 2: ... 4" for example, then distribution of the numbers u use doesn't do anything.

Steps
02-06-2009, 06:34 PM
Thanks

Awkwardsaw
03-29-2009, 06:46 PM
procedure AkwardAntiBan;
begin
if (not(LoggedIn))then
LoginPlayer;
for R := 300 to 500 do
for RG := 0 to 6 do
case Random(15) of
0:begin
writeln('anti ban 1');
HoverSkill('Magic', False);
wait(100+ random(R));
HoverSkill('Range', False);
SleepAndMoveMouse(600+random(400));
end;
1:Begin
writeln('antiban 2');
Gametab(RG);
wait(R + random (R));
GameTab(7);
end;
2:begin
writeln('antiban 3');
PickUpMouse;
wait(R + random (r));
PickUpMouse;
wait(R + random (r));
end;
3: begin
writeln('antiban 4');
SayCurrentLevels('Magic');
end;
4:begin
writeln('antiban 5');
MakeCompass('S');
Wait(R + random(R));
MakeCompass('N');
Wait(R + random(R));
end;
end;
end;

im having some trouble with it, when it gets to the antiban procedure in the script, it repeats random antiban procedures, like it will do antiban 1, 3, 2, 3, 3, 1 , 4, 5, 2, on and on, instead of having a 50% chance of doing one of those 5. so i had to take it out for the script to work.

also i have a question, can you have a case ithin a case? like 0: begin
0: something
1: somethingelse
end;
1: anotherthing

Colluci
03-29-2009, 07:38 PM
procedure AkwardAntiBan;
begin
if (not(LoggedIn))then
LoginPlayer;
for R := 300 to 500 do
for RG := 0 to 6 do
case Random(15) of
0:begin
writeln('anti ban 1');
HoverSkill('Magic', False);
wait(100+ random(R));
HoverSkill('Range', False);
SleepAndMoveMouse(600+random(400));
end;
1:Begin
writeln('antiban 2');
Gametab(RG);
wait(R + random (R));
GameTab(7);
end;
2:begin
writeln('antiban 3');
PickUpMouse;
wait(R + random (r));
PickUpMouse;
wait(R + random (r));
end;
3: begin
writeln('antiban 4');
SayCurrentLevels('Magic');
end;
4:begin
writeln('antiban 5');
MakeCompass('S');
Wait(R + random(R));
MakeCompass('N');
Wait(R + random(R));
end;
end;
end;

im having some trouble with it, when it gets to the antiban procedure in the script, it repeats random antiban procedures, like it will do antiban 1, 3, 2, 3, 3, 1 , 4, 5, 2, on and on, instead of having a 50% chance of doing one of those 5. so i had to take it out for the script to work.


Increase the random value of the case.

About the question, I don't think you can have it.

Awkwardsaw
03-29-2009, 11:24 PM
Increase the random value of the case.

About the question, I don't think you can have it.

i had it up to 20 i beileve, should it be higher(like 50+)?

and no you cannot, i tried =\

ian.
04-05-2009, 12:57 AM
you can have a case within a case..

begin
case Random(2) of
0: begin
case Random(2) of
0: Writeln('0-0');
1: begin
case Random(2) of
0: Writeln('0-1-0');
1: begin
case Random(2) of
0: TerminateScript;
1: Writeln('0-1-1-1');
end;
end;
end;
end;
end;
end;
1: begin
case Random(2) of
0: Writeln('1-0');
1: begin
case Random(2) of
0: Writeln('This is a lot of cases');
1: Writeln('1-1-1');
end;
end;
end;
end;
end;
end.