Robonado

Comandos p/ Minijogos

Apr 30th, 2015
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. str, msg= '<j>Comando inexistente. Digite <rose>!ajuda <j>para mais informações.', tfm.exec.chatMessage;
  2.  
  3. c= {
  4.     ajuda= function(p) msg('<j>Qualquer dúvida, procure falar com Robonado.', p) end;
  5.     };
  6.  
  7. setmetatable(c, {__index= function() return function(p) msg(str, p) end; end})
  8.  
  9. function eventChatCommand(p,cmd)
  10.     local arg= {};
  11.     for w in cmd:gmatch('%S+') do
  12.         arg[#arg + 1]= w;
  13.     end
  14.     c[arg[1]:lower()](p, table.unpack(arg))
  15. end
Advertisement
Add Comment
Please, Sign In to add comment