MagicLegend

Quarry Program

Jul 30th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.60 KB | None | 0 0
  1. turtle.select(1)
  2. local Check = "False"
  3.  
  4. print("Check = "..Check)
  5. --function Startup()
  6. if turtle.compareDown() then
  7.     print("How many times should i loop?")
  8.     local Num = tostring( read() )
  9.     sleep(1)
  10.  term.clear()
  11.  term.setCursorPos(1,1)
  12.  sleep(0.5)
  13.  print("I loop "..Num.." times")
  14.         print("And wich way should i move?")
  15.         print("Usage: Type 'Left' or 'Right'")
  16.         local Move = tostring( read() )
  17.    term.clear()
  18.    term.setCursorPos(1,1)
  19.   print("You chose: "..Move)
  20.   print("Good choice!")
  21.   sleep(1)
  22.   term.clear()
  23.   term.setCursorPos(1,1)
  24.    
  25.   for i=1,10 do
  26.   print("You chose: "..Move)
  27.   print("Good choice!")
  28.         print("Starting Engines.")
  29.         sleep(0.25)
  30.         term.clear()
  31.         term.setCursorPos(1,1)
  32.   print("You chose: "..Move)       
  33.   print("Good choice!")
  34.   print("Starting Engines..")
  35.         sleep(0.25)
  36.         term.clear()
  37.         term.setCursorPos(1,1)
  38.         print("You chose: "..Move)
  39.   print("Good choice!")
  40.   print("Starting Engines...")
  41.   sleep(0.25)
  42.         term.clear()
  43.         term.setCursorPos(1,1)
  44.     end
  45.  
  46. else
  47. print("There's no cobble under me/in slot 1!")
  48. end
  49. --end
  50. print(Move)
  51.  
  52.  
  53. --[[function Check()
  54. if Move = Left then
  55.   Check = True
  56.   elseif Move = Right then
  57.   Check = True
  58.   else
  59.   Check = False
  60. end
  61.  
  62. if Check = True then
  63. print("You entered all i needed!")
  64. sleep(1)
  65. print("Lets roll! :D")
  66. else
  67. print("You entered something wrong!")
  68. sleep(1)
  69. print("Rebooting in 5 seconds")
  70. sleep(1)
  71. term.clear()
  72. term.setCursorPos(1,1)
  73. print("4")
  74. sleep(1)
  75. term.clear()
  76. term.setCursorPos(1,1)
  77. print("3")
  78. sleep(1)
  79. term.clear()
  80. term.setCursorPos(1,1)
  81. print("2")
  82. sleep(1)
  83. term.clear()
  84. term.setCursorPos(1,1)
  85. print("1")
  86. sleep(0.2)
  87. term.clear()
  88. term.setCursorPos(1,1)
  89. print("Goodbye!")
  90. os.reboot()
  91. end
  92. end
  93.  
  94. function Work() for i=1,Num do
  95.   print("Looped "..tostring(i).." times")
  96.   turtle.forward()
  97.   sleep(0.3)
  98. end
  99.  
  100. turtle.select(1)
  101. turtle.placeDown()
  102. turtle.up()
  103. turtle.select(2)
  104. turtle.placeDown()
  105. turtle.turnLeft()
  106. turtle.turnLeft()
  107. turtle.forward()
  108. turtle.down()
  109.  
  110. Num1 = Num-1
  111.  
  112. print(Num)
  113. print(Num1)
  114.  
  115. for i=1,Num1 do
  116.   print("Looped "..tostring(i).." times")
  117.   turtle.forward()
  118.   sleep(0.3)
  119. end
  120.  
  121. turtle.turnRight()
  122.  
  123. for i=1,Num do
  124.   print("Looped "..tostring(i).." times")
  125.   turtle.forward()
  126.   sleep(0.3)
  127. end
  128.  
  129. turtle.select(1)
  130. turtle.turnLeft()
  131. turtle.turnLeft()
  132. turtle.placeDown()
  133. turtle.up()
  134. turtle.select(2)
  135. turtle.placeDown()
  136. turtle.forward()
  137. turtle.down()
  138. turtle.select(1)
  139.  
  140. for i=1,Num1 do
  141.   print("Looped "..tostring(i).." times")
  142.   turtle.forward()
  143.   sleep(0.3)
  144. end
  145.  
  146. print("Done! Place your quarry! :D")
  147. end
  148.  
  149. Startup()
  150. Check()
  151. Work()]]--
Advertisement
Add Comment
Please, Sign In to add comment