Module:Currency: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
InvalidCards (talk | contribs) No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
local gold = math.floor(val / 1000000) |
local gold = math.floor(val / 1000000) |
||
if gold > 0 then |
if gold > 0 then |
||
output = gold .. '[[File:Gold coin.png|link=]] ' |
output = gold .. ' [[File:Gold coin.png|link=]] ' |
||
val = val - (gold * 1000000) |
val = val - (gold * 1000000) |
||
end |
end |
||
local silver = math.floor(val / 1000) |
local silver = math.floor(val / 1000) |
||
if (silver > 0) or (gold > 0) then |
if (silver > 0) or (gold > 0) then |
||
output = output .. silver .. '[[File:Silver coin.png|link=]] ' |
output = output .. silver .. ' [[File:Silver coin.png|link=]] ' |
||
val = val - (silver * 1000) |
val = val - (silver * 1000) |
||
end |
end |
||
output = output .. val .. '[[File:Copper coin.png|link=]]' |
output = output .. val .. ' [[File:Copper coin.png|link=]]' |
||
return output |
return output |
||
end |
end |