Advertisement
Guest User

start

a guest
Jul 13th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.79 KB | None | 0 0
  1. seed = 5 -- slot5 = 20 seeds . slot6 = 1 seed. slot7 = 1 seed. slot8 = 1 seed.
  2. wheat = 9 -- slot9 = 1 wheat. slot10 = 1 wheat. slot11 = 1 wheat. slot12 = 1 wheat.
  3. coal = 4
  4.  
  5. function reFuel()
  6.  
  7.     turtle.select(4)
  8.     if turtle.getFuelLevel() < 324 then
  9.        turtle.suck(5)
  10.        turtle.refuel()
  11.     end
  12.     turtle.suck(1)
  13.     turtle.turnLeft()
  14.     turtle.forward()
  15. end
  16.  
  17. function depositWheat()
  18.  
  19.    turtle.turnRight()
  20.    for i =9,12 do
  21.      turtle.select(i)
  22.      turtle.drop(turtle.getItemCount(i)-1)
  23.    end
  24. end
  25.  
  26. function depositSeed()
  27.  
  28.    turtle.turnLeft()
  29.    turtle.select(5)
  30.    turtle.dropUp(turtle.getItemCount(5)-20)
  31.    for i = 6,8 do
  32.      turtle.select(i)
  33.      turtle.dropUp(turtle.getItemCount(i)-1)
  34.    end
  35. end
  36.  
  37. function moveRankLeft()
  38.  
  39.    turtle.select(seed)
  40.    for i = 1,17 do
  41.         turtle.digDown()
  42.         turtle.placeDown()
  43.         turtle.forward()
  44.    end
  45.    turtle.digDown()
  46.    turtle.placeDown()
  47.    turtle.turnLeft()
  48.    turtle.forward()
  49.    turtle.turnLeft()
  50. end
  51.  
  52. function moveRankRight()
  53.    turtle.select(seed)
  54.    for i = 1,17 do
  55.       turtle.digDown()
  56.       turtle.placeDown()
  57.       turtle.forward()
  58.    end
  59.    turtle.digDown()
  60.    turtle.placeDown()
  61.    turtle.turnRight()
  62.    turtle.forward()
  63.    turtle.turnRight()
  64. end
  65.  
  66.  
  67. function imcominghome()
  68.  
  69.    turtle.turnRight()
  70.    for i = 1,18 do
  71.      turtle.forward()
  72.    end
  73.    turtle.turnRight()
  74.    turtle.forward()
  75.    turtle.turnLeft()
  76. end
  77.  
  78. reFuel()
  79. moveRankLeft()
  80. moveRankRight()
  81. moveRankLeft()
  82. moveRankRight()
  83. moveRankLeft()
  84. moveRankRight()
  85. moveRankLeft()
  86. moveRankRight()
  87. moveRankLeft()
  88. moveRankRight()
  89. moveRankLeft()
  90. moveRankRight()
  91. moveRankLeft()
  92. moveRankRight()
  93. moveRankLeft()
  94. moveRankRight()
  95. moveRankLeft()
  96. moveRankRight()
  97. imcominghome()
  98. depositWheat()
  99. depositSeed()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement