Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ioPort = "appliedenergistics2:tile.BlockSpatialIOPort"
- stopBlock = "minecraft:stained_hard_clay"
- speaker = peripheral.wrap("right")
- function start()
- rednet.broadcast("--MOVING DOWN--","elvloc")
- success,data = turtle.inspect()
- if(data.name ~= ioPort)
- then
- checkFor()
- else
- turtle.suck()
- turtle.drop()
- rs.setOutput("front",true)
- sleep(.2)
- rs.setOutput("front",false)
- turtle.suck()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- function elevate()
- failure = 0
- repeat
- successfulDown = turtle.down()
- success,data = turtle.inspect()
- if(successfulDown ~= true)
- then
- failure = failure + 1
- end
- if (failure > 10)
- then
- rednet.broadcast("ERRORED","elvloc")
- repeat
- turtle.up()
- success,data = turtle.inspect()
- until( data.name == ioPort or data.name == stopBlock)
- return
- end
- until( data.name == ioPort or data.name == stopBlock)
- if (data.name == stopBlock)
- then
- checkfor()
- end
- sleep(.5)
- speaker.speak("You are now in the basement",5,"Hindi")
- rednet.broadcast("BASEMENT","elvloc")
- end
- function endElv()
- turtle.drop()
- rs.setOuput("front",true)
- sleep(.2)
- rs.setOuput("front",false)
- end
- function checkFor()
- repeat
- turtle.turnRight()
- success,data = turtle.inspect()
- until(data.name == ioPort)
- end
- start()
- elevate()
- endElv()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement