RuneScape Wiki
Advertisement

Documentatie voor deze module kan aangemaakt worden op de volgende pagina: Module:Coins image/doc

-- Like Module:Coins, but only for the image
-- {{Helper module|name=Coins image|fname1=(num)|ftype1=string,number|fuse1=Creates the correct coins image for the number}}
return function(q)
	q = mw.text.split(tostring(q or ''),'[,%-–]')
	local max_q = 1
	for _, v in ipairs(q) do
		if (tonumber(v) or 0) > max_q then
			max_q = tonumber(v)
		end
	end
	-- From [[Module:Coins]] (mostly)
	for _, j in ipairs( { 10000, 1000, 250, 100, 25, 5, 4, 3, 2 } ) do
		if max_q >= j then
			max_q = j
			break
		end
	end
	return 'Coins '..max_q..'.png'
end
Advertisement