diff --git a/Addons/Admin/auto-chat.lua b/Addons/Admin/auto-chat.lua index de218655..8a4a02a5 100644 --- a/Addons/Admin/auto-chat.lua +++ b/Addons/Admin/auto-chat.lua @@ -26,7 +26,6 @@ local messages = { ['roundabouts']={'chat-bot.loops'}, ['afk']=function(_player) local max=_player for _,player in pairs(game.connected_players) do if max.afk_time < player.afk_time then max=player end end return {'chat-bot.afk',max.name,tick_to_display_format(max.afk_time)} end } - -- white spaces removed and made into lower -- these are global chat commands that can be used -- comands start with ! (all messages are also commands) @@ -42,7 +41,9 @@ local commands = { ['aids']={'chat-bot.aids'}, ['riot']={'chat-bot.riot'}, ['lenny']={'chat-bot.lenny'}, - -- jokes about food and drink + --Thadius suggestion + ['rhd']={'chat-bot.lhd'}, + --Jokes about food and drink ['whattoeat']={'chat-bot.food'}, ['orderpizza']=function(player) Server.new_thread{ timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true @@ -73,6 +74,20 @@ local commands = { }:on_event('timeout',function(self) if self.data then game.print{'chat-bot.message',{'chat-bot.make-coffee-2',self.data}} end end):open() return {'chat-bot.make-coffee-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 + end):open() return {'chat-bot.make-coffee-1'} end + }, + ['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) + if self.data[2]==0 then game.print{'chat-bot.message',{'chat-bot.order-pizza-2',self.data[1]}} + elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.order-pizza-3',self.data[1]}} self.reopen = false + end + self.data[2]=self.data[2] + 1 + end):open() return {'chat-bot.order-pizza-1'} end, ['maketea']=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 6721b23d..aa5e54c0 100644 --- a/locale/en/chat-bot.cfg +++ b/locale/en/chat-bot.cfg @@ -37,4 +37,6 @@ 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=Don't know what to make for dinner? Use a random recipe from the random dinner suggestion generator at http://www.whatthefuckshouldimakefordinner.com/ +food=Dont know what to make for dinner? Use a random recipe from the random dinner suggestion generator at http://www.whatthefuckshouldimakefordinner.com/ +lhd=All trains must be LHD! +food=Don't 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