Mercurial > repo
changeset 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 | 84422df37870 |
children | 43e48f410016 |
files | rng?dl=1 |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
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