Clem105

Convetiseur de bois avec Mininum stone

Aug 30th, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1. --minium stone slot 1 , coffre devent la turtle = reception , coffre dessous arrivée de bois , coffre du haut = buffer
  2. local obsidian = "obsidian"
  3. local iron = "iron"
  4. local gold = "gold"
  5. local diamond = "diamond"
  6. local slot=3
  7. function Resultat()
  8.     turtle.select(2)
  9.     turtle.suckUp()
  10.     turtle.drop()
  11. end
  12. function WoodToObsidian()
  13.     for i=1,2 do
  14.         turtle.select(2)
  15.         turtle.suckDown()
  16.         turtle.select(3)
  17.         turtle.suckDown()
  18.         turtle.select(16)
  19.         for i=1,64 do
  20.             turtle.craft()
  21.             turtle.dropUp()
  22.         end
  23.     end
  24. end
  25. function ObsidianToIron()
  26.     turtle.select(2)
  27.     turtle.suckUp()
  28.     turtle.transferTo(5, 32)
  29.     turtle.select(3)
  30.     turtle.suckUp()
  31.     turtle.transferTo(6, 32)
  32.     turtle.select(16)
  33.     for i=1,32 do
  34.         turtle.craft()
  35.         turtle.dropUp()
  36.     end
  37. end
  38. function IronToGold()
  39.     turtle.select(2)
  40.     turtle.suckUp()
  41.     for i=1,7 do
  42.         turtle.transferTo(slot, 4)
  43.         slot = slot+1
  44.         if slot == 4 or slot == 8 then
  45.             slot = slot+1
  46.         end
  47.     end
  48.     turtle.select(16)
  49.     for i=1,4 do
  50.         turtle.craft()
  51.         turtle.dropUp()
  52.     end
  53. end
  54. function GoldToDiamond()
  55.     turtle.select(2)
  56.     turtle.suckUp()
  57.     turtle.transferTo(3, 1)
  58.     turtle.transferTo(5, 1)
  59.     turtle.transferTo(6, 1)
  60.     turtle.select(16)
  61.     turtle.craft()
  62.     turtle.drop()
  63. end
  64. print("Quelle etape souhaitez vous ?")
  65. local etape = read()
  66. if etape == obsidian then
  67.     WoodToObsidian()
  68.     turtle.select(2)
  69.     for i=1,2 do
  70.         turtle.suckUp()
  71.         turtle.drop()
  72.     end
  73. elseif etape == iron then
  74.     WoodToObsidian()
  75.     ObsidianToIron()
  76.     Resultat() 
  77. elseif etape == gold then
  78.     WoodToObsidian()
  79.     ObsidianToIron()
  80.     IronToGold()
  81.     Resultat()
  82. elseif etape == diamond then
  83.     WoodToObsidian()
  84.     ObsidianToIron()
  85.     IronToGold()
  86.     GoldToDiamond()
  87.     Resultat()
  88. else
  89.     print("Choix Incorrect veuillez recommencer.")
  90. end
Advertisement
Add Comment
Please, Sign In to add comment