Advertisement
Guest User

startup

a guest
Feb 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.24 KB | None | 0 0
  1. --pastebin get zQZKgEP5 startup
  2.  
  3.  
  4. function analyse()
  5. turtle.inspectDown()
  6.  
  7. a,b = turtle.inspectDown()
  8. c = b.metadata
  9. print(c)
  10.     if c == 7 then
  11.     turtle.select(1)
  12.     turtle.digDown()
  13.  
  14.  
  15.     f = turtle.getItemDetail(1)
  16.     name_1 = f.name
  17.             if name_1 == "minecraft:ender_pearl" then
  18.             turtle.select(2)
  19.             name_2 = turtle.getItemDetail(2)
  20.                 if  name_2 == "Extrautilities:plant/ender_lily" then
  21.                 turtle.placeDown()
  22.                 end
  23.             end
  24.  
  25.     else
  26.     turtle.forward()
  27. sleep(5)
  28.     end
  29. end
  30.  
  31.  
  32. function aller()
  33. for i= 1,7 do
  34. analyse()
  35. end
  36. end
  37.  
  38. function gauche()
  39. turtle.turnLeft()
  40.  
  41.  
  42. analyse()
  43. turtle.turnLeft()
  44.  
  45. end
  46.  
  47. function droite()
  48. turtle.turnRight()
  49.  
  50. analyse()
  51. turtle.turnRight()
  52.  
  53. end
  54.  
  55. function etage()
  56.  
  57. turtle.up()
  58.     for mr= 1,7 do
  59.     aller()
  60.     gauche()
  61.     aller()
  62.     droite()
  63.     end
  64. end
  65.  
  66. function trou()
  67. etage()
  68. turtle.back()
  69. turtle.turnRight()
  70. for p= 1,14 do
  71. turtle.forward()
  72. end
  73.  
  74. turtle.turnLeft()
  75. turtle.down()
  76.  
  77. end
  78. while true do
  79. a, begin = turtle.inspect()
  80. mot = begin.metadata
  81. print(c)
  82. print(mot)
  83. sleep(20)
  84. if mot == 7 then
  85.  
  86. trou()
  87. turtle.turnLeft()
  88. turtle.turnLeft()
  89. turtle.select(1)
  90. turtle.drop()
  91. turtle.select(2)
  92. turtle.drop()
  93. turtle.select(1)
  94. turtle.turnLeft()
  95. turtle.turnleft()
  96. sleep(1000)
  97. end
  98. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement