Advertisement
CCninja86

AuraScan v1.0

Feb 28th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.00 KB | None | 0 0
  1. print ("IntelliScan v1.0")
  2. print ("")
  3. print ("Scanning for Goggles of Revealing peripheral...")
  4.  
  5. peripheralLeft = peripheral.isPresent("Left")
  6.  
  7. if peripheralLeft == true then
  8. print ("Goggles of Revealing detected on left face of Turtle.")
  9. peripheral.wrap("Left")
  10.  
  11. elseif peripheralLeft == false then
  12. peripheralRight = peripheral.isPresent("Right")
  13. sleep(1)
  14.  
  15. if peripheralRight == true then
  16. print ("Goggles of Revealing detected on right face of Turtle.")
  17. peripheral.wrap("Right")
  18.  
  19. elseif peripheralRight == false then
  20. peripheralTop = peripheral.isPresent("Top")
  21. sleep(1)
  22.  
  23. if peripheralTop == true then
  24. print ("Goggles of Revealing detected on top face of Turtle.")
  25. peripheral.wrap("Top")
  26.  
  27. elseif peripheralTop == false then
  28. peripheralBottom = peripheral.isPresent("Bottom")
  29. sleep(1)
  30.  
  31. if peripheralBottom == true then
  32. print ("Goggles of Revealing detected on bottom face of Turtle.")
  33. peripheral.wrap("Bottom")
  34.  
  35. elseif peripheralBottom == false then
  36. peripheralBack = peripheral.isPresent("Back")
  37. sleep(1)
  38.  
  39. if peripheralBack == true then
  40. print ("Goggles of Revealing detected on back face of Turtle.")
  41. peripheral.wrap("Back")
  42.  
  43. elseif peripheralBack == false then
  44. peripheralFront = peripheral.isPresent("Front")
  45. sleep(1)
  46.  
  47. if peripheralFront == true then
  48. print ("Goggles of Revealing detected on front face of Turtle.")
  49. peripheral.wrap("Front")
  50.  
  51. elseif peripheralFront == false then
  52. print ("No Goggles of Revealing peripherals were detected on any of the Turtle's faces. Please make sure the Turtle has the Goggles of Revealing peripheral on one of it's faces.")
  53. sleep(1)
  54. end
  55. end
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62. end
  63. end
  64. end
  65. end
  66.  
  67. if peripheralLeft == true
  68. or peripheralRight == true
  69. or peripheralTop == true
  70. or peripheralBottom == true
  71. or peripheralBack == true
  72. or peripheralFront == true then
  73.  
  74. print ("| SCAN |")
  75.  
  76. local event XY = os.pullEvent("mouse_click")
  77. XY = X..","..Y
  78.  
  79. if XY == "1, 3"
  80. or XY == "2, 3"
  81. or XY == "3, 3"
  82. or XY == "4, 3"
  83. or XY == "5, 3"
  84. or XY == "6, 3"
  85. or XY == "7, 3"
  86. or XY == "8, 3" then
  87.  
  88. print ("Scanning...")
  89. sleep(2)
  90. m.getAuraNode()
  91. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement