From f47138c49ab5dad6eea00b09f78a9cdca6c46e92 Mon Sep 17 00:00:00 2001 From: sakamakj <38378426+sakamakj@users.noreply.github.com> Date: Sat, 19 May 2018 18:00:37 +0200 Subject: [PATCH] Pr/1 (#49) * coffee * make coffee * make coffee * food I find it quite funny that arty would pin that message on discord and it is still there. * food I wonder how long that pin will stay about the random food suggestion generator... * food changed to what to eat * food changed to whattoeat * Update chat-bot.cfg * Coffee on twise * mead and snaps added * !mead please * a fix * !pass some snaps * get-cocktail * !make cocktail * fix? * fix? --- Addons/Admin/auto-chat.lua | 25 +++++++++++++++++++++++-- locale/en/chat-bot.cfg | 10 +++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/Addons/Admin/auto-chat.lua b/Addons/Admin/auto-chat.lua index 9f3b3652..de218655 100644 --- a/Addons/Admin/auto-chat.lua +++ b/Addons/Admin/auto-chat.lua @@ -43,7 +43,7 @@ local commands = { ['riot']={'chat-bot.riot'}, ['lenny']={'chat-bot.lenny'}, -- jokes about food and drink - ['whattoeat']={'chat-bot.food'}, + ['whattoeat']={'chat-bot.food'}, ['orderpizza']=function(player) Server.new_thread{ timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true }:on_event('timeout',function(self) @@ -52,7 +52,23 @@ local commands = { end self.data[2]=self.data[2]+1 end):open() return {'chat-bot.order-pizza-1'} end, - ['makecoffee']=function(player) Server.new_thread{ + ['passsomesnaps']=function(player) Server.new_thread{ + timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true + }:on_event('timeout',function(self) + if self.data[2]==0 then game.print{'chat-bot.message',{'chat-bot.get-snaps-2',self.data[1]}} + elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.get-snaps-3',self.data[1]}} self.reopen = false + end + self.data[2]=self.data[2]+1 + end):open() return {'chat-bot.get-snaps-1'} end, + ['makecocktail']=function(player) Server.new_thread{ + timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true + }:on_event('timeout',function(self) + if self.data[2]==0 then game.print{'chat-bot.message',{'chat-bot.get-cocktail-2',self.data[1]}} + elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.get-cocktail-3',self.data[1]}} self.reopen = false + end + self.data[2]=self.data[2]+1 + end):open() return {'chat-bot.get-cocktail-1'} end, + ['makecoffee']=function(player) Server.new_thread{ timeout=math.floor(180*(math.random()+0.5)),data=player.name }:on_event('timeout',function(self) if self.data then game.print{'chat-bot.message',{'chat-bot.make-coffee-2',self.data}} end @@ -62,6 +78,11 @@ local commands = { }:on_event('timeout',function(self) if self.data then game.print{'chat-bot.message',{'chat-bot.make-tea-2',self.data}} end end):open() return {'chat-bot.make-tea-1'} end, + ['meadplease']=function(player) Server.new_thread{ + timeout=math.floor(180*(math.random()+0.5)),data=player.name + }:on_event('timeout',function(self) + if self.data then game.print{'chat-bot.message',{'chat-bot.get-mead-2',self.data}} end + end):open() return {'chat-bot.get-mead-1'} end, ['passabeer']=function(player) Server.new_thread{ timeout=math.floor(180*(math.random()+0.5)),data=player.name }:on_event('timeout',function(self) diff --git a/locale/en/chat-bot.cfg b/locale/en/chat-bot.cfg index 9c4f60eb..367ca05f 100644 --- a/locale/en/chat-bot.cfg +++ b/locale/en/chat-bot.cfg @@ -29,4 +29,12 @@ make-coffee-1= ☕ Boiling the water and grinding the coffee beans... ☕ make-coffee-2= ☕ __1__ we ran out of coffe beans! Have some tea instead. ☕ get-beer-1= 🍺 Pouring A Glass 🍺 get-beer-2= 🍻 Chears Mate 🍻 -food=Dont know what to make for dinner? Use a random recipe from the random dinner suggestion generator at http://www.whatthefuckshouldimakefordinner.com/ +get-mead-1= Filling the drinking horn +get-mead-2= Skål! +get-snaps-1=Pouring the glasses and finding the correct song book... +get-snaps-2=Singing a song...🎤🎶 +get-snaps-3=schkål, my friends! +get-cocktail-1= 🍸 Inintiating mind reading unit... 🍸 +get-cocktail-2= 🍸 Mixing favourite ingredients of __1__ 🍸 +get-cocktail-3=🍸 __1__ your cocktail is done.🍸 +food=Dont know what to make for dinner? Use a random recipe from the random dinner suggestion generator at http://www.whatthefuckshouldimakefordinner.com/ \ No newline at end of file