Guest User

TreeChopper v 5.5

a guest
Apr 21st, 2013
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print(" TREE CHOPPER v 5.5")
  4. print("-Made by KrafterKing")
  5. print("place any type of fuel in to refuel")
  6. while turtle.getFuelLevel() < 1 do
  7. turtle.refuel(5)
  8. end
  9. print("type b to start")
  10. local event, param1 = os.pullEvent ("char")
  11. if param1 == "b" then do
  12. turtle.detect()
  13. turtle.dig()
  14. turtle.forward()
  15. while turtle.detectUp() do
  16. turtle.digUp()
  17. turtle.up()
  18. end
  19. while not turtle.detectDown() do
  20. turtle.down()
  21. end
  22. term.clear()
  23. term.setCursorPos(1,1)
  24. print("hello, the job is done.")
  25. textutils.slowPrint("do you want to craft into planks? press Y for yes or N for no")
  26. local event, param2 = os.pullEvent ("char")
  27. local event, param3 = os.pullEvent ("char")
  28. if param2 == "y" then do
  29. turtle.craft(64)
  30. turtle.select(2)
  31. turtle.transferTo(12,64)
  32. textutils.slowPrint("crafted master, have a great day!")
  33. end
  34. else
  35. if param3 == "n" then do
  36. textutils.slowPrint("not crafting, you may take your wood now. Have a great day!")
  37. end
  38. end
  39. end
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment