Module:Goat

From RationalWiki
Jump to navigation Jump to search

Usage[edit]

{{#invoke:Goat|hello}}


-- This is just a test which produces the same as Template:Goat
local p = {} --p stands for package

function p.hello( frame )
	local choices = {
		[1] = "[[File:Hornygoat.JPG|200px]]",
		[2] = "[[File:Goatride.jpg|200px]]",
		[3] = "[[File:Goat.jpg|200px]]",
	}
	math.randomseed(os.time())
	local str = "<div style='width: 300px; margin: 1em auto; text-align: center; font-size: 30px;'>" .. choices[math.random(3)] .. "<br/><br/>[[Goat|Goat!]]</div>"
	return str
end

return p