Module:RandomBanner

local p = {} require("Module:StrManip")

local banners = Banner1.png Banner2.png Banner3.png Banner4.png

function p.chooseBanner local bannerlist = strSplit(banners,"\n") local bannerCnt = 0 for k,v in ipairs(bannerlist) do   --mw.logObject(v) bannerCnt = bannerCnt + 1 end math.randomseed(os.time) local random = math.random(1,bannerCnt)

mw.logObject("choosing from "..bannerCnt.." banners: "..bannerlist[random])

return bannerlist[random] end

return p