모듈:Random

Utolee90 (토론 | 기여)님의 2016년 12월 17일 (토) 17:28 판 (새 문서: -- 리브레 위키에서 가져옴 local p = {} function p.random(frame) math.randomseed(os.time()) -- 매번 다른 난수 입력 및 출력을 위한 randomseed local count = 0...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
-- 리브레 위키에서 가져옴 
local p = {}
function p.random(frame)
	math.randomseed(os.time())
-- 매번 다른 난수 입력 및 출력을 위한 randomseed
	local count = 0
	for k,v in pairs(frame.args) do
		count = count + 1
	end
	v = math.random(count)
	return frame.args[v]
end
return p