Clem105

Convertiseur d'Ender Pearl avec Minium stone [WIP]

Sep 8th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. local iron = "iron"
  2. local gold = "gold"
  3. local diamond = "diamond"
  4. local slot=3
  5. function Resultat()
  6.     turtle.select(2)
  7.     turtle.suckUp()
  8.     turtle.drop()
  9. end
  10. function EnderPearlToIron()
  11.     turtle.select(2)
  12.     turtle.suckDown()
  13.     turtle.select(16)
  14.     for i=1,16 do
  15.         turtle.craft()
  16.         turtle.dropUp()
  17.     end
  18. end
  19. function IronToGold()
  20.     turtle.select(2)
  21.     turtle.suckUp()
  22.     for i=1,7 do
  23.         turtle.transferTo(slot, 8)
  24.         slot = slot+1
  25.         if slot == 4 or slot == 8 then
  26.             slot = slot+1
  27.         end
  28.     end
  29.     turtle.select(16)
  30.     for i=1,8 do
  31.         turtle.craft()
  32.         turtle.dropUp()
  33.     end
  34. end
  35. function GoldToDiamond()
  36.     turtle.select(2)
  37.     turtle.suckUp()
  38.     turtle.transferTo(3, 2)
  39.     turtle.transferTo(5, 2)
  40.     turtle.transferTo(6, 2)
  41.     turtle.select(16)
  42.     for i=1,2 do
  43.         turtle.craft()
  44.         turtle.drop()
  45.     end
  46. end
  47. print("Quelle etape souhaitez vous ?")
  48. local etape = read()
  49. if etape == iron then
  50.     EnderPearlToIron()
  51.     Resultat() 
  52. elseif etape == gold then
  53.     EnderPearlToIron()
  54.     IronToGold()
  55.     Resultat()
  56. elseif etape == diamond then
  57.     EnderPearlToIron()
  58.     IronToGold()
  59.     GoldToDiamond()
  60.     Resultat()
  61. else
  62.     print("Choix Incorrect veuillez recommencer.")
  63. end
Advertisement
Add Comment
Please, Sign In to add comment