SRL Archive - RS3 Help

adding breaks and antiban


lanadekat

2014-08-05 05:52:37

I found an antiban here: https://villavu.com/forum/showthread.php?t=108190 but I don't know how to add it to my script and give it a 10% chance to run when doing something. I took a look at the all in one scripting tutorial , but I couldn't find anything about antiban. the lookatweb is also nice and easy, but can I let it have a 10% chance to run? And is is possible to let a player take a 3-5 min brake every 20-25 min?

and another question: when clicking something or walking using SPS , can I let it click a different location , cus now it always clicks the same spot.

Edit: I got the lookatweb working :D but it does it always, I want to only look at web xx% chance.


Procedure lookingAtWeb();
begin
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(18000, 27000));
walkbank();
end

If I could give it xx% chance to open another procedure before doing the mouseoffclient and the wait.
I also added some random antibans in the script on places where I as human also do things like that. I got them from The Mayor's list: http://puu.sh/6xppb.pdf

KeepBotting

2014-08-05 07:20:11


case random(100) of
begin
0..10: begin
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(18000, 27000));
walkbank();
end;
end;


case random(100)
declares a case statement with 100 cases

0..10:
says the the following routines are to be done in cases 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 out of 100 (10% chance)

(you could also do single numbers, like 1: 2: or 3: )

and then we just stick your antiban inside that case, and boom it only runs 10% of the time

the other 90% (which would be 11..100: ) is never specificed, so if the case random(100) happens to land on something outside of 0..10, it'll just skip the entire thing

lanadekat

2014-08-05 08:18:41

From: KeepBotting

case random(100) of
begin
0..10: begin
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(18000, 27000));
walkbank();
end;
end;


case random(100)
declares a case statement with 100 cases

0..10:
says the the following routines are to be done in cases 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 out of 100 (10% chance)

(you could also do single numbers, like 1: 2: or 3: )

and then we just stick your antiban inside that case, and boom it only runs 10% of the time

the other 90% (which would be 11..100: ) is never specificed, so if the case random(100) happens to land on something outside of 0..10, it'll just skip the entire thing

Thanks a lot that's all I need to know :D

Turpinator

2014-08-05 09:04:13

From: KeepBotting

0..10:
says the the following routines are to be done in cases 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 out of 100 (10% chance)

You should count that again. ;)

[spoiler="Code"]
begin
writeln(length([0..10]));
end.
[/spoiler]

lanadekat

2014-08-05 13:22:39

From: Turpinator
You should count that again. ;)

[spoiler="Code"]
begin
writeln(length([0..10]));
end.
[/spoiler]

What do you mean lol? Is it s 1,2,3,4,5,6,7,8,9 instead of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10

running your thingy says 11 so there are 11 numbers.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 has 11 numbers.

KeepBotting

2014-08-05 17:14:47

From: Turpinator
You should count that again. ;)

[spoiler="Code"]
begin
writeln(length([0..10]));
end.
[/spoiler]

it was really early, mmkay? he gets the general idea