Clem105

Vetetables Farm without Dispencer

Aug 25th, 2013
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. pa--Avant tout chose placer bone meal slot 2 , les seeds and co dans les slots 1,5,9,13 correpondant à leurs noms puis remplir les slots 6,7,8,10,11,12,14,15 avec de la bouse ne  pas oublier le sceau d eau dans la slot 16 ,Merci et bonne utilisation !
  2. local slot =  0
  3. local carrot = "carrot"
  4. local wheat = "wheat"
  5. local cocoa_beans = "cocoa_beans"
  6. local potatoes =  "potatoes"
  7. print("Veuillez entrez une semence")
  8. local input = read()
  9. if input == carrot then
  10.     slot = 5
  11. elseif input == wheat then
  12.     slot = 1
  13. elseif input == cocoa_beans then
  14.     slot = 9
  15. elseif input == potatoes then
  16.     slot = 13
  17. else
  18.     print("Choix incorrect veuillez recommencer")
  19. end
  20. while true do
  21.     turtle.select(slot)
  22.     turtle.place()
  23.     turtle.select(2)
  24.     for i=1,3 do
  25.         turtle.place()
  26.         if turtle.getItemCount(2) == 0 then --si plus de bone meal
  27.             turtle.suckDown() --on fait le plein dans le coffre sous la turtle
  28.         end
  29.     end
  30.     turtle.select(16)
  31.     turtle.placeUp()
  32.     sleep(0.2)
  33.     turtle.placeUp()
  34.     turtle.select(slot)
  35.     turtle.suck() --on recupere les items
  36.     turtle.select(3)
  37.     turtle.turnLeft()
  38.     turtle.drop() --on vide dans le coffre de devant
  39.     turtle.select(4)
  40.     turtle.drop() --idem
  41.     turtle.turnRight()
  42. end
Advertisement
Add Comment
Please, Sign In to add comment