Module:Skill clickpic

--

local p = {}

local pics = { quests = {image='Quest',link='Quests'}, quest = {image='Quest',link='Quests'}, combat = {image='Multicombat',link='Combat'}, music = {image='Music icon',link='Music'}, activity = {image='Activity icon',link='Tasks'}, activities = {image='Activity icon',link='Tasks'}, task = {image='Task icon',link='Tasks'}, tasks = {image='Task icon',link='Tasks'}, agility = {image='Agility-icon',link='Agility'}, attack = {image='Attack-icon',link='Attack'}, constitution = {image='Constitution-icon',link='Constitution'}, construction = {image='Construction-icon',link='Construction'}, cooking = {image='Cooking-icon',link='Cooking'}, crafting = {image='Crafting-icon',link='Crafting'}, defence = {image='Defence-icon',link='Defence'}, divination = {image='Divination-icon',link='Divination'}, dungeoneering = {image='Dungeoneering-icon',link='Dungeoneering'}, farming = {image='Farming-icon',link='Farming'}, firemaking = {image='Firemaking-icon',link='Firemaking'}, fishing = {image='Fishing-icon',link='Fishing'}, fletching = {image='Fletching-icon',link='Fletching'}, herblore = {image='Herblore-icon',link='Herblore'}, hunter = {image='Hunter-icon',link='Hunter'}, magic = {image='Magic-icon',link='Magic'}, mining = {image='Mining-icon',link='Mining'}, prayer = {image='Prayer-icon',link='Prayer'}, ranged = {image='Ranged-icon',link='Ranged'}, runecrafting = {image='Runecrafting-icon',link='Runecrafting'}, slayer = {image='Slayer-icon',link='Slayer'}, smithing = {image='Smithing-icon',link='Smithing'}, strength = {image='Strength-icon',link='Strength'}, summoning = {image='Summoning-icon',link='Summoning'}, thieving = {image='Thieving-icon',link='Thieving'}, woodcutting = {image='Woodcutting-icon',link='Woodcutting'}, melee = {image='Melee weakness icon',link='Melee'}, overall = {image='Stats Overall icon highscores',link='Skills'}, stats = {image='Statistics',link='Skills'} }

function p.main(frame) local args = frame:getParent.args local skill = args[1] or '' local level = args[2] if level then return level .. ' ' .. p._main(skill) else return p._main(skill) end end

function p._main(skill) local file if type(skill) == 'string' and pics[skill:lower] then file = pics[skill:lower] else file = pics.stats end local ret = '' return ret end

return p