Module:Skill clickpic

--

local p = {}

local pics = { quests = {image='Quest point icon',link='Quests'}, quest = {image='Quest point icon',link='Quests'}, combat = {image='Attack style icon',link='Combat'}, all = {image='Attack style icon',link='Combat styles'}, music = {image='Music',link='Music'}, activity = {image='Minigame icon',link='Minigames'}, activities = {image='Minigame icon',link='Minigames'}, minigame = {image='Minigame icon',link='Minigames'}, minigames = {image='Minigame icon',link='Minigames'}, achivements = {image='Achievement Diaries icon',link='Tasks'}, ['achievement diaries'] = {image='Achievement Diaries icon',link='Tasks'}, agility = {image='Agility icon',link='Agility'}, attack = {image='Attack icon',link='Attack'}, hitpoints = {image='Hitpoints 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'}, 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'}, thieving = {image='Thieving icon',link='Thieving'}, woodcutting = {image='Woodcutting icon',link='Woodcutting'}, overall = {image='Stats icon',link='Skills'}, stats = {image='Stats icon',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