FANDOM


local p = {}
 
local _data = {
	Amlodd = { level = 94, xp = 140, vos = 168 },
	Cadarn = { level = 93, xp = 135, vos = 162 },
	Crwys = { level = 97, xp = 155, vos = 186 },
	Hefin = { level = 96, xp = 150, vos = 180 },
	Iorwerth = { level = 91, xp = 125, vos = 150 },
	Ithell = { level = 92, xp = 130, vos = 156 },
	Meilyr = { level = 98, xp = 170, vos = 204 },
	Trahaearn = { level = 95, xp = 145, vos = 174 },
}
 
function p.main(frame)
	local args = frame:getParent().args
 
	local vos = { args['vos1'], args['vos2'] }
	local level = tonumber(args.level)
	local boost = tostring(args.boost) == 'Yes'
	if level < 98 and boost then
		level = level + 4
		boost = true
	else
		boost = false
	end
 
	if level < 91 then
		return 'You do not have a high enough Thieving level to pickpocket any worker.'
	end
 
	local xptable = {}
 
	for w, v in pairs(_data) do
		if level >= v.level then
			local _add = {}
			_add.n = w
			_add.level = v.level
			if vos[1] == w or vos[2] == w then
				_add.xp = v.vos
				_add.vos = true
			else
				_add.xp = v.xp
			end
			table.insert(xptable,_add)
		end
	end
 
	table.sort(xptable, function(a,b) return a.xp > b.xp end)
 
	local ret = mw.html.create('table')
				:addClass('wikitable')
				:tag('tr')
					:tag('th')
						:wikitext('Clan')
					:done()
					:tag('th')
						:wikitext('Level')
					:done()
					:tag('th')
						:wikitext('XP')
					:done()
				:done()
	for _, v in ipairs(xptable) do
		local row = ret:tag('tr')
 
		if v.vos then
			row:css('background','#afafaf')
		end
 
		row	:tag('td')
				:wikitext(v.n)
			:done()
			:tag('td')
				:wikitext(v.level)
			:done()
			:tag('td')
				:wikitext(v.xp)
			:done()
		:done()
	end
 
	ret:done()
	ret:wikitext('Highlights indicate the clan has the Voice of Seren in effect.')
	if boost then
		ret:wikitext('<br>To thieve from every clan listed, you will need the [[Abyssal lurker]]\'s scroll for its +4 thieving boost.')
	end
 
	return ret
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.