CheeseLiker

Turtle Pixelmon Egg Checker - ComputerCraft 1.8

Mar 14th, 2019 (edited)
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. local controlID = 208
  4.  
  5. function net()
  6.     while true do
  7.         local id, msg = rednet.receive()
  8.         if id == controlID then
  9.             rednet.send(controlID, os.getComputerLabel().." Restarting")
  10.             os.reboot()
  11.         end
  12.     end
  13. end
  14.  
  15. function checkBreeder()
  16.     while true do
  17.         if redstone.getInput("top") then
  18.             rednet.send(controlID, os.getComputerLabel().." Eggs Ready")
  19.             sleep(3000)
  20.             os.reboot()
  21.             break
  22.         end
  23.         sleep(5)
  24.     end
  25. end
  26.  
  27. parallel.waitForAll(net, checkBreeder)
Advertisement
Add Comment
Please, Sign In to add comment