Mercurial > repo
diff rng?dl=1 @ 1156:4808f1da5185
<GreyKnight> fetch https://dl.dropbox.com/s/bxsata7guqrbql4/rng?dl=1
author | HackBot |
---|---|
date | Fri, 14 Dec 2012 23:26:22 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rng?dl=1 Fri Dec 14 23:26:22 2012 +0000 @@ -0,0 +1,12 @@ +#!/usr/bin/env lua + +math.randomseed(os.time()) +W={} +for i,a in ipairs(arg) do + for w in a:gmatch("[^%s]+") do + table.insert(W, w) + end +end +if #W>0 then + print(W[math.random(#W)]) +end