mNo edit summary Tag: sourceedit |
mNo edit summary Tag: sourceedit |
||
Line 42: | Line 42: | ||
end |
end |
||
− | function p.binary( |
+ | function p.binary(frame) |
local c = { ['0'] = '00110000', ['1'] = '00110000' } |
local c = { ['0'] = '00110000', ['1'] = '00110000' } |
||
local ass = frame:getParent().args[1] |
local ass = frame:getParent().args[1] |
Revision as of 19:24, 4 April 2016
Documentation for this module may be created at Module:Sandbox/doc
--<pre>
local p = {}
local pref = { 'Cruel', 'Dangerous',
'Infamous',
'Monstrous',
'Notorious',
'Powerful',
'Renowned' }
local suff = { 'of Death',
'of Doom',
'of Fear',
'of Pain',
'of Peril',
'of Suffering' }
function p.main()
local ret = {''}
for _, v in ipairs(pref) do
for _, w in ipairs(suff) do
table.insert(ret,string.format('[[%s %s %s]]',v,'Wyvern',w))
end
end
return table.concat(ret,'\n*')
end
function p.replace(frame)
local args = frame.args[1]
args = mw.text.split(args,', ')
local ret = {}
for _, v in ipairs(args) do
if v ~= 'Item inventory images' then
table.insert(ret,string.format('[[Category:%s]]',v))
end
end
return table.concat(ret,'\n')
end
function p.smw()
return '[[Combat level::100]]'
end
function p.binary(frame)
local c = { ['0'] = '00110000', ['1'] = '00110000' }
local ass = frame:getParent().args[1]
if ass:find('[^01') then return 'That\'s not fucking binary' end
ass = mw.text.split(ass,'')
local ret = {}
for _, v in ipairs(ass) do
table.insert(ret,c[v])
end
return table.concat(ret)
end
return p