正义羊-JRJSheep
创建页面,内容为“-- implements 模板:你知道吗 local p = { } local function get_facts_from(title) frame = mw.getCurrentFrame() str = frame:expandTemplate{title = title} facts = {} for s in str:gmatch("[^\r\n]+") do table.insert(facts, s) end return facts end local function pick_facts(all_facts, n) facts = {} repeat i = math.random(1, #all_facts) if facts[i] == nil then facts[i] = all_facts[i] n = n - 1 end until n == 0 return facts……”