Module:NPCPriceSpread

local getArgs = require('Module:Arguments').getArgs

local p = {} local table = require('Module:Table')

function p.main(frame) args = getArgs(frame) return frame:preprocess(p.writeText(args)) end

function p.writeText(args) local text = {} if args[3] == nil then ending = 'possible' else ending = args[3] end local values = {args[1] * 0.97,args[1] * 0.98,args[1] * 0.99,args[1],args[1] * 1.07,args[1] * 1.08,args[1] * 1.09,args[1] * 1.1} if args[4] == nil then if args[2] == nil then table.push(text, table.concat{				'(,,,,,,and,', ending })		else			text[1] = values[args[2]]		end	else		table.push(text, table.concat{ values[1], ',', values[2], ',', values[3], ',', values[4], ',', values[5], ',', values[6], ',', values[7], ',', values[8] })	end	return text end

return p