1 local http, env, storage
2 local C = minetest.get_color_escape_sequence
4 function furrybot.commands.rolldice(name)
5 furrybot.ping_message(name, "rolled a dice and got a " .. furrybot.random(1, 6, furrybot.colors.system) .. ".", furrybot.colors.system)
8 function furrybot.commands.coinflip(name)
9 furrybot.ping_message(name, "flipped a coin and got " .. furrybot.choose({"Heads", "Tails"}, furrybot.colors.system) .. ".", furrybot.colors.system)
12 function furrybot.commands.choose(name, ...)
15 furrybot.ping_message(name, "I choose " .. furrybot.choose(options, "", furrybot.colors.system) .. ".", furrybot.colors.system)
17 furrybot.error_message(name, "Not enough options")
21 function furrybot.commands.uwu()
24 local m = math.random(10)
27 local u_list = {"u", "ü", "o", "ö"}
29 local u = u_list[math.random(#u_list)]
32 if math.random() < 0.5 then
36 if math.random() < 0.5 then
40 msg = msg .. u .. w .. u
47 furrybot.send(msg, furrybot.colors.system)
50 function furrybot.commands.extinct(name, species)
52 furrybot.ping_message(name, species:sub(1, 1):upper() .. species:sub(2, #species) .. (species:sub(#species, #species):lower() == "s" and "" or "s") .. " are " .. (furrybot.strrandom(species, 420, 0, 1) == 0 and "not " or "") .. "extinct." , furrybot.colors.system)
54 furrybot.error_message(name, "You need to specify a species")
58 function furrybot.commands.german(name)
61 "Sprich Deutsch, du Hurensohn!",
62 "NEIN NEIN NEIN NEIN NEIN NEIN",
64 "Das war ein BEFEHL!",
65 "Das bleibt hier alles so wie das hier ist!",
67 "Digga was falsch bei dir",
68 "Lass mich deine Arschfalten sehen",
69 "Krieg mal deinen Ödipuskomplex unter Kontrolle",
70 "Meine Nudel ist 30cm lang und al dente",
71 "Wie die Nase eines Mannes, so auch sein Johannes.",
74 local msg = messages[math.random(#messages)]
75 local stripe = math.floor(#msg / 3)
77 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"))
80 function furrybot.commands.color(name)
81 local color = string.format("#%06x", math.random(16777216) - 1):upper()
83 furrybot.ping_message(name, "Here's your color: " .. C(color) .. color, furrybot.colors.system)
86 function furrybot.commands.book(name)
88 "Johann Wolfgang von Goethe - Faust, Der Tragödie Erster Teil",
89 "Johann Wolfgang von Goethe - Faust, Der Tragödie Zweiter Teil",
90 "Karl Marx & Friedrich Engels - The Communist Manifesto",
91 "Brian Kernhigan & Dennis Ritchie - The C Programming Language",
92 "Heinrich Heine - Die Harzreise",
93 "Johann Wolfgang von Goethe - Die Leiden des jungen Werther",
94 "Friedrich Schiller - Die Jungfrau von Orleans",
95 "Theodor Fontane - Irrungen, Wirrungen",
96 "Friedrich Schiller - Die Räuber",
97 "Theodor Storm - Der Schimmelreiter",
98 "Josef von Eichendorff - Aus dem Leben eines Taugenichts",
99 "Richard Esplin - Advanced Linux Programming",
100 "Joey de Vries - Learn OpenGL",
101 "Gerard Beekmans - Linux From Scratch",
104 furrybot.ping_message(name, books[math.random(#books)], furrybot.colors.system)
107 return function(_http, _env, _storage)
108 http, env, storage = _http, _env, _storage