]> git.lizzy.rs Git - furrybot.git/blob - death.lua
Add bullshit command from 9front
[furrybot.git] / death.lua
1 local http, env, storage
2 local C = minetest.get_color_escape_sequence
3
4 furrybot.kill_deathmessages = {
5         "%s walked into fire whilst fighting %s",
6         "%s was struck by lightning whilst fighting %s",
7         "%s was burnt to a crisp whilst fighting %s",
8         "%s tried to swim in lava to escape %s",
9         "%s walked into danger zone due to %s",
10         "%s suffocated in a wall whilst fighting %s",
11         "%s drowned whilst trying to escape %s",
12         "%s starved to death whilst fighting %s",
13         "%s walked into a cactus whilst trying to escape %s",
14         "%s hit the ground too hard whilst trying to escape %s",
15         "%s experienced kinetic energy whilst trying to escape %s",
16         "%s didn't want to live in the same world as %s",
17         "%s died because of %s",
18         "%s was killed by magic whilst trying to escape %s",
19         "%s was killed by %s using magic",
20         "%s was roasted in dragon breath by %s",
21         "%s withered away whilst fighting %s",
22         "%s was shot by a skull from %s",
23         "%s was squashed by a falling anvil whilst fighting %s",
24         "%s was slain by %s",
25         "%s was shot by %s",
26         "%s was fireballed by %s",
27         "%s was killed trying to hurt %s",
28         "%s was blown up by %s",
29         "%s was squashed by %s",
30 }
31
32 furrybot.deathmessages = {
33         "%s went up in flames",
34         "%s was struck by lightning",
35         "%s burned to death",
36         "%s tried to swim in lava",
37         "%s discovered the floor was lava",
38         "%s suffocated in a wall",
39         "%s drowned",
40         "%s starved to death",
41         "%s was pricked to death",
42         "%s hit the ground too hard",
43         "%s experienced kinetic energy",
44         "%s fell out of the world",
45         "%s died",
46         "%s was killed by magic",
47         "%s was roasted in dragon breath",
48         "%s withered away",
49         "%s was squashed by a falling anvil",
50         "%s blew up",
51         "%s was squished too much",
52         "%s went off with a bang",
53 }
54
55 function furrybot.commands.kill(name, target)
56         if furrybot.online_or_error(name, target, true) then
57                 if name == target then
58                         furrybot.send(string.format("%s died due to lack of friends", target), furrybot.colors.roleplay)
59                 else
60                         furrybot.send(string.format(furrybot.kill_deathmessages[math.random(#furrybot.kill_deathmessages)], target, name), furrybot.colors.roleplay)
61                 end
62         end
63 end
64
65 function furrybot.commands.die(name)
66         furrybot.send(string.format(furrybot.deathmessages[math.random(#furrybot.deathmessages)], name), furrybot.colors.roleplay)
67 end
68
69 return function(_http, _env, _storage)
70         http, env, storage = _http, _env, _storage
71 end