Module:Random: Difference between revisions

From MassiveCraft Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
function x.tips()
function x.tips()
math.randomseed(os.time())
local theSeed = os.time()
local l = math.random(15)
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
return l
    return( math.random( 1, 100 ) )
  end
end
 
--math.randomseed(os.time())
-- local l = math.random(15)
-- return l
end
end


return x
return x

Revision as of 20:31, 29 August 2015

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

local x = {}
		
function x.tips()
	local theSeed = os.time()
for _=1,10 do
  theSeed = theSeed + 1
  print( "Seeding with "..theSeed )
  math.randomseed( theSeed )
  for i=1,5 do
    return( math.random( 1, 100 ) )
  end
end

--math.randomseed(os.time())
--	local l = math.random(15)
--	return l
end

return x