Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prizeTable = {"fat stacks of cash", "a solid gold toilet", "a brand new car", "tickets to that one awesome show"}
- deathTable = {"throwing them into a vat of acid", "burning them alive", "killing them with a turtle swarm", "eating their flesh"}
- answerTable = {"It is certain", "It is decidedly so", "Without a doubt", "Yes - definitely", "You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes", "Signs point to yes", "Reply hazy, try again", "Ask again later", "Better not tell you now", "Cannot predict now", "Concentrate and ask again", "Don't count on it", "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful"}
- local seen={}
- function win(nick, prize)
- if not nick then nick = event["nick"] end
- if not prize then prize = prizeTable[math.random(#prizeTable)] end
- print(nick.." has won the internets. Please reward their awesomeness by giving them "..prize..".")
- end
- function fail(nick, death)
- if not nick then nick = event["nick"] end
- if not death then death = deathTable[math.random(#deathTable)] end
- print(nick.." has failed spectacularly. Please dispose of their wasted intelligence by "..death..".")
- end
- function magicBall(question)
- math.random(9001)
- math.randomseed(math.random(1, 9001))
- if not question then
- print("You gaze into the swirling depths of the ethereal, and project your question into the all knowing crystal ball.")
- else
- print([[You ask the crystal ball, "]]..question..[[?"]])
- end
- print("As the fog lifts, you see an answer written in the wispy lines of smoke swirling about you: "..answerTable[math.random(#answerTable)]..".")
- end
- function craniumExplore(t)
- local indexTable = {}
- for i, v in pairs(t) do
- table.insert(indexTable, "Type = "..type(v).." ; Index = "..i.." ; Value = "..tostring(v))
- end
- return "Exploration: "..table.concat(indexTable, " // ")
- end
- function explore2(t,i)
- local seen={}
- local function dump(t, i)
- seen[t]=true
- local s={}
- local n=0
- for k in pairs(t) do
- n=n+1 s[n]=k
- end
- table.sort(s)
- for k,v in ipairs(s) do
- print(i,v)
- v=t[v]
- if type(v)=="table" and not seen[v] then
- dump(v,i.."\t")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment