Added Common Parse and /me

This commit is contained in:
Cooldude2606
2019-03-02 18:46:35 +00:00
parent 4e42451865
commit 89bd964498
97 changed files with 241 additions and 72 deletions

7
modules/commands/me.lua Normal file
View File

@@ -0,0 +1,7 @@
local Commands = require 'expcore.commands'
Commands.new_command('me','Sends an action message in the chat')
:add_param('action',false)
:register(function(player,action,raw)
game.print(string.format('%s %s',player.name,action))
end)

View File

@@ -33,7 +33,7 @@ Commands.add_parse('number_range_int',function(input,player,reject,range_min,ran
end
end)
Commands.add_command('repeat-name','Will repeat you name a number of times in chat.')
Commands.new_command('repeat-name','Will repeat you name a number of times in chat.')
:add_param('repeat-count',false,'number_range_int',1,5)
:add_param('smiley',true,function(input,player,reject)
if not input then return end
@@ -54,5 +54,5 @@ end)
end
for i = 1,repeat_count do
Commands.print(i..msg)
end
end
end)