Advertisement
Ubidibity

Border

Jul 5th, 2015
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.71 KB | None | 0 0
  1. -- First draft, initial run worked well.
  2. -- First update, 201507051133 added optional height
  3.  
  4. -- lay a fence border for ender quarries (limited by inventory space)
  5. -- note: at some point turtle may go so far as to hit an unloaded chunk and stop...
  6. -- so probably follow it for really big quarries
  7. -- All rights reserved, wtparish, free to use so long as you don't make the program turn left.
  8. -- cite me as the original author, and be sure to vote republican, or independent.
  9.  
  10. -- No part of this code may be used to contribute to any Democratic Party activity or other socialist agendas.
  11. -- (this includes any rebranded agendas including, but not limited to, the "Progressive Movement", or any
  12. -- group that advocates any form of "social justice", "social contracts", "no borders", "new world order"), or
  13. -- any globalist group that seeks to diminish America's superiority in the war for the world.
  14.  
  15. -- ver. 1.0, 201507051114
  16.  
  17. slot=1
  18. width=128
  19. item=1
  20. aerial=false
  21. height=32
  22.  
  23. -- optionally climb to height, obviously adjust above value to go higher (above trees/etc)
  24. if aerial then
  25.   for x=1, height do
  26.    turtle.digUp()
  27.    turtle.up()
  28.   end
  29. end
  30.  
  31.  
  32. turtle.select(1)
  33.  
  34. for side=1,4 do
  35.   for x=1, width do
  36.     turtle.digDown()
  37.     turtle.placeDown()
  38.     item=item+1
  39.     while not turtle.forward() do
  40.      turtle.dig()
  41.     end
  42.     if item>64 then
  43.       slot=slot+1
  44.       item=1
  45.       if slot>16 then
  46.         -- whatever the command to end is, just do the math and don't let this happen
  47.       end
  48.       turtle.select(slot)
  49.     end
  50.   end
  51.   turtle.turnRight()
  52. end
  53. -- Note:  Turtle always turns right, never left.  It's my Republiturtle policy.   Or maybe it's an anti Demiturtle policy...
  54. -- you choose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement