Advertisement
Guest User

aadarus.lua

a guest
Dec 18th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local adarus = {}
  2. adarus.init = {}
  3. adarus.functions = {}
  4. adarus.utils = {}
  5. adarus.users = {}
  6. adarus.sounds = {}
  7. adarus.succes = {}
  8. adarus.errors = {}
  9.  
  10. function adarus.utils.decode(data)
  11.     local status, result = pcall(serial.unserialize, data)
  12.     if result == nil then status = nil end --warning unable to transfer nil object, it will lead to status nil
  13.     return status, result
  14. end
  15.  
  16. function adarus.serve()
  17.   for k,v in pairs(adarus.init) do
  18.     if type(v) == "function" then
  19.       v()
  20.     else
  21.       print(tostring(k) .. " needs to be function")
  22.     end
  23.   end
  24.  
  25.   while true do
  26.     message, playername = event.pull("command")
  27.     --etc etc  
  28.   end
  29. end
  30.  
  31.  
  32.  
  33. function adarus.utils.commandExecutor(args, said)
  34.   for index, item in pairs(args) do
  35.    
  36. end
  37.  
  38.  
  39.  
  40. function commandParser(command)
  41.   local args = {}
  42.   status, args = adarus.util.decode(command)
  43.   adarus.utils.commandExecutor(args, command)
  44. end
  45.  
  46. return adarus
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement