Guest User

startup

a guest
Apr 19th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. function up()
  2.  if turtle.detectUp() then
  3.  
  4.  else
  5.  turtle.up()
  6.  up()
  7.  end
  8. end
  9. function mine()
  10.  x=0
  11.  while x < 1 do
  12.  turtle.digDown()
  13.  turtle.down()
  14.  x = x+1
  15.  end
  16. end
  17. function goUp()
  18.  if turtle.digDown() == false then
  19.  up()
  20.  end
  21. end
  22. function finish()
  23.  x=0
  24.  while x < 70 do
  25.  mine()
  26.  goUp()
  27.  end
  28. end
  29. rednet.open("right")
  30. id, message, distance = rednet.receive()
  31. function complete()
  32. if message == "excavate" then
  33.  finish()
  34.  end
  35. end
  36.  
  37. complete()
Advertisement
Add Comment
Please, Sign In to add comment