Module:Attack speed bar

-- -- Implements Template:Attack speed bar local p = {}

local hasc = require('Module:Paramtest').has_content function p.main(frame) local arg = frame:getParent.args[1] local speed = '10' local speeds = { -- Weapons ['fastest'] = { 'Fastest', '2.4', 'fastest.png' }, ['fast'] = { 'Fast', '3.0', 'fast.png' }, ['average'] = { 'Average', '3.6', 'average.png' }, ['slow'] = { 'Slow', '4.2', 'slow.png' }, ['slow'] = { 'Slowest', '7.2', 'slowest.png' }, -- Monsters, misc ['10'] = { 'Speed 10', '0.0', '10.png' }, ['9'] = { 'Speed 9', '0.6', '9.png' }, ['8'] = { 'Speed 8', '1.2', '8.png' }, ['7'] = { 'Speed 7', '1.8', '7.png' }, ['6'] = { 'Speed 6', '2.4', '6.png' }, ['5'] = { 'Speed 5', '3.0', '5.png' }, ['4'] = { 'Speed 4', '3.6', '4.png' }, ['3'] = { 'Speed 3', '4.2', '3.png' }, ['2'] = { 'Speed 2', '4.8', '2.png' }, ['1'] = { 'Speed 1', '5.4', '1.png' }, ['0'] = { 'Speed 0', '6.0', '0.png' }, ['random'] = { 'Random', 'random', ' random.gif' } }	if (hasc(arg)) then speed = arg end local ret = mw.html.create('div') ret	:css({ ['font-size'] = '12px', ['line-height'] = '90%', ['text-align'] = 'center' }) :wikitext( speeds[speed][1] ) ret:tag('div') :css({ ['font-size'] = 'smaller' }) :wikitext( 'Interval: ' .. speeds[speed][2] ) :done ret	:wikitext( '' ) :done

return ret end return p