]> git.lizzy.rs Git - furrybot.git/blob - random.lua
Japanese waifu names
[furrybot.git] / random.lua
1 local http, env, storage
2 local C = minetest.get_color_escape_sequence
3
4 furrybot.commands.rolldice = {
5         func = function(name)
6                 furrybot.ping_message(name, "rolled a dice and got a " .. furrybot.random(1, 6, furrybot.colors.system) .. ".", furrybot.colors.system)
7         end,
8 }
9
10 furrybot.commands.coinflip = {
11         func = function(name)
12                 furrybot.ping_message(name, "flipped a coin and got " .. furrybot.choose({"Heads", "Tails"}, furrybot.colors.system) .. ".", furrybot.colors.system)
13         end,
14 }
15
16 furrybot.commands.choose = {
17         func = function(name, ...)
18                 local options = {...}
19                 if #options > 1 then
20                         furrybot.ping_message(name, "I choose " .. furrybot.choose(options, "", furrybot.colors.system) .. ".", furrybot.colors.system)
21                 else
22                         furrybot.error_message(name, "Not enough options")
23                 end
24         end,
25 }
26
27 furrybot.commands.uwu = {
28         func = function()
29                 local msg = ""
30
31                 local m = math.random(10)
32
33                 for i = 1, m do
34                         local u_list = {"u", "ü", "o", "ö"}
35
36                         local u = u_list[math.random(#u_list)]
37                         local w = "w"
38
39                         if math.random() < 0.5 then
40                                 u = u:upper()
41                         end
42
43                         if math.random() < 0.5 then
44                                 w = w:upper()
45                         end
46
47                         msg = msg .. u .. w .. u
48
49                         if i ~= m then
50                                 msg = msg .. " "
51                         end
52                 end
53
54                 furrybot.send(msg, furrybot.colors.system)
55         end,
56 }
57
58 furrybot.commands.extinct = {
59         func = function(name, species)
60                 if species then
61                         species = furrybot.uppercase(species .. (species:sub(#species, #species):lower() == "s" and "" or "s"))
62                         furrybot.ping_message(name, species  .. " are " .. (furrybot.strrandom(species, 420, 0, 1) == 0 and "not " or "") .. "extinct." , furrybot.colors.system)
63                 else
64                         furrybot.error_message(name, "You need to specify a species")
65                 end
66         end,
67 }
68
69 furrybot.commands.german = {
70         func = function(name)
71                 local messages = {
72                         "Schnauze!",
73                         "Sprich Deutsch, du Hurensohn!",
74                         "NEIN NEIN NEIN NEIN NEIN NEIN",
75                         "Deine Mutter",
76                         "Das war ein BEFEHL!",
77                         "Das bleibt hier alles so wie das hier ist!",
78                         "Scheißße",
79                         "Digga was falsch bei dir",
80                         "Lass mich deine Arschfalten sehen",
81                         "Krieg mal deinen Ödipuskomplex unter Kontrolle",
82                         "Meine Nudel ist 30cm lang und al dente",
83                         "Wie die Nase eines Mannes, so auch sein Johannes.",
84                 }
85
86                 local msg = messages[math.random(#messages)]
87                 local stripe = math.floor(#msg / 3)
88
89                 furrybot.ping_message(name, msg:sub(1, stripe) .. C("red") .. msg:sub(stripe + 1, stripe * 2) .. C("yellow") .. msg:sub(stripe * 2 + 1, #msg), C("black"))
90         end,
91 }
92
93 furrybot.commands.color = {
94         func = function(name)
95                 local color = string.format("#%06x", math.random(16777216) - 1):upper()
96
97                 furrybot.ping_message(name, "Here's your color: " .. C(color) .. color, furrybot.colors.system)
98         end,
99 }
100
101 furrybot.commands.book = {
102         func = function(name)
103                 local books = {
104                         "Johann Wolfgang von Goethe - Faust, Der Tragödie Erster Teil",
105                         "Johann Wolfgang von Goethe - Faust, Der Tragödie Zweiter Teil",
106                         "Karl Marx & Friedrich Engels - The Communist Manifesto",
107                         "Brian Kernhigan & Dennis Ritchie - The C Programming Language",
108                         "Heinrich Heine - Die Harzreise",
109                         "Johann Wolfgang von Goethe - Die Leiden des jungen Werther",
110                         "Friedrich Schiller - Die Jungfrau von Orleans",
111                         "Theodor Fontane - Irrungen, Wirrungen",
112                         "Friedrich Schiller - Die Räuber",
113                         "Theodor Storm - Der Schimmelreiter",
114                         "Josef von Eichendorff - Aus dem Leben eines Taugenichts",
115                         "Richard Esplin - Advanced Linux Programming",
116                         "Joey de Vries - Learn OpenGL",
117                         "Gerard Beekmans - Linux From Scratch",
118                 }
119
120                 furrybot.ping_message(name, books[math.random(#books)], furrybot.colors.system)
121         end,
122 }
123
124 furrybot.commands.video = {
125         func = function(name)
126                 furrybot.ping_message(name, "https://youtube.com/watch?v=dQw4w9WgXcQ", furrybot.colors.system)
127         end,
128 }
129
130 return function(_http, _env, _storage)
131         http, env, storage = _http, _env, _storage
132 end