FANDOM


local p = {}
 
-- generate the table output
-- expected parameters is:
-- * the current page number %NR%
-- * number of columns i.e. 4
-- * table content
function p.table(frame)
    if not frame or not frame.args then
        return ''
    end
 
    local args = frame.args
    -- force skill text to lowercase to ensure easier comparisons
    local pageNum = tonumber(args[1]) or 0
    local totalCol = tonumber(args[2]) or 0
    local content = args[3]
 
    assert(pageNum > 0,"pageNum should be a number. ["..pageNum.."] is not a number")
    assert(totalCol > 0,"totalCol should be a number. ["..totalCol.."] is not a number")
 
    if (pageNum - 1) % totalCol == 0 then
        return '\n|-\n|' .. content
    else
        return ' || ' .. content
    end
 
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.