Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- deltaX = 25 -- This variable determines how far you want it to go on the XCoord.
- deltaZ = 25 -- This variable determines how far you want it to go on the ZCoord.
- deltaY = 80 -- This variable determines how how up you want it to go before digging down.
- function up()
- rednet.send(223,1)
- print(up)
- sleep(2)
- end
- function down()
- rednet.send(223,0)
- print(down)
- sleep(2)
- end
- function right()
- rednet.send(223,2)
- print(right)
- sleep(2)
- end
- function left()
- rednet.send(223,3)
- print(left)
- sleep(2)
- end
- function forward()
- rednet.send(223,4)
- print(forward)
- sleep(2)
- end
- function backward()
- rednet.send(223,5)
- print(backward)
- sleep(2)
- end
- function cycleUp()
- while deltaY < 96 do
- up()
- deltaY = deltaY + 1
- end
- end
- function cycleDown()
- while deltaY > 0 do
- down()
- deltaY = deltaY - 1
- end
- end
- function cycleRight()
- local z = 0
- while z ~= 8 do
- right()
- y = z + 1
- end
- end
- function cycleLeft()
- local z = 8
- while z ~= 0 do
- left()
- y = z - 1
- end
- end
- function cycleForward()
- local x = 0
- while x ~= 4 do
- forward()
- x = x + 1
- end
- end
- function cycleBackward()
- local x = 0
- while x ~= -5 do
- backward()
- x = x - 1
- end
- end
- function switchLaneEven()
- cycleDown()
- cycleUp()
- cycleForward()
- end
- function switchLaneOdd()
- cycleDown()
- cycleUp()
- cycleBackward()
- end
- function switchLaneRight()
- cycleRight()
- sleep(.5)
- end
- function switchLaneleft()
- cycleleft()
- sleep(.5)
- end
- function cycleFullLaneEven()
- local xEven = deltaX
- while xEven > 0 do
- switchLaneEven()
- sleep(2)
- end
- end
- function cycleFullLaneOdd()
- local xOdd = deltaZ
- while xOdd > 0 do
- switchLaneOdd()
- sleep(2)
- end
- end
- function run()
- while deltaZ ~= 0 do
- cycleFullLaneEven()
- sleep(2)
- switchLaneRight()
- deltaZ = deltaZ - 1
- sleep(2)
- cycleFullLaneOdd()
- sleep(2)
- switchLaneRight()
- deltaZ = deltaZ - 1
- end
- end
- rednet.open("right")
- run()
- rednet.close("right")
Advertisement
Add Comment
Please, Sign In to add comment