SHARE
TWEET

computercraft creuser 3 de hauteur

Zulfur Aug 17th, 2019 (edited) 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local x =
  2. local y =
  3. local dx = 0
  4. local dy = 0
  5. local state = 1
  6.  
  7. while dy < y do
  8. while dx < x do
  9. if not turtle.forward() then
  10. turtle.dig()
  11. else
  12. dx = dx + 1
  13. turtle.digUp()
  14. turtle.digDown()
  15. end
  16. end
  17.  
  18. dx = 0
  19.  
  20. if state == 1 then
  21. turtle.turnRight()
  22. turtle.forward()
  23. turtle.digUp()
  24. turtle.digDown()
  25. turtle.turnRight()
  26. else
  27. turtle.turnLeft()
  28. turtle.forward()
  29. turtle.digUp()
  30. turtle.digDown()
  31. turtle.turnLeft()
  32. end
  33.  
  34. state = state*-1
  35. dx = 0
  36. end
  37. dy = dy +1
  38. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top