Padhie

farming

Mar 22nd, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. -- pastebin get wtbDTQG4 farming
  2. -- field spezification
  3. local iFelder = 10
  4. local iReihen = 5
  5. local iWasserReihe = 3
  6.  
  7. -- turtle spetification
  8. local iSamenSlot = 1
  9. local iKohleSlot = 2
  10.  
  11. local iF = 1
  12. local iR = 1
  13.  
  14. function nextLine(iAktuell)
  15. if iAktuell%2==0 then
  16. turtle.turnRight()
  17. turtle.forward()
  18. turtle.turnRight()
  19. else
  20. turtle.turnLeft()
  21. turtle.forward()
  22. turtle.turnLeft()
  23. end
  24. end
  25.  
  26. function checkFuel(iSamenSlot, iKohleSlot)
  27. iTankMin = 20
  28. if turtle.getFuelLevel() < iTankMin then
  29. iKohle = turtle.getItemCount(iKohleSlot)
  30. turtle.select(iKohleSlot)
  31. turtle.refuel(iKohle/2)
  32. turtle.select(iSamenSlot)
  33. end
  34. end
  35.  
  36. turtle.up()
  37. turtle.up()
  38. while iR<iReihen do
  39. while iF<iFelder do
  40. turtle.forward()
  41. if iReihe == iWasserReihe then
  42. else
  43. turtle.digDown()
  44. turtle.placeDown()
  45. end
  46. iF = iF+1
  47. end
  48. nextLine(iR)
  49. iF = 1
  50. iR = iR+1
  51. checkFuel(iSamenSlot, iKohleSlot)
  52. end
  53. turtle.turnRight()
  54. turtle.turnRight()
  55. turtle.down()
  56. turtle.down()
  57. -- create by Padhie alias PaddyPadhie
Advertisement
Add Comment
Please, Sign In to add comment