Module:Trivia

--[=[

Lua Module for Trivia Functions

--]=]

local p = {} local util = require("Module:Utility") local collectionData = mw.loadData( 'Module:ItemCollection/data' )

function p.main(frame) local tArgs = util.getArgs(frame)

local pagename = mw.title.getCurrentTitle.text local height = 13 local tOut = "" if collectionData["Items"][pagename] and collectionData["Items"][pagename][2] then local itemColl = collectionData["Items"][pagename][1] local itemType = collectionData["Items"][pagename][2] if itemType == "ba" then height = 27 elseif itemType == "d" then height = 37 elseif itemType == "bc" or itemType == "pf" then height = 40 elseif (itemType == "d" or itemType == "bc") and itemColl > 1000 and itemColl < 9000 then height = 47 end end for i, item in pairs(tArgs) do tOut = "* " .. item .. "\n" .. tOut end

if collectionData["Items"][pagename] and collectionData["Items"][pagename][2] == "ch" then local TC = require("Module:MiniEvent").getCharTC tOut = TC({}) .. tOut end

return '\n' .. tOut .. " " end

return p