SRL Archive - OSR Help

Most effective way to implement antiban/antirandoms into a script?


Cage

2013-10-04 20:08:00

Hello! I am trying to learn how to become a more competent scriptwriter and I have come across a problem. I am sure that my current method of approaching antiban/antirandoms is far from efficient yet, I have no clue on how I could improve it and/or its implementation. Any suggestions would be greatly appreciated!


procedure PlayerProtection;
begin
case Random(100) of
10: RandomRClick;
20: HoverSkill('Runecrafting', False);
30: PickUpMouse;
40: RandomMovement;
50: SmallRandomMouse;
59: ExamineInv;
end;

FindNormalRandoms;

end;


I then call this multiple times in my main loop.

riwu

2013-10-04 20:17:27

Random(50) generates a number between 0 to 49 (inclusive), therefore your last 2 cases will never occur.

You should do some calculations (i.e. calculate how many times ur anti-ban method will be called within 1hr on average) so as to make sure it's called as frequently as desired (eg. once per ~20min-1hr?)

Cage

2013-10-04 20:22:35

Whoops i forgot about that. I lowered it from 100 and forgot to update the case numbers. :p Any other suggestions? Such as examples of effective implementation in the main loop for example?

Thanks!

Edit: Updated code

riwu

2013-10-04 20:36:39

For me, i try to minimize the disruption to the activity due to antiban, so for example, if i'm cleaning herbs, i will make it such that the anti-ban is much more likely to occur before i'm about to finish cleaning, so that the antiban will finish before i'm ready to bank, hence my script will remain efficient and more human-like as well (an efficient legit player will not check his level when he's about to bank)

Cage

2013-10-04 20:41:07

From: riwu
For me, i try to minimize the disruption to the activity due to antiban, so for example, if i'm cleaning herbs, i will make it such that the anti-ban is much more likely to occur before i'm about to finish cleaning, so that the antiban will finish before i'm ready to bank, hence my script will remain efficient and more human-like as well (an efficient legit player will not check his level when he's about to bank)


I never thought about that. Thanks for the useful tip! :)