Module:Generic Random Picker

function returner(numb,table) local max = #table local toreturn = tonumber(numb) % max if toreturn == 0 then toreturn = max end return table[toreturn] end

function RandomPicking(table) local rett = { } function rett.main(numb) return returner(numb,table) end function rett.rand math.randomseed(os.time) return returner(math.rand(#table),table) end function rett.loop local temp = os.date("*t") return returner(temp.yday,table) end return rett end