모듈 연습장입니다. 각 모듈에서 편집하면 기존에 사용중인 모듈에 문제가 갈수도 있고 로그가 지저분해지니 여기서 연습을 하고 실제 모듈에 적용하면 될 것 같습니다.
위키
연습장이나 사용자 문서에서 틀의 사용이나 수정을 연습할 수 있습니다.
분류는
/설명문서에 넣어주세요.
-- 모듈 연습장입니다.
local p = {}
function p.random(frame)
local selection = frame.args['갯수']
a = {}
math.randomseed (os.time())
v= math.floor(math.random () *selection) + 1
for i=0,selection-1,1 do
a[i] = frame.args[i+1]
end
for j=0,selection-1,1 do
if v==j+1 then
return a[j]
end
end
end
return p