Advertisement
Muzze77

Crafty Turtle By Muzze77 //edit 1

Jan 6th, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1.  
  2.  
  3. --test--
  4. local num2 = 0
  5. local num3 = 0
  6. local num5 = 0
  7. local num6 = 0
  8. local num7= 0
  9. local num9 = 0
  10. local num10 = 0
  11. local num11 = 0
  12. local num1 = 0
  13. local i = 10
  14. local schlaf = 0.5
  15. local function cut()
  16. sleep(schlaf)
  17. shell.run("clear")
  18. sleep(schlaf)
  19. end
  20. print(" Eingabe Starten: Lädt Dateien")
  21. cut()
  22. print(" Turtle Lädt Dateien Bitte warten !")
  23. cut()
  24. local schlaf = 1
  25. local load = 0
  26. while load >= 90 do
  27.  
  28. print(" Turtle Lädt Dateien Bitte warten !" .. " " .. i .. "% fertig.")
  29. cut()
  30. i = i+10
  31. cut()
  32. end
  33. print("Dateien sind geladen")
  34. schlaf = 1
  35. cut()
  36. print("Aufladen oder PW ?")
  37. print("Reload oder PW eingeben : ")
  38.  
  39. local n = io.read()
  40. if n == "Nemesis" then
  41. turtle.forward()
  42. turtle.select(2)
  43. sleep(1)
  44. --#######################--
  45. turtle.suck()
  46. slot2 = turtle.getItemCount(2)
  47. slot2 = slot2-1
  48. print(" Turtle hat noch " .. slot2 .. " Eisen im Slot 2")
  49. turtle.drop(slot2)
  50. sleep(1)
  51. --#######################--
  52. turtle.select(3)
  53. turtle.suck()
  54. slot3 = turtle.getItemCount(3)
  55. slot3 = slot3-1
  56. print(" Turtle hat noch " .. slot3 .. " Eisen im Slot 3")
  57. turtle.drop(slot3)
  58. sleep(1)
  59. --#######################--
  60. turtle.select(5)
  61. turtle.suck()
  62. slot5 = turtle.getItemCount(5)
  63. slot5 = slot5-1
  64. print(" Turtle hat noch " .. slot5 .. " Eisen im Slot 5")
  65. turtle.drop(slot5)
  66. sleep(1)
  67. --#######################--
  68. turtle.select(6)
  69. turtle.suck()
  70. slot6 = turtle.getItemCount(6)
  71. slot6 = slot6-1
  72. print(" Turtle hat noch " .. slot6 .. " Eisen im Slot 6")
  73. turtle.drop(slot6)
  74. sleep(1)
  75. --#######################--
  76. turtle.select(7)
  77. turtle.suck()
  78. slot7 = turtle.getItemCount(7)
  79. slot7 = slot7-1
  80. print(" Turtle hat noch " .. slot7 .. " Eisen im Slot 7")
  81. turtle.drop(slot7)
  82. sleep(1)
  83. --#######################--
  84. turtle.select(9)
  85. turtle.suck()
  86. slot9 = turtle.getItemCount(9)
  87. slot9 = slot9-1
  88. print(" Turtle hat noch " .. slot9 .. " Eisen im Slot 9")
  89. turtle.drop(slot9)
  90. sleep(1)
  91. --#######################--
  92. turtle.select(10)
  93. turtle.suck()
  94. slot10 = turtle.getItemCount(10)
  95. slot10 = slot10-1
  96. print(" Turtle hat noch " .. slot10 .. " Eisen im Slot 10")
  97. turtle.drop(slot10)
  98. sleep(1)
  99. --#######################--
  100. turtle.select(11)
  101. turtle.suck()
  102. slot11 = turtle.getItemCount(11)
  103. slot11 = slot11-1
  104. print(" Turtle hat noch " .. slot11 .. " Eisen im Slot 11")
  105. turtle.drop(slot11)
  106. sleep(1)
  107. --#######################--
  108. turtle.select(15)
  109. sleep(1)
  110. turtle.craft()
  111. slot15 = turtle.getItemCount(15)
  112. print(" Turtle hat " .. slot15 .. "x Gold gecraftet.")
  113. sleep(1)
  114.  
  115. --#######################--
  116. turtle.turnLeft()
  117. sleep(0.2)
  118. turtle.drop()
  119. sleep(0.5)
  120. turtle.turnRight()
  121. sleep(1)
  122. turtle.back()
  123. print("Done")
  124. sleep(4)
  125. shell.run("startup")
  126.  
  127. elseif n == "Reload" then
  128. local g = turtle.getFuelLevel()
  129. print(g .. " Fuel noch Vorhanden")
  130. sleep(1)
  131. print("Wird Nachgeladen bitte Kohle in Slot 16 Legen un #done# schreiben !\n")
  132. local d = io.read()
  133. while d == "done" do
  134. turtle.select(16)
  135. turtle.refuel()
  136. sleep(1)
  137. print(" Neu Befüllt")
  138. sleep(1)
  139. d = 0
  140. end
  141. else
  142. print("Wrong Password")
  143. sleep(0.3)
  144. shell.run("reboot")
  145. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement