Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- function up()
- turtle.up()
- end
- function down()
- turtle.down()
- end
- function fr()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- function fl()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function br()
- turtle.back()
- turtle.turnLeft()
- turtle.back()
- turtle.turnRight()
- end
- function bl()
- turtle.back()
- turtle.turnRight()
- turtle.back()
- turtle.turnLeft()
- end
- function goHome()
- shell.run("goHome")
- rednet.open("right")
- end
- function goOut()
- shell.run("goOut")
- rednet.open("right")
- end
- function waitMsg()
- local ID,msg,dist = rednet.receive()
- print(msg)
- if msg=="fr" then fr() end
- if msg=="br" then br() end
- if msg=="fl" then fl() end
- if msg=="bl" then bl() end
- if msg=="jfr" then
- up()
- fr()
- fr()
- down()
- end
- if msg=="jbr" then
- up()
- br()
- br()
- down()
- end
- if msg=="jfl" then
- up()
- fl()
- fl()
- down()
- end
- if msg=="jbl" then
- up()
- bl()
- bl()
- down()
- end
- if msg=="goHome" then goHome() end
- if msg=="goOut" then goOut() end
- rednet.send(ID,"Success")
- end
- while true do waitMsg() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement