Advertisement
Satscape

ComputerCraft Turtle Obsidian maker

Mar 8th, 2013
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.26 KB | None | 0 0
  1. -- OBSIDI-BOT !!!
  2. --
  3. -- This will only work in my particular set up. Just here for your reference.
  4. -- I have two chests, one where the turtle picks up buckets of lava, another where it deposits the empty
  5. -- bucket and block of obsidian. It will stop and reboot when the lava runs out.
  6. -- http://youtube.com/satscapeminecraft
  7.  
  8. function one80()
  9.   turtle.turnLeft()
  10.   turtle.turnLeft()
  11.   os.sleep(1)
  12. end
  13.  
  14. while true do
  15. one80()
  16. turtle.select(15)
  17. if not turtle.suck() then -- pick up lava bucket from chest or reboot if none
  18.   one80()
  19.   os.sleep(1)
  20.   os.reboot()
  21.   os.sleep(5)
  22. end
  23.  
  24. one80()
  25.  
  26. --drop lava and move
  27. turtle.forward()
  28. turtle.down()
  29. os.sleep(1)
  30. turtle.placeDown()
  31. turtle.up()
  32. turtle.up()
  33. turtle.forward()
  34. os.sleep(1)
  35.  
  36. --drop and pick up water
  37. turtle.select(16)
  38. turtle.placeDown()
  39. os.sleep(1)
  40. turtle.placeDown()
  41.  
  42. turtle.back()
  43. turtle.down()
  44. turtle.down()
  45. os.sleep(1)
  46. turtle.digDown()
  47. os.sleep(1)
  48. turtle.down()
  49. os.sleep(1)
  50. turtle.suckDown()
  51.  
  52. -- go to output chest
  53. turtle.up()
  54. turtle.up()
  55. turtle.forward()
  56. os.sleep(1)
  57.  
  58. turtle.select(15)
  59. turtle.drop()  --dump empty bucket
  60. turtle.select(1)
  61. turtle.drop()  --dump obsidian
  62. os.sleep(1)
  63. turtle.back()
  64. turtle.back()
  65. os.sleep(1)
  66. -- now back at home position, so do it all again
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement