FANDOM


-- <nowiki>
 
local p = {}
 
local stylings = {
	['agility'] = { '333399', '993333', 'an'},
	['attack'] = { '660000', 'ffcc00', 'an'},
	['constitution'] = { 'eeeeee', '990000', 'a'},
	['construction'] = { 'ccccaa', 'ffcc00', 'a'},
	['cooking'] = { '990099', '990000', 'a'},
	['crafting'] = { '997755', 'ffcc00', 'a'},
	['defence'] = { '6699cc', 'cccc99', 'a'},
	['farming'] = { '339933', '99cc66', 'a'},
	['firemaking'] = { 'ee8800', 'ffcc00', 'a'},
	['fishing'] = { '66aaee', 'ffcc00', 'a'},
	['fletching'] = { '006666', 'ffcc00', 'a'},
	['herblore'] = { '006600', 'ffcc00', 'a'},
	['hitpoints'] = { 'eeeeee', '990000', 'a'},
	['hunter'] = { '888866', '555544', 'a'},
	['invention'] = {'9a7f2f', '114881', 'an'},
	['magic'] = { 'bbbb99', '333399', 'a'},
	['mining'] = { '444433', '669999', 'a'},
	['prayer'] = { 'ffffff', 'ffcc00', 'a'},
	['ranged'] = { '557722', '995511', 'a'},
	['runecrafting'] = { 'bbbb99', 'ffcc00', 'a'},
	['slayer'] = { '333333', '990000', 'a'},
	['smithing'] = { '888888', 'ffcc00', 'a'},
	['strength'] = { '009966', 'cc3300', 'a'},
	['summoning'] = { 'ccccdd', 'ffcc00', 'a'},
	['dungeoneering'] = { '693d10', 'ae7842', 'a'},
	['thieving'] = { '664455', '111111', 'a'},
	['divination'] = { '4730a1', '2f9d91', 'a'},
	['woodcutting'] = { 'b39354', '227755', 'a'}
}
 
function p.main(frame)
	local skill = frame:getParent().args[1]
	local style
	if skill and stylings[skill:lower()] then
		style = stylings[skill:lower()]
	else
		return skill
	end
 
	local return_table = mw.html.create('table')
					:css({ float = 'left',
						border = '3px solid #'..style[2],
						margin = '0px',
						width = '240px',
						background = '#'..style[1] })
					:addClass('wikipediauserbox')
 
	return_table:tag('th')
			:css({ height = '45px',
				width = '45px',
				['text-align'] = 'center',
				padding = '0 1px 0 0' })
			:wikitext('[[File:'..skill..'-icon.png|link='..skill..']]')
			:done()
			:tag('td')
				:css({ ['line-height'] = '1.25em',
					padding = '0 4px 0 4px',
					['font-weight'] = 'bold',
					color = '#000000' })
				:wikitext('This user has '..style[3]..' '..skill..' level of 99.')
			:done()
 
	return return_table
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.