Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mineshaftLength = 12
- cellLength = 1
- msg = 0
- print("Computercraft Turtle Control Client")
- print("-----------------------------------")
- print(" W E T Y")
- print(" A S D Q G H")
- print(" U I O P B N")
- while true do
- local event, msg = os.pullEvent("char")
- for a = 1, 9, 1 do
- if tonumber(msg) == a then
- cellLength = a
- write(cellLength)
- end
- end
- if msg == "w" then
- turtle.forward()
- end
- if msg == "a" then
- turtle.turnLeft()
- end
- if msg == "s" then
- turtle.back()
- end
- if msg == "d" then
- turtle.turnRight()
- end
- if msg == "e" then
- turtle.up()
- end
- if msg == "q" then
- turtle.down()
- end
- if msg == "t" then
- turtle.attackUp()
- end
- if msg == "g" then
- turtle.attack()
- end
- if msg == "b" then
- turtle.attackDown()
- end
- if msg == "y" then
- turtle.digUp()
- end
- if msg == "h" then
- turtle.dig()
- end
- if msg == "n" then
- turtle.digDown()
- end
- if msg == "i" then
- for a = 1, mineshaftLength, 1 do
- for b = 1, cellLength, 1 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- turtle.digDown()
- turtle.down()
- end
- end
- if msg == "o" then
- for a = 1, mineshaftLength, 1 do
- for b = 1, cellLength, 1 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- end
- end
- if msg == "p" then
- for a = 1, mineshaftLength, 1 do
- for b = 1, cellLength, 1 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- turtle.digUp()
- turtle.up()
- end
- end
- if msg == "u" then
- turtle.up()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.down()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement