PDA

View Full Version : function wait not very random



pixie_frigo
03-25-2013, 10:23 PM
I think the function


function wait(a, b)
if not b then sleep(a) else sleep(math.random(a, b)) end
end

should replaced by


function wait(a, b)
math.randomseed( os.time() )
math.random(); math.random(); math.random()
if not b then sleep(a) else sleep(math.random(a, b)) end
end

for a truely random wait

Syntax
03-26-2013, 12:13 AM
You can always seed your scripts as it affects the entire environment, but duly noted.