-Chicken-

SpawnComputer

May 28th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. --Spawn Computer
  2.  
  3. Rules = {
  4. "No foul language anywhere",
  5. "No racism, sexism",
  6. "No sexual skins",
  7. "No hacking",
  8. "No griefing or raiding",
  9. "Be respecful to all",
  10. "follow all other CCGaming rules."
  11. }
  12.  
  13. for _, v in pairs(redstone.getSides()) do
  14.     if peripheral.getType(v) == "modem" then
  15.         local modem = peripheral.wrap(v)
  16.         modem.open(1)
  17.         for _, n in pairs (modem.getNamesRemote()) do
  18.             if peripheral.getType(n) == "monitor" then
  19.                 monitor = peripheral.wrap(n)
  20.             end
  21.         end
  22.     elseif peripheral.getType(v) == "monitor" then
  23.         monitor = peripheral.wrap(v)
  24.     end
  25. end
  26.  
  27. if(monitor == nil)then
  28.     return error("cannot find monitor")
  29. end
  30.  
  31.  
  32. print("ran search")
  33.  
  34. while(true)do
  35.     monitor.clear()
  36.     for i = 1, #Rules do
  37.         monitor.setCursorPos(1,i)
  38.         monitor.write(Rules[i])
  39.     end
  40.     sleep(0.1)
  41. end
Advertisement
Add Comment
Please, Sign In to add comment