If you dont want to have a number that is following itself (did I explain that correctly
) I'm suggesting something like this:
lua Code:
local random
do
local rand = math.random
local x, y
function random(...)
repeat
x = rand(...)
until x ~= y
y = x
return x
end
end