Advertisement
Muzze77

Crafty Turtle By Muzze77

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