Advertisement
hevohevo

yuka4

Oct 8th, 2019
923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. ----------------------------------
  2. -- yuka4: 床にブロックを設置する(1往復)
  3. ----------------------------------
  4.  
  5. ------- Config -------
  6. local arg1 = ...
  7. local hosuu = 6
  8.  
  9. if arg1 then
  10.   hosuu = arg1
  11. end
  12.  
  13. ------- Main -------
  14. -- 地面に置いたタートルでは床にブロック置けないので、浮かせる
  15. turtle.up()
  16.  
  17. -- 床にブロックを敷き詰めながら指定した歩数だけ前に進む
  18. for i=1,hosuu do
  19.   turtle.placeDown()
  20.   turtle.forward()
  21. end
  22.  
  23. -- 右の列に移動
  24. turtle.turnRight()
  25. turtle.forward()
  26.  
  27. -- 右の列のスタート地点に移動。こちら側を向いている。
  28. turtle.turnRight()
  29. turtle.forward()
  30.  
  31. -- 右の列に床ブロックを敷き詰めながら戻ってくる
  32. for i=1,hosuu do
  33.   turtle.placeDown()
  34.   turtle.forward()
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement