Guest User

chunkloader

a guest
Jul 16th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. rednet.open("right")
  2. function refuel(id)
  3.  if turtle.getFuelLevel() < 100 then
  4.   turtle.select(1)
  5.   turtle.place()
  6.   turtle.suck()
  7.   shell.run("refuel all")
  8.   turtle.dig()
  9.  end
  10. end
  11.  
  12. function move(id)
  13.  turtle.select(2)
  14.  turtle.digUp()
  15.  turtle.forward()
  16.  turtle.placeUp()
  17.  rednet.send(id,"done")
  18. end
  19.  
  20. while true do
  21.  id,msg = rednet.receive()
  22.  if msg == "move" then
  23.   refuel(id)
  24.   move(id)
  25.  end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment