Module:Sandbox/Don't mind 111/Module Name

Revision as of 12:58, 3 July 2014 by imported>Don't mind 111
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


  • 1
  • 2
  • 3



local a = {}
  
local tips = {
    '1',
    '2',
    '3'
}
 
function a.tips_list( frame )
    s = {}
    for _, k in pairs( tips ) do
        table.insert( s, '* ' .. k )
    end
    return table.concat( s, '\n' )
end
 
function a.tips_show( frame )
    math.randomseed( os.time() )
    local i = {
    	{math.random( 1, #tips*1/5 )},
    	{math.random( #tips*1/5+1, #tips*2/5 )},
    	{math.random( #tips*2/5+1, #tips*3/5 )},
   		{math.random( #tips*3/5+1, #tips*4/5 )},
    	{math.random( #tips*4/5+1, #tips )},
    }		
    return 
    end
 
return a