Module:Test

local cargo = mw.ext.cargo local p = {}

local escp = function (str) return (mw.ustring.gsub(str == nil and '' or tostring(str), "'", "\\'")) end

function p.skill(frame) local skillname = frame.args[1] --local skillcost = frame.args[2] or '' local skill = cargo.query(		'Skills',		'Skills._pageName=page, Skills.Name=name, Skills.Icon=icon, Skills.Type=type, Skills.SC=sc, Skills.MP=mp', 		{			where = ("Skills.Name='%s'"):format(escp(skillname)),		}	)

if #skill== 0 then return  .. skillname..  end

local skill = skill[1]

-- Creates HTML Table local tbl = mw.html.create('div') :css('border','none') :css('text-align','center')

local icon = (skill.icon == ) and  or (''):format(skill.icon) local frame = (''):format(skill.page)

local mainIcon = mw.html.create('div') :css('display','inline-block') :css('position','relative') :css('z-index', '2') :wikitext(frame)

mainIcon:tag('span') -- Skill Name :css('position','absolute') :css('left','50%') :css('top','82%') :css('font-size','110%') :css('text-shadow','1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 2px 0 #000') :css('transform','translate(-50%,-50%)') :css('line-height','14px') :css('z-index', '3') :wikitext(skill.name)

mainIcon:tag('span') -- Item Icon :css('position','absolute') :css('left','7.5%') :css('top','6%') :css('z-index', '-1') :wikitext(icon)

tbl:tag('span') :css('border','none') :css('background','none') :css('text-align','center') :css('display', 'inline-block') :wikitext(tostring(mainIcon))

local name =  .. skill.name .. 

return tostring(tbl) end

return p