2,875
edits
No edit summary |
(Replace _SkillReq with function that handles both realms) |
||
Line 1,092: | Line 1,092: | ||
end | end | ||
function p._AbyssalSkillReq(skill, level, showText) | function p._AbyssalSkillReq(skill, level, showText) | ||
Line 1,145: | Line 1,128: | ||
end | end | ||
function p. | function p._SkillReq(skill, level, showText, realmID) | ||
local realm = realmID or 'melvorD:Melvor' | local realm = realmID or 'melvorD:Melvor' | ||
local link = fixPagename(skill) | local link = fixPagename(skill) | ||
Line 1,183: | Line 1,166: | ||
text:wikitext(level) | text:wikitext(level) | ||
return tostring(text) | return tostring(text) | ||
end | |||
function p.SkillReq(frame) | |||
local args = frame.args ~= nil and frame.args or frame | |||
local skill = args[1] | |||
local level = tonumber(args[2]) | |||
local realmID = args[3] | |||
local showText = args.showText ~= nil and args.showText ~= '' and args.showText ~= 'false' | |||
return p._SkillReq(skill, level, showText, realmID) | |||
end | end | ||
edits