Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function intro()
- term.clear()
- term.setCursorPos(1,1)
- print "Welcome to Zugbug's"
- print "Navigation Utility "
- print "-------------------"
- print " Navigate with: "
- print " W "
- print " A S D "
- print "|SHIFT||SPACE|"
- end
- function outro()
- print("Program exiting")
- end
- intro()
- while true do
- local event, b = os.pullEvent("key")
- if b == 20 then outro() break
- elseif b == 17 then turtle.forward()
- elseif b == 30 then turtle.turnLeft()
- elseif b == 31 then turtle.back()
- elseif b == 32 then turtle.turnRight()
- elseif b == 42 then turtle.down()
- elseif b == 57 then turtle.up()
- elseif b == 18 then turtle.dig()
- elseif b == 19 then turtle.place()
- elseif b == 16 then turtle.attack()
- elseif b == 2 then turtle.select(1)
- elseif b == 3 then turtle.select(2)
- elseif b == 4 then turtle.select(3)
- elseif b == 5 then turtle.select(4)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment