poshelanhui

stypeni

Apr 13th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.47 KB | None | 0 0
  1. print("zdarova ebat")
  2. sleep(0.5)
  3. write("skolko etazhei kopat?")
  4. n = read()
  5. m = read()
  6. n = n + 0
  7. m = m + 0
  8. a = 0
  9. b = 0
  10. c = 0
  11. br = 0
  12. fak = 0
  13. print("kak nehui")
  14. sleep(0.5)
  15. function detect()
  16.     aa,bb = turtle.inspect()
  17.     aab = bb.name
  18.     if  aab == "minecraft:bedrock" then
  19.     n = n - 100
  20.     print ("suka sam eto lomai")
  21.     else
  22.     print ("ok")
  23.     end
  24. end
  25. function detectUp()
  26.     ab,ba = turtle.inspectUp()
  27.     aba = ba.name
  28.     if  aba == "minecraft:bedrock" then
  29.     n = n - 100
  30.     print ("suka sam eto lomai")
  31.     else
  32.     print ("ok")
  33.     end
  34. end
  35. function detectDown()
  36.     abb,baa = turtle.inspectDown()
  37.     abb = baa.name
  38.     if  abb == "minecraft:bedrock" then
  39.     n = n - 100
  40.     print ("suka sam eto lomai")
  41.     else
  42.     print ("ok")
  43.     end
  44. end
  45. while n>0 do
  46.     detectUp()
  47.     detect()
  48.     detectDown()
  49.     turtle.digUp() 
  50.     sleep(0.1)
  51.     turtle.dig()
  52.     sleep(0.1)
  53.     turtle.forward()
  54.     sleep(0.1)
  55.     turtle.digUp() 
  56.     sleep(0.1)
  57.     turtle.up()
  58.     sleep(0.1)
  59.     turtle.digUp() 
  60.     sleep(0.1)
  61.     turtle.down()
  62.     sleep(0.1)
  63.     turtle.digDown()
  64.     sleep(0.1)
  65.     turtle.down()
  66.     sleep(0.1)
  67.     n=n-1
  68.     a=a+1
  69.     b=b+1
  70. end
  71. turtle.turnRight()
  72. turtle.turnRight()
  73. function nazad()
  74.     turtle.up()
  75.     turtle.forward()
  76. end nazad()
  77. while a>1 do
  78.     nazad()
  79.     a=a-1
  80. end
  81. turtle.turnRight()
  82. turtle.turnRight()
  83. sleep(0.1)
  84. turtle.select(2)
  85. sleep(0.1)
  86. turtle.forward()
  87. sleep(0.1)
  88. turtle.forward()
  89. sleep(0.1)
  90. turtle.down()
  91. sleep(0.1)
  92. turtle.turnRight()
  93. turtle.turnRight()
  94. sleep(0.1)
  95. turtle.place()
  96. sleep(0.1)
  97. turtle.turnRight()
  98. turtle.turnRight()
  99. while m>0 do
  100.     turtle.forward()
  101.     sleep(0.1)
  102.     if fak==5 then
  103.             turtle.select(1)
  104.             sleep(0.1)
  105.             turtle.place()
  106.             sleep(0.1)
  107.             fak =  -5
  108.             print("pora stavit")
  109.         else
  110.             print("rano stavit")
  111.     end
  112.     sleep(0.1)
  113.     turtle.down()
  114.     sleep(0.1)
  115.     turtle.turnRight()
  116.     sleep(0.1)
  117.     turtle.turnRight()
  118.     sleep(0.1)
  119.     turtle.select(2)
  120.     sleep(0.1)
  121.     turtle.place()
  122.     sleep(0.1)
  123.     turtle.turnRight()
  124.     sleep(0.1)
  125.     turtle.turnRight()
  126.     sleep(0.1)
  127.     m=m-1
  128.     fak=fak+1
  129. end
  130. function nazad1()
  131.     turtle.up()
  132.     sleep(0.1)
  133.     turtle.up()
  134.     sleep(0.1)
  135.     turtle.forward()
  136.     sleep(0.1)
  137. end nazad1()
  138. turtle.turnRight()
  139. turtle.turnRight()
  140. sleep(0.1)
  141. while b>1 do
  142.     nazad1()
  143.     b=b-1
  144. end
  145. turtle.forward()
  146. turtle.down()
  147. turtle.drop()
  148. turtle.select(2)
  149. turtle.drop()
  150. turtle.select(3)
  151. turtle.drop()
  152. turtle.select(4)
  153. turtle.drop()
  154. turtle.select(5)
  155. turtle.drop()
  156. turtle.select(6)
  157. turtle.drop()
  158. turtle.select(7)
  159. turtle.drop()
  160. turtle.select(8)
  161. turtle.drop()
  162. turtle.select(9)
  163. turtle.drop()
  164. turtle.select(1)
Advertisement
Add Comment
Please, Sign In to add comment