Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("/myapi.lua")
- -- ########## config
- --引数使用宣言
- local args={...}
- if args and #args == 1 then
- --引数が2つなら
- DEPTH = tonumber(args[1])
- else
- --引数が無いなら
- DEPTH = 10
- end
- MIN_FUEL_LEVEL = DEPTH
- print("Fuel: ",turtle.getFuelLevel(), " (required: ",MIN_FUEL_LEVEL,")")
- for d=1,DEPTH do
- myapi.surelyFwd()
- turtle.placeDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement