Guest User

checkerBot

a guest
Apr 3rd, 2013
1,641
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("right")
  2.  
  3. function up()
  4.    turtle.up()
  5. end
  6.  
  7. function down()
  8.    turtle.down()
  9. end
  10.  
  11. function fr()
  12.    turtle.forward()
  13.    turtle.turnRight()
  14.    turtle.forward()
  15.    turtle.turnLeft()
  16. end
  17.  
  18. function fl()
  19.    turtle.forward()
  20.    turtle.turnLeft()
  21.    turtle.forward()
  22.    turtle.turnRight()
  23. end
  24.  
  25. function br()
  26.    turtle.back()
  27.    turtle.turnLeft()
  28.    turtle.back()
  29.    turtle.turnRight()
  30. end
  31.  
  32. function bl()
  33.    turtle.back()
  34.    turtle.turnRight()
  35.    turtle.back()
  36.    turtle.turnLeft()
  37. end
  38.  
  39. function goHome()
  40.    shell.run("goHome")
  41.    rednet.open("right")
  42. end
  43.  
  44. function goOut()
  45.    shell.run("goOut")
  46.    rednet.open("right")
  47. end
  48.  
  49. function waitMsg()
  50.    local ID,msg,dist = rednet.receive()
  51.    print(msg)
  52.    if msg=="fr" then fr() end
  53.    if msg=="br" then br() end
  54.    if msg=="fl" then fl() end
  55.    if msg=="bl" then bl() end
  56.    if msg=="jfr" then
  57.       up()
  58.       fr()
  59.       fr()
  60.       down()
  61.    end
  62.    if msg=="jbr" then
  63.       up()
  64.       br()
  65.       br()
  66.       down()
  67.    end
  68.    if msg=="jfl" then
  69.       up()
  70.       fl()
  71.       fl()
  72.       down()
  73.    end
  74.    if msg=="jbl" then
  75.       up()
  76.       bl()
  77.       bl()
  78.       down()
  79.    end
  80.    if msg=="goHome" then goHome() end
  81.    if msg=="goOut" then goOut() end
  82.    rednet.send(ID,"Success")
  83. end
  84.  
  85. while true do waitMsg() end
RAW Paste Data