SRL Archive - SRL Archives

DivWait


XxKanexX

2006-03-18 21:11:33

Procedure DivWait(Time, Divamount, Erand: Integer); - By XxKanexX

A more random wait type thing. Will divide the total time by a number and wait it's divided number the amount of times needed to complete the total wait Time.

The lower the Divamount, the closer to the wait time it will be. The higher, the further away.

Erand is an extra random time to add each wait. If it's high, the wait time has a possible chance to increase by some seconds.
Example: Erand: 100, Time: 2000, can wait up to 4 seconds.

I wrote this to lower the random detection. I can't add it to SRL because it's locked for some reason? And i wanted to see what everyone thought.

[FONT="Courier New"]
Procedure DivWait(Time, Divamount, Erand: Integer);
var
i: Integer;
begin
for i:= 1 to Divamount do
Wait(Time/Divamount + random(Erand));
end;[/FONT]

Example:

[FONT="Courier New"]var
a: Integer;
begin
a:= getsystemtime;
DivWait(1000 + random(2000), random(100), random(100));
Writeln(floattostr(getsystemtime-a));
end.[/FONT]

Possible Wait Outcomes: (From the Example script above)

3065
2743
2223
2023
4256
2994
3515

Using random choices (Like in the Example above) for Parametres is a good wayto decrease detectability.

You may say that you'd rather use:

[FONT="Courier New"]Wait(1000 + Random(2000));[/FONT]


But, though that is random, dividing it gives it more random chance. Just try this and take a look at this and what it creates:


[FONT="Courier New"]Procedure DivWait(Time, Divamount, Erand: Integer);
var
i: Integer;
begin
for i:= 1 to Divamount do
[COLOR="Red"] begin[/COLOR]
Wait(Time/Divamount + random(Erand));

[COLOR="Red"]Writeln('Wait: '+IntToStr(Time/Divamount + random(Erand)));[/COLOR]
[COLOR="Red"] end;[/COLOR]
end;

var
a: Integer;
begin
a:= getsystemtime;
DivWait(1000 + random(2000), random(100), random(100));
[COLOR="Red"]Writeln('Total: '+floattostr(getsystemtime-a));[/COLOR]
end.[/FONT]


Run it a few times and see.
Short, but effective. :)

<3 XxKanexX

Sdcit

2006-03-18 21:22:37

umm good job?

XxKanexX

2006-03-18 21:27:21

From: Sdcit
umm good job?

Did you read it? Why a question mark? :p

Krazy_Meerkat

2006-03-18 21:27:41

Good work kane ;)
I especially like how you made it random(Errand) to produce a random number each time <3
Word to the wise: Don't made Divamount or Errand too big

Kane, you should probably make Divamout and Errand random numbers anyway (chosen by the procedure). What you did is fine ;)

XxKanexX

2006-03-18 21:38:00

From: Krazy_Meerkat
Good work kane ;)
I especially like how you made it random(Errand) to produce a random number each time <3
Word to the wise: Don't made Divamount or Errand too big

Kane, you should probably make Divamout and Errand random numbers anyway (selected by the procedure). What you did is fine ;)

For now ill just leave it so the user can alter it.

Sdcit

2006-03-18 21:48:33

lolz i read it, but it was short :p. Great job i mean

timmyboy

2006-03-19 08:18:30

I don't get what this does….is this basicly a code for Krazy_Meerkat's High-Low system? Because I don't really understand what this code is supposed to do.:(

XxKanexX

2006-03-19 08:47:34

From: timmyboy
I don't get what this does….is this basicly a code for Krazy_Meerkat's High-Low system? Because I don't really understand what this code is supposed to do.:(

I'll explain a little easier.

Say we want the script to wait 3 seconds:

3000

This procedure will divide that 3000 milliseconds (3 seconds) by however much you want it to be divided by. We'll divide it by 4:

3000 / 4 = 750.

Now the script repeats itself for 4 times the wait "750":

750 * 4 = 3000
In the end that's 3 seconds. BUT this will also add random. So, if we made Erand 50 every time it would wait 1 quadrant of the total wait time it would also add a random of 50.


750 + random(50) = 750 - 800
The higher the dividing number, the more random it will wait each time as it has to repeat itself more times.

:) Get it?

RESULTING in a very random wait ;)

timmyboy

2006-03-19 15:44:09

Heh, ok I get it….I think:D Thanks for the explaination, i'm going to be using this in my scripts

The Prince of Randomness?

2006-03-19 22:41:22

ooo so the waits are the problem.
Good job Kane.

XxKanexX

2006-03-19 23:06:47

Well Krazy brought up a very good concept. Since the waits are almost always in the same range every time, Jagex could moniter that and compare the difference. This alows a good space between waits.

Krazy_Meerkat

2006-03-20 01:44:56

Well the waits are a vulnerability, and I'm assuming jagex would have to use anything they could to stop cheaters. Great work again kane :)

Pwnd

2006-03-29 07:24:36

You seriously have to much time on your hands.