SRL Archive - OSR Help

Help with Anti-ban


burden

2013-03-09 02:16:46

Hey, i'm working on a script that will be repeating certain functions over and over for the majority of the time. To throw in some variety i'd like to have little anti bans go off in between the various repeating steps.
For ex
MMouse(622, 228,Random(15),Random(20));
//antiban ( goes off at a rate of 1 in 50 times or so)
wait(10+Random(5));
ClickMouse2(mouse_left);
//antiban
wait(10+Random(5));
MMouse(163, 66,Random(19),Random(12));
ClickMouse2(mouse_right)
//antiban
wait(10+Random(5));
P07_ChooseOptionMulti(['all']);

So would there be a way to make these go off randomly and not anywhere near every loop time? Id like them to go off at different spots because if it hit at the same time over and over it would be counterproductive, but having it go off at each spot during one random loop would also hurt it.

Does this even make sense, and would anyone know how to do this?

Brid Mayhem

2013-03-09 02:45:50

I know what you mean and I'm actually looking for the same answer.

Like constantly running something on a continuous loop is what would be required?


Sorry for the useless post, but I need this as well.

burden

2013-03-09 02:52:47

Either something constant or once it hit those spots it would need to sort of "roll" and if it hits the right number the anti ban plays otherwise it just moves to next step.

Not sure if we mean the same thing or not, kind of hard to explain this.

Brid Mayhem

2013-03-09 03:23:04

Well, I think you just mean something that's checked then if it's 1/50 then it continues. If this is the case just do this:

Procedure RandomAntiBan;
var SmallChance: integer;
SmallChance := Random(50);
begin
if (SmallChance = 1) then
//the 1/50 chance code here
end
//Rest of the code

That should work, but I haven't tested it.

speedster

2013-03-09 03:57:34

An awesome antiban would be creating a function that endlessly loops through the nyancat soundtrack, well not endlessly but as a break :D

http://www.nyan.cat/

burden

2013-03-09 04:11:49

From: Brid Mayhem
Well, I think you just mean something that's checked then if it's 1/50 then it continues. If this is the case just do this:

That should work, but I haven't tested it.


YES! Thank you so much. Works perfectly for what i wanted.