Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- advanced turtle lumberjack
- shell.run('clear')
- print("Slot1 ni Dirt, Slot2 ni Saplings, sosite Slot3 ni mokuzai wo set site kudasai.")
- print("Number of Trees To Plant?")
- local x = io.read()
- local dirt, sapling, log = 1, 2, 3
- -- genzai ichi wo shokika
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.back()
- turtle.back()
- turtle.back()
- -- saisho no tuchi wo set
- for i = 0, x do
- turtle.digDown()
- turtle.select(dirt)
- turtle.placeDown()
- turtle.back()
- turtle.select(sapling)
- turtle.place()
- turtle.back()
- turtle.back()
- turtle.back()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- --ki wo kiru
- while true do
- -- 30 byou matu
- os.sleep(30)
- -- asodatte irunara kiru , soudenakattara skip suru
- for i = 0, x do
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.select(log)
- -- mosi ki ga sodatte irunara
- if turtle.compare() then
- turtle.dig()
- turtle.forward()
- -- ki wo kirirnagara ue he agaru
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- -- jimen ni modoru
- while not turtle.detectDown() do
- turtle.down()
- end
- -- atarasii ki wo ueru
- turtle.back()
- turtle.select(sapling)
- turtle.place()
- end
- turtle.turnLeft()
- end
- -- kado wo magaru
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement