Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function moveForw()
- local try=1
- while not turtle.forward() do
- print("I can't go forward .. try:"..try)
- sleep(1)
- try=try+1
- end
- end
- function moveBack()
- local try=1
- while not turtle.back() do
- print("I can't go back .. try:"..try)
- sleep(1)
- try=try+1
- end
- end
- function moveUp()
- local try=1
- while not turtle.up() do
- print("I can't go up .. try:"..try)
- sleep(1)
- try=try+1
- end
- end
- function moveDown()
- local try=1
- while not turtle.down() do
- print("I can't go down .. try:"..try)
- sleep(1)
- try=try+1
- end
- end
- function turnL()
- turtle.turnLeft()
- end
- function turnR()
- turtle.turnRight()
- end
- function turn2()
- for A=1,2 do
- turnR()
- end
- end
- function placeForw()
- if not turtle.detect() then
- local try=1
- while not turtle.place() do
- print("I can't place forw. a block !..Try: "..try)
- try=try+1
- sleep(1)
- end
- end
- end
- function placeUp()
- if not turtle.detectUp() then
- local try=1
- while not turtle.placeUp() do
- print("I can't place up. a block !..Try: "..try)
- try=try+1
- sleep(1)
- end
- end
- end
- function placeDown()
- if not turtle.detectDown() then
- local try=1
- while not turtle.placeDown() do
- print("I can't place down. a block !..Try: "..try)
- try=try+1
- sleep(1)
- end
- end
- end
- function slctSkull()
- for a=1,16 do
- data=turtle.getItemDetail(a)
- if data then
- if data.name=="minecraft:skull" then
- turtle.select(a)
- break
- end
- end
- end
- end
- function slctSSand()
- for a=1,16 do
- data=turtle.getItemDetail(a)
- if data then
- if data.name=="minecraft:soul_sand" then
- turtle.select(a)
- break
- end
- end
- end
- end
- while true do
- for a=1,4 do
- turtle.suckDown()
- end
- for a=1,16 do
- local data=turtle.getItemDetail(a)
- if data then
- if data.name=="minecraft:coal" then
- turtle.select(a)
- if turtle.getFuelLevel()<80 then
- turtle.refuel()
- else
- turtle.dropDown()
- end
- end
- end
- end
- moveUp()
- moveUp()
- moveForw()
- turnL()
- moveForw()
- moveForw()
- moveDown()
- slctSSand()
- placeDown()
- placeForw()
- moveBack()
- placeForw()
- moveUp()
- placeDown()
- moveForw()
- slctSkull()
- placeForw()
- moveBack()
- placeForw()
- moveBack()
- placeForw()
- turnR()
- moveBack()
- moveDown()
- moveDown()
- sleep(120)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement