Module:ACDB

local p = {}

function p.pageLink(frame) local iname = frame.args[1]

local prefix = "" local itype = string.sub(iname, 1, 3) if itype == 'UN_' then prefix = 'unit' iname = string.gsub(iname, "^UN_V2_", '') elseif itype == 'TS_' then prefix = 'card' elseif itype == 'IT_' then prefix = 'item' elseif itype == 'AF_' then prefix = 'gear' end if prefix == '' then return '' end return '[http://www.alchemistcodedb.com/' .. prefix .. '/' .. string.lower(string.gsub(iname, '_', '-')) .. ' See on Alchemist Code Database]' end

return p