Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- moves=0
- sides=0
- slot=1
- moved=0
- function fencePlace()
- repeat
- turtle.placeDown()
- turtle.forward()
- moved = moved + 1
- moves = moves + 1
- until moves = arg[1]
- turtle.turnRight()
- end
- function moveSlot()
- if turtle.getItemCount(slot) == 0 then
- if slot == 5 then
- slot = 1
- turtle.select(slot)
- else
- slot = slot + 1
- turtle.select(slot)
- end
- end
- end
- function gimmeFences()
- term.clear()
- term.write("I need fences!")
- end
- if #args == 1 then
- local neededFuel = args[1]*4
- turtle.select(16)
- repeat
- turtle.refuel(1)
- term.clear()
- term.write("Need more fuel!")
- until turtlegetFuelLevel() >= neededFuel
- turtle.up()
- turtle.select(1)
- repeat
- term.write("Fences left to place: "..neededFuel-travelled)
- sides = sides + 1
- fencePlace()
- until sides=4
- term.write("Job Done!")
- else
- term.write("Places fences, used for an Ender Quarry.")
- term.write("Usage: EnderFence (sideLength)")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement