Module:NPCQuery

-- local p = {}

local yesno = require('Module:Yesno') local params = require('Module:Paramtest') local commas = require('Module:Addcommas')

function p.main(frame) local args = frame:getParent.args -- Params and defaults local name = params.default_to(args.Monster,'monster') local check = mw.ustring.find(name,'|') if check ~= nil then name = mw.ustring.sub(name,1,check-1) end local name1 = mw.ustring.gsub(name, ' ', '_' ) local name2 = mw.ustring.gsub(mw.ustring.lower(name), ' ', '' ) -- Table row --return name return name1 .. ' : ' .. name2 .. '\n' --return p._main(name2,name1) end

function p._main(nameWOSpace,nameWithUnder) local namespace = mw.site.namespaces[0] local doo = 1 local titlle = mw.title.new( nameWithUnder, namespace.id ) if titlle.id == 0 then return '?1' .. nameWithUnder end local ret2 =titlle:getContent --	while doo do	local off1 = mw.ustring.find(ret2,'') local bla = mw.ustring.sub(str,9,off2-1) local sst = mw.ustring.lower(bla) local nexto = mw.ustring.gsub(sst,' ', '' ) if string.find( nexto, nameWOSpace ) ~= nil then if mw.ustring.find(nexto,'|members=yes') == nil then return 'No' else return 'Yes' end else ret2=str end --  end return '?3' .. nameWithUnder end

return p