Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mine(pos)
- if turtle.getItemCount(16) then
- for a = 0, 15 do
- turtle.select(16 - a)
- if turtle.compare() and turtle.getItemCount(16 - a) 64 then
- empty()
- end
- end
- end
- repeat
- turtle.dig()
- turtle.attack()
- until turtle.forward()
- gps()
- end
- function up(pos)
- if turtle.getItemCount(16) then
- for a = 0, 15 do
- turtle.select(16 - a)
- if turtle.compareUp() and turtle.getItemCount(16 - a) 64 then
- empty()
- end
- end
- end
- repeat
- turtle.digUp()
- turtle.attackUp()
- until turtle.up()
- gps()
- end
- function down(pos)
- if turtle.getItemCount(16) then
- for a = 0, 15 do
- turtle.select(16 - a)
- if turtle.compareDown() and turtle.getItemCount(16 - a) 64 then
- empty()
- end
- end
- end
- repeat
- turtle.digDown()
- turtle.attackDown()
- until turtle.up()
- gps()
- end
- function gps()
- if pos == "x+" then
- x = x + 1
- elseif pos == "x-" then
- x = x - 1
- elseif pos == "y+" then
- y = y + 1
- elseif pos == "y-" then
- y = y - 1
- elseif pos == "z+" then
- z = z + 1
- elseif pos == "z-" then
- z = z - 1
- end
- end
- local x = 0
- local y = 0
- local z = 0
- while true do
- while turtle.getFuelLevel() > 1 do
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement