Guest User

makewall.lua

a guest
Jun 26th, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. if turtle.getFuelLevel() == 0 then
  2.   turtle.select(1)
  3.   turtle.refuel(4)
  4. end
  5. local fuel = turtle.getFuelLevel()
  6. print("fuel:"..tostring(fuel))
  7.  
  8. turtle.select(2)
  9. local function PutLine(wl)
  10.   for i=1, tonumber(wl) do
  11.     if not turtle.detectDown() then
  12.       print("no block")
  13.       local result = turtle.placeDown()
  14.       print(result)
  15.       turtle.forward()
  16.     else
  17.       print("block exist")
  18.     end
  19.   end
  20. end
  21.  
  22. turtle.forward()
  23. PutLine(11)
  24. turtle.turnRight()
  25. PutLine(5)
  26. turtle.turnRight()
  27. PutLine(11)
  28. turtle.turnRight()
  29. PutLine(5)
  30. turtle.turnRight()
  31.  
Advertisement
Add Comment
Please, Sign In to add comment