daily pastebin goal
67%
SHARE
TWEET

CC: cyclone0

hevohevo Mar 26th, 2016 (edited) 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- cyclone0
  2. -- サイクロン型直下掘り
  3.  
  4. -- ######### Config #########
  5. local maxDepth = 10 -- 真下に掘り進む回数
  6.  
  7. -- ######### Main #########
  8. -- (1) 燃料補給
  9. turtle.select(1)
  10. turtle.refuel()
  11.  
  12. -- (2) 回転直下掘りをmaxDepth回だけ繰り返す
  13. for i=1,maxDepth do
  14.   -- ①正面採掘しながら一回転
  15.   turtle.turnLeft()
  16.   turtle.dig()
  17.   turtle.turnLeft()
  18.   turtle.dig()
  19.   turtle.turnLeft()
  20.   turtle.dig()
  21.   turtle.turnLeft()
  22.   turtle.dig()
  23.  
  24.   -- ②真下を掘って真下移動
  25.   turtle.digDown()
  26.   turtle.down()
  27. end
  28.  
  29. -- (3) maxDepth回だけ上昇する
  30. for i=1,maxDepth do
  31.   turtle.up()
  32. 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