Module:ChampionshipRewardTable

local p = {}

local tablehead = ' '

totalTrophy = 0 totalCoin = 0 totalToken = 0 totalBP = 0 totalBox = 0

function p.champrewards(frame) local f = frame:getParent local vehicle = tostring(f.args['vehicle']) for i,v in ipairs(frame) do       trophy = f.args['tr'..i]        coin = f.args['c'..i]        token = f.args['tkn'..i]        bp = f.args['bp'..i]        box = f.args['box'..i]        totalTrophy = totalTrophy + trophy totalCoin = totalCoin + coin totalToken = totalToken + token totalBP = totalBP + bp       tablebody = tablebody..'  '..trophy..'  '..coin..'  '..token..'  '..bp..'  '..box..'  '..totalCoin..'  '..totalToken..'  '..totalBP..'  ' end return tablehead..tablebody..tablefoot end

return p