Advertisement
Wyvern67

Nexus turtle

Jul 11th, 2015
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. modemSide = "right"
  2. nexusComputerID = 7
  3. monitorSide = "left" --can be set to nil
  4.  
  5. rednet.open(modemSide)
  6. if monitorSide == nil then
  7.     m = term
  8. else
  9.     m = peripheral.wrap(monitorSide)
  10. end
  11.  
  12. while true do
  13.     sendID,mess,dist=rednet.receive()
  14.     print(mess)
  15.     if sendID == nexusComputerID then
  16.         print("Opening portal #"..mess)
  17.         local i = tonumber(mess)
  18.         turtle.select(i)
  19.         turtle.drop()
  20.         for i=5,1,-1 do
  21.             m.clear()
  22.             m.setCursorPos(1,1)
  23.             m.write("Go!")
  24.             m.setCursorPos(2,2)
  25.             m.setTextScale(2)
  26.             m.write(tostring(i))
  27.             sleep(1)
  28.         end
  29.         m.clear()
  30.         turtle.suck()
  31.     end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement