]> git.lizzy.rs Git - furrybot.git/commitdiff
Add kill and die commands
authorElias Fleckenstein <eliasfleckenstein@web.de>
Thu, 13 May 2021 17:50:19 +0000 (19:50 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Thu, 13 May 2021 17:50:19 +0000 (19:50 +0200)
bot.lua

diff --git a/bot.lua b/bot.lua
index 009d021cae1b09bead3460a18fe979e96ba4223b..d9d4b47835a1c42f6e43f955c7387f77c72e2088 100644 (file)
--- 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)