Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. term.setBackgroundColor(colors.white)
  2. term.setTextColor(colors.black)
  3. term.clear()
  4. term.setCursorPos(1,1)
  5.  
  6. turtle.select(1)
  7. local data = turtle.getItemDetail()
  8. if data.name == "minecraft:sapling" then
  9. print("Derzeit befinden sich noch: ", data.count, " Saplings in Slot 1")
  10. if data.count < 10 then
  11. print("Bitte mindestens noch: ", 10-data.count, " Saplings in Slot 1 legen!")
  12. print("Saplins eingelegt und bereit das Programm fortzufahren?")
  13. print("Druecke einfach irgendeine Taste um fortzufahren!")
  14. os.pullEvent("key")
  15. elseif data.count > 10 then
  16. print("und somit genug zum starten!")
  17. end
  18. elseif data.name ~= "minecraft:sapling" then
  19. print("Es befinden sich keine Saplings in Slot 1!")
  20. end
  21.  
  22.  
  23.  
  24. function faellen()
  25. for i=1,8 do
  26. turtle.dig()
  27. turtle.digUp()
  28. turtle.up()
  29. end
  30. for i=1,8 do
  31. turtle.down()
  32. end
  33. turtle.select(1)
  34. turtle.place()
  35. end
  36.  
  37. function zustand()
  38. if turtle.compare(1) == true then
  39. print("Derzeit noch ein Setzling!")
  40. print("...Mache mit dem naechsten Baum weiter!")
  41. elseif turtle.compare(1) == false then
  42. print("Bereits ein Baum!")
  43. print("Ich werde ihn nun faellen!")
  44. faellen()
  45. end
  46. end
  47.  
  48. zustand()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement