Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Random: Difference between revisions

From MassiveCraft Wiki
No edit summary
Undo revision 6925 by Ryciera (talk)
Line 2: Line 2:
function x.tips()
function x.tips()
local theSeed = os.time()
math.randomseed(os.time())
for _=1,10 do
local l = math.random(15)
  theSeed = theSeed + 1
local l = math.random(15)
  print( "Seeding with "..theSeed )
local l = math.random(15)
  math.randomseed( theSeed )
local l = math.random(15)
  for i=1,5 do
local l = math.random(15)
    return( math.random( 1, 100 ) )
return l
  end
end
 
--math.randomseed(os.time())
-- local l = math.random(15)
-- return l
end
end


return x
return x

Revision as of 20:33, 29 August 2015

Documentation for this module may be created at Module:Random/doc

local x = {}
		
function x.tips()
math.randomseed(os.time())
	local l = math.random(15)
	local l = math.random(15)
	local l = math.random(15)
	local l = math.random(15)
	local l = math.random(15)
	return l
end

return x