Few fixes

This commit is contained in:
Cooldude2606
2018-09-29 23:11:49 +01:00
parent 5e3f24511c
commit 4d4dfaccfd
2 changed files with 45 additions and 37 deletions

View File

@@ -36,77 +36,84 @@ local messages = {
-- comands start with ! (all messages are also commands) -- comands start with ! (all messages are also commands)
local command_syntax = '!' local command_syntax = '!'
local commands = { local commands = {
['online']=function(player) return {'ExpGamingBot-autoChat.players-online',#game.connected_players} end, ['online']=function(player) return {'chat-bot.players-online',#game.connected_players} end,
['playtime']=function(player) return {'ExpGamingBot-autoChat.map-time',tick_to_display_format(game.tick)} end, ['playtime']=function(player) return {'chat-bot.map-time',tick_to_display_format(game.tick)} end,
['players']=function(player) return {'ExpGamingBot-autoChat.players',#game.players} end, ['players']=function(player) return {'chat-bot.players',#game.players} end,
['dev']={'ExpGamingBot-autoChat.not-real-dev'}, ['dev']={'chat-bot.not-real-dev'},
['blame']=function(player) local names = {'Cooldude2606','arty714','badgamernl',player.name} return {'ExpGamingBot-autoChat.blame',names[math.random(#names)]} end, ['blame']=function(player) local names = {'Cooldude2606','arty714','badgamernl',player.name} return {'chat-bot.blame',names[math.random(#names)]} end,
['readme']={'ExpGamingBot-autoChat.read-readme'}, ['readme']={'chat-bot.read-readme'},
['magic']={'ExpGamingBot-autoChat.magic'}, ['magic']={'chat-bot.magic'},
['aids']={'ExpGamingBot-autoChat.aids'}, ['aids']={'chat-bot.aids'},
['riot']={'ExpGamingBot-autoChat.riot'}, ['riot']={'chat-bot.riot'},
['lenny']={'ExpGamingBot-autoChat.lenny'}, ['lenny']={'chat-bot.lenny'},
['wiki']={'ExpGamingBot-autoChat.wiki'}, ['feedback']={'chat-bot.feedback'},
['evolution']=function(player) return {'ExpGamingBot-autoChat.current-evolution',string.format('%.2f',game.forces['enemy'].evolution_factor)} end, ['wiki']={'chat-bot.wiki'},
['blame']=function(player) local options = {'?','.','!','!!!'} return {'chat-bot.hodor',options[math.random(#options)]} end,
['evolution']=function(player) return {'chat-bot.current-evolution',string.format('%.2f',game.forces['enemy'].evolution_factor)} end,
--Jokes about food and drink --Jokes about food and drink
['whattoeat']={'ExpGamingBot-autoChat.food'}, ['whattoeat']={'chat-bot.food'},
['makepopcorn']=function(player) Server.new_thread{ ['makepopcorn']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data=player.name timeout=math.floor(180*(math.random()+0.5)),data=player.name
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-popcorn-2',self.data}} end if self.data then game.print{'chat-bot.message',{'chat-bot.get-popcorn-2',self.data}} end
end):open() return {'ExpGamingBot-autoChat.get-popcorn-1'} end, end):open() return {'chat-bot.get-popcorn-1'} end,
['orderpizza']=function(player) Server.new_thread{ ['orderpizza']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data[2]==0 then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.order-pizza-2',self.data[1]}} 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{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.order-pizza-3',self.data[1]}} self.reopen = false elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.order-pizza-3',self.data[1]}} self.reopen = false
end end
self.data[2]=self.data[2]+1 self.data[2]=self.data[2]+1
end):open() return {'ExpGamingBot-autoChat.order-pizza-1'} end, end):open() return {'chat-bot.order-pizza-1'} end,
['passsomesnaps']=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 timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data[2]==0 then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-snaps-2',self.data[1]}} 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{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-snaps-3',self.data[1]}} self.reopen = false elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.get-snaps-3',self.data[1]}} self.reopen = false
end end
self.data[2]=self.data[2]+1 self.data[2]=self.data[2]+1
end):open() return {'ExpGamingBot-autoChat.get-snaps-1'} end, end):open() return {'chat-bot.get-snaps-1'} end,
['makecocktail']=function(player) Server.new_thread{ ['makecocktail']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data[2]==0 then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-cocktail-2',self.data[1]}} 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{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-cocktail-3',self.data[1]}} self.reopen = false elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.get-cocktail-3',self.data[1]}} self.reopen = false
end end
self.data[2]=self.data[2]+1 self.data[2]=self.data[2]+1
end):open() return {'ExpGamingBot-autoChat.get-cocktail-1'} end, end):open() return {'chat-bot.get-cocktail-1'} end,
['makecoffee']=function(player) Server.new_thread{ ['makecoffee']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data=player.name timeout=math.floor(180*(math.random()+0.5)),data=player.name
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.make-coffee-2',self.data}} end if self.data then game.print{'chat-bot.message',{'chat-bot.make-coffee-2',self.data}} end
end):open() return {'ExpGamingBot-autoChat.make-coffee-1'} end, end):open() return {'chat-bot.make-coffee-1'} end,
['orderpizza']=function(player) Server.new_thread{ ['orderpizza']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true timeout=math.floor(180*(math.random()+0.5)),data={player.name,0}, reopen=true
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data[2]==0 then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.order-pizza-2',self.data[1]}} 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{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.order-pizza-3',self.data[1]}} self.reopen = false elseif self.data[2]==1 then game.print{'chat-bot.message',{'chat-bot.order-pizza-3',self.data[1]}} self.reopen = false
end end
self.data[2]=self.data[2] + 1 self.data[2]=self.data[2] + 1
end):open() return {'ExpGamingBot-autoChat.order-pizza-1'} end, end):open() return {'chat-bot.order-pizza-1'} end,
['maketea']=function(player) Server.new_thread{ ['maketea']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data=player.name timeout=math.floor(180*(math.random()+0.5)),data=player.name
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.make-tea-2',self.data}} end if self.data then game.print{'chat-bot.message',{'chat-bot.make-tea-2',self.data}} end
end):open() return {'ExpGamingBot-autoChat.make-tea-1'} end, end):open() return {'chat-bot.make-tea-1'} end,
['popcorn']=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-popcorn-2',self.data}} end
end):open() return {'chat-bot.get-popcorn-1'} end,
['meadplease']=function(player) Server.new_thread{ ['meadplease']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data=player.name timeout=math.floor(180*(math.random()+0.5)),data=player.name
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-mead-2',self.data}} end if self.data then game.print{'chat-bot.message',{'chat-bot.get-mead-2',self.data}} end
end):open() return {'ExpGamingBot-autoChat.get-mead-1'} end, end):open() return {'chat-bot.get-mead-1'} end,
['passabeer']=function(player) Server.new_thread{ ['passabeer']=function(player) Server.new_thread{
timeout=math.floor(180*(math.random()+0.5)),data=player.name timeout=math.floor(180*(math.random()+0.5)),data=player.name
}:on_event('timeout',function(self) }:on_event('timeout',function(self)
if self.data then game.print{'ExpGamingBot-autoChat.message',{'ExpGamingBot-autoChat.get-beer-2',self.data}} end if self.data then game.print{'chat-bot.message',{'chat-bot.get-beer-2',self.data}} end
end):open() return {'ExpGamingBot-autoChat.get-beer-1'} end end):open() return {'chat-bot.get-beer-1'} end
} }
-- Module Define -- Module Define

View File

@@ -151,7 +151,9 @@ Role{
tag='[Partner]', tag='[Partner]',
group='HiMember', group='HiMember',
colour={r=140,g=120,b=200}, colour={r=140,g=120,b=200},
allow={} allow={
['global-chat']=true,
}
} }
Role{ Role{
name='Veteran', name='Veteran',
@@ -163,7 +165,6 @@ Role{
is_varified=true, is_varified=true,
time=600, -- 10 hours time=600, -- 10 hours
allow={ allow={
['global-chat']=true,
['tree-decon']=true, ['tree-decon']=true,
['create-poll']=true, ['create-poll']=true,
['repair']=true ['repair']=true