Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Loopcount = {12, 6}
- EnableMessage = true;
- --This function positions my turtle in front of the blocks
- function positionMyTurtle()
- if EnableMessage==true then
- print(MessagePosition)
- end
- while turtle.detect() == false do
- turtle.forward()
- end
- end
- --This function is used to gather blocks that I need for my pyramid’s first floor
- function getMyBlocksForFirstFloor(amountF1)
- print(“Getting blocks for first floor”)
- for i = 1, amountF1 do
- turtle.digUp()
- --turtle.suck()
- turtle.up()
- end
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- for i = 1, amountF1 do
- turtle.digDown()
- turtle.down()
- end
- turtle.forward()
- turtle.dig()
- turtle.forward()
- for i = 1, amountF1 do
- turtle.digUp()
- --turtle.suck()
- turtle.up()
- end
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- for i = 1, amountF1 do
- turtle.digDown()
- turtle.down()
- end
- turtle.dig()
- turtle.forward()
- for i = 1, 8 do
- turtle.digUp()
- turtle.up()
- end
- --Put turtle in position for level 2
- while turtle.detectDown() == false do
- turtle.down()
- end
- turtle.back()
- turtle.back()
- turtle.turnRight()
- --End of function getMyBlocksForFirstFloor
- end
- --This function is used to gather blocks that I need for my pyramid’s second floor
- function getMyBlocksForSecondFloor(amountF2)
- print(“Getting blocks for second floor”)
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- for i = 1, amountF2 do
- turtle.digUp()
- --turtle.suck()
- turtle.up()
- end
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- for i = 1, amountF2 do
- turtle.digDown()
- turtle.down()
- end
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- for i = 1, Loopcount[2] do
- turtle.digUp()
- --turtle.suck()
- turtle.up()
- end
- --Put turtle in position for level 3
- while turtle.detectDown() == false do
- turtle.down()
- end
- turtle.back()
- turtle.back()
- turtle.turnRight()
- --End of function getMyBlocksForSecondFloor
- end
- --This function is used to gather blocks that I need for my pyramid’s third floor
- function getMyBlocksForThirdFloor(amountF3)
- print(“Getting blocks for third floor”)
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- for i = 1, amountF3 do
- turtle.digUp()
- turtle.up()
- end
- --Put turtle in position for level 4
- while turtle.detectDown() == false do
- turtle.down()
- end
- turtle.back()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- --End of function getMyBlocksForThirdFloor
- end
- --This function is used to gather blocks that I need for my pyramid’s fourth floor
- function getMyBlocksForFourthFloor()
- print(“Getting blocks for fourth floor”)
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- while turtle.detect() == false do
- turtle.forward()
- end
- turtle.turnRight()
- while turtle.detect() == false do
- turtle.forward()
- end
- turtle.drop()
- turtle.select(1)
- turtle.drop()
- turtle.select(2)
- turtle.drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(4)
- turtle.drop()
- --End of function getMyBlocksForFourthFloor
- end
- --My positionMyTurtle function is run here
- positionMyTurtle()
- --My turtle digs its first hole and moves into place
- turtle.dig()
- turtle.forward()
- --My getMyBlocksForFirstFloor function is run here
- getMyBlocksForFirstFloor(Loopcount[1])
- --My getMyBlocksForSecondFloor function is run here
- getMyBlocksForSecondFloor(Loopcount[1])
- --My getMyBlocksForThirdFloor function is run here
- getMyBlocksForThirdFloor(Loopcount[1])
- --My getMyBlocksForFourthFloor function is run here
- getMyBlocksForFourthFloor()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement