Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sortProgressItem = 1
- function sortItems()
- data = turtle.getItemDetail(sortProgressItem)
- print(sortProgressItem)
- if data then
- if (data.name ~= "minecraft:iron_ingot") then
- turtle.select(sortProgressItem)
- turtle.dropDown()
- end
- print(data.name)
- else
- print("No item")
- end
- sortProgressItem = sortProgressItem + 1
- if(sortProgressItem == 17) then
- print("done")
- else
- sortItems()
- end
- end
- function goToStartLocation()
- print("Start position")
- print("Mennyit mennyen elore?")
- start_forward = tonumber(read())
- if start_forward == nil then
- print("Hiba! Újraindítás...")
- goToStartLocation()
- else
- print("Mennyit mennyen fel?")
- start_up = tonumber(read())
- if start_up == nil then
- print("Hiba! Újraindítás...")
- goToStartLocation()
- else
- print("Indulás!")
- moveToStart(start_forward, start_up)
- end
- end
- end
- turtle_posForward = tonumber(0)
- turtle_posUp = tonumber(0)
- function moveToStart(start_forward, start_up)
- print(start_forward)
- local success, data = turtle.inspect()
- if(turtle.posForward ~= start_forward) then
- if(success) then
- turtle.dig()
- turtle.forward()
- turtle_posForward = turtle_posForward + 1
- moveToStart(start_forward, start_up)
- else
- turtle.forward()
- turtle_posForward = turtle_posForward + 1
- moveToStart(start_forward, start_up)
- end
- else
- print("Ok, ready to go up")
- end
- end
- goToStartLocation()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement