a_alien

turtle_control

Jan 8th, 2021 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. rednet.open("right")
  2. protocal = "FUEL"
  3. --rednet.loockup(protocal, turtle)
  4. while(true)
  5. do
  6.     if(rednet.isOpen()) then
  7.         id,mes = rednet.receive(protocal, 0)
  8.         if(mes == "ended") then
  9.             break
  10.         elseif(mes == nil) then
  11.         else
  12.             print(mes)
  13.         end
  14.     else
  15.         break
  16.     end
  17.     if(redstone.getInput("left")) then
  18.         rednet.send(4, "EXIT", protocal)
  19.     end
  20. end
  21. rednet.close("right")
Add Comment
Please, Sign In to add comment