Advertisement
yoshi_0829

street

Jul 18th, 2019
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. os.loadAPI("/myapi.lua")
  2.  
  3. -- ########## config
  4.  
  5. --引数使用宣言
  6. local args={...}
  7.  
  8. if args and #args == 1 then
  9. --引数が2つなら
  10. DEPTH = tonumber(args[1])
  11. else
  12. --引数が無いなら
  13. DEPTH = 10
  14. end
  15.  
  16. MIN_FUEL_LEVEL = DEPTH
  17. print("Fuel: ",turtle.getFuelLevel(), " (required: ",MIN_FUEL_LEVEL,")")
  18.  
  19.  
  20. for d=1,DEPTH do
  21. myapi.surelyFwd()
  22. turtle.placeDown()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement