summaryrefslogtreecommitdiff
path: root/bot.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-05-13 19:50:19 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-05-13 19:50:19 +0200
commit09694f13b3dd247e2d6801c34e74a7ca1489d882 (patch)
tree6cf349369e01036309f3da0a51a73dec4044844d /bot.lua
parent15741e9da7b220d6d33e0e5bef61ba914c57283f (diff)
downloadfurrybot-09694f13b3dd247e2d6801c34e74a7ca1489d882.tar.xz
Add kill and die commands
Diffstat (limited to 'bot.lua')
-rw-r--r--bot.lua65
1 files changed, 65 insertions, 0 deletions
diff --git a/bot.lua b/bot.lua
index 009d021..d9d4b47 100644
--- a/bot.lua
+++ b/bot.lua
@@ -303,6 +303,71 @@ function furrybot.commands.partner(name, target)
end
furrybot.commands.married = furrybot.commands.partner
+furrybot.kill_deathmessages = {
+ "%s walked into fire whilst fighting %s",
+ "%s was struck by lightning whilst fighting %s",
+ "%s was burnt to a crisp whilst fighting %s",
+ "%s tried to swim in lava to escape %s",
+ "%s walked into danger zone due to %s",
+ "%s suffocated in a wall whilst fighting %s",
+ "%s drowned whilst trying to escape %s",
+ "%s starved to death whilst fighting %s",
+ "%s walked into a cactus whilst trying to escape %s",
+ "%s hit the ground too hard whilst trying to escape %s",
+ "%s experienced kinetic energy whilst trying to escape %s",
+ "%s didn't want to live in the same world as %s",
+ "%s died because of %s",
+ "%s was killed by magic whilst trying to escape %s",
+ "%s was killed by %s using magic",
+ "%s was roasted in dragon breath by %s",
+ "%s withered away whilst fighting %s",
+ "%s was shot by a skull from %s",
+ "%s was squashed by a falling anvil whilst fighting %s",
+ "%s was slain by %s",
+ "%s was shot by %s",
+ "%s was fireballed by %s",
+ "%s was killed trying to hurt %s",
+ "%s was blown up by %s",
+ "%s was squashed by %s",
+}
+
+furrybot.deathmessages = {
+ "%s went up in flames",
+ "%s was struck by lightning",
+ "%s burned to death",
+ "%s tried to swim in lava",
+ "%s discovered the floor was lava",
+ "%s suffocated in a wall",
+ "%s drowned",
+ "%s starved to death",
+ "%s was pricked to death",
+ "%s hit the ground too hard",
+ "%s experienced kinetic energy",
+ "%s fell out of the world",
+ "%s died",
+ "%s was killed by magic",
+ "%s was roasted in dragon breath",
+ "%s withered away",
+ "%s was squashed by a falling anvil",
+ "%s blew up",
+ "%s was squished too much",
+ "%s went off with a bang",
+}
+
+function furrybot.commands.kill(name, target)
+ if furrybot.online_or_error(name, target, true) then
+ if name == target then
+ furrybot.send(string.format("%s died due to lack of friends", target), furrybot.colors.rpg)
+ else
+ furrybot.send(string.format(furrybot.kill_deathmessages[math.random(#furrybot.kill_deathmessages)], target, name), furrybot.colors.rpg)
+ end
+ end
+end
+
+function furrybot.commands.die(name)
+ furrybot.send(string.format(furrybot.deathmessages[math.random(#furrybot.deathmessages)], name), furrybot.colors.rpg)
+end
+
-- misc
function furrybot.commands.rolldice(name)
furrybot.ping_message(name, "rolled a dice and got a " .. furrybot.random(1, 6, furrybot.colors.system) .. ".", furrybot.colors.system)