]> git.lizzy.rs Git - furrybot.git/commitdiff
Add solo RPG commands
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 14 Mar 2021 12:37:36 +0000 (13:37 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 14 Mar 2021 12:37:36 +0000 (13:37 +0100)
bot.lua

diff --git a/bot.lua b/bot.lua
index 851881522d211e58405e3d54fcbf2d42c2adcad5..a624a64adb0df6255f6640c0c5c241dbdd015978 100644 (file)
--- a/bot.lua
+++ b/bot.lua
@@ -122,7 +122,7 @@ function furrybot.repeat_string(str, times)
        return msg
 end
 
-function furrybot.simple_rpg_command(action)
+function furrybot.interactive_rpg_command(action)
        return function(name, target)
                if furrybot.online_or_error(name, target) then
                        furrybot.send(name .. " " .. action .. " " .. target .. ".", furrybot.colors.rpg)
@@ -130,6 +130,12 @@ function furrybot.simple_rpg_command(action)
        end
 end
 
+function furrybot.solo_rpg_command(action)
+       return function(name)
+               furrybot.send(name .. " " .. action .. ".", furrybot.colors.rpg)
+       end
+end
+
 function furrybot.request_command(on_request, on_accept)
        return function(name, target)
                if furrybot.online_or_error(name, target) and on_request(name, target) ~= false then
@@ -215,13 +221,16 @@ function furrybot.commands.cmd()
 end
 
 -- rpg
-furrybot.commands.hug = furrybot.simple_rpg_command("hugs")
-furrybot.commands.cuddle = furrybot.simple_rpg_command("cuddles")
-furrybot.commands.kiss = furrybot.simple_rpg_command("kisses")
-furrybot.commands.hit = furrybot.simple_rpg_command("hits")
-furrybot.commands.slap = furrybot.simple_rpg_command("slaps")
-furrybot.commands.beat = furrybot.simple_rpg_command("beats")
-furrybot.commands.lick = furrybot.simple_rpg_command("licks")
+furrybot.commands.cry = furrybot.solo_rpg_command("cries")
+furrybot.commands.laugh = furrybot.solo_rpg_command("laughs")
+furrybot.commands.confused = furrybot.solo_rpg_command("is confused")
+furrybot.commands.hug = furrybot.interactive_rpg_command("hugs")
+furrybot.commands.cuddle = furrybot.interactive_rpg_command("cuddles")
+furrybot.commands.kiss = furrybot.interactive_rpg_command("kisses")
+furrybot.commands.hit = furrybot.interactive_rpg_command("hits")
+furrybot.commands.slap = furrybot.interactive_rpg_command("slaps")
+furrybot.commands.beat = furrybot.interactive_rpg_command("beats")
+furrybot.commands.lick = furrybot.interactive_rpg_command("licks")
 
 furrybot.commands.sex = furrybot.request_command(function(name, target)
        furrybot.ping_message(target, name .. " wants to have sex with you. Type !accept to accept or !deny to deny.", furrybot.colors.system)