From 5923e8db837b5ec4400c982ab9d9adf8b0ea3ade Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 14 Mar 2021 13:37:36 +0100 Subject: [PATCH] Add solo RPG commands --- bot.lua | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/bot.lua b/bot.lua index 8518815..a624a64 100644 --- 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) -- 2.44.0