David_Turtle

Turtle "Cobblefarmer"

Nov 22nd, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. print("Cobblefarmer v.1.1")
  2. print("")
  3. print("Positoniere die Turtle vor einer unendlichen Cobblestone Quelle")
  4. print("Lege Treibstoff in den ersten Slot")
  5. print("Stelle unter der Turtle eine Kiste")
  6. print("")
  7. print("Wie viel Cobblestone farmen?")
  8. local blocks = read()
  9. blocks = tonumber(blocks)
  10.  
  11. if blocks > 1000 then
  12.     print("Unendlich Cobblestone farmen?(y/n)")
  13.     local command = read()
  14.     if command == "y" then
  15.         print("Unendlich Cobblestone wird gefarmt!")
  16.         local infinite = true
  17.     else
  18.         print(blocks.." Cobblestone werden gefarmt!")
  19.         local infinite = false
  20.     end
  21. end
  22.  
  23. if infinite == true then
  24.     while true do
  25.         turtle.dig()
  26.         turtle.select(2)
  27.         turtle.dropDown()
  28.         turtle.dropUp()
  29.         os.sleep(2)
  30.     end
  31. else
  32.     for i=0,blocks do
  33.         turtle.dig()
  34.         turtle.select(2)
  35.         turtle.dropDown()
  36.         os.sleep(2)
  37.     end
  38. end
  39. print("Fertig!")
Advertisement
Add Comment
Please, Sign In to add comment