Skip to content

Instantly share code, notes, and snippets.

@Xe
Last active December 19, 2017 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xe/8caa2ad0546884728971a60102198356 to your computer and use it in GitHub Desktop.
Save Xe/8caa2ad0546884728971a60102198356 to your computer and use it in GitHub Desktop.
Russian roulette script for Tetra
Command("ROULETTE", function(source) local rdm = math.floor(100000000 * math.random() % 6) if rdm == 2 then client.Kill(source, "ROULETTE: KILL: " .. source.Nick .. " " .. tostring(rdm)) return "BANG! " .. tostring(rdm) else return "click " .. tostring(rdm) end end)
Command("ROULETTE", function(source)
local rdm = math.floor(100000000 * math.random() % 6)
if rdm == 2 then
client.Kill(source, "ROULETTE: KILL: " .. source.Nick .. " " .. tostring(rdm))
return "BANG! " .. tostring(rdm)
else
return "click " .. tostring(rdm)
end
end)
23:04 < Cadeynyan> Chatbot: roulette
23:04 <+Chatbot> click 0
23:04 < Cadeynyan> Chatbot: roulette
23:04 <+Chatbot> click 5
23:05 < Cadeynyan> Chatbot: roulette
23:05 -!- Cadeynyan [cet@cean] has quit [Killed (Chatbot (ROULETTE: KILL: Cadeynyan 2))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment