Advertisement
Ale2610

Untitled

Jan 22nd, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. multishell = nil
  2. os.loadAPI("apis/db")
  3. _G.chatbox = peripheral.find("chatbox_admin")
  4. _G.cmdblock = peripheral.find("command")
  5. _G.modem = peripheral.find("modem")
  6. function _G.csay(...)
  7. chatbox.say(...)
  8. end
  9. function _G.ctell(player,...)
  10. chatbox.tell(player,...)
  11. end
  12. function _G.say(...)
  13. local v = table.concat({...}, " ")
  14. local cmd
  15. if db.get("os","nativeVoice") then
  16. cmd = "/say "..v
  17. else
  18. cmd = "/sudo @a ping "..db.get("os","name").." &r"..v
  19. end
  20. cmdblock.setCommand(cmd)
  21. cmdblock.runCommand()
  22. end
  23. function _G.tell(player,...)
  24. local v = table.concat({...}, " ")
  25. local cmd
  26. if db.get("os","nativeVoice") then
  27. cmd = "/tell ".. player .." "..v
  28. else
  29. cmd = "/sudo ".. player .." ping "..db.get("os","name").." &7&o"..v
  30. end
  31. cmdblock.setCommand(cmd)
  32. cmdblock.runCommand()
  33. end
  34. chatbox.setLabel("SSS INIT")
  35. csay("Starting up "..db.get("os","short").."...")
  36. if fs.exists(db.get("os","init")) then
  37. shell.run(db.get("os","init"))
  38. else
  39. csay("OS not found:")
  40. csay("could not find "..db.get("os","init"))
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement