Advertisement
simon1007

Faiseur de pont

Apr 27th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. print("Avez vous d'abord bien pense a refuel ?")
  2. l = read()
  3. print("Placez 2 stacks de bois dans les slots 1, 2, 3 et 4")
  4. o = read()
  5. print("quelle longueur de rail avez vous ?")
  6. q = read()
  7. print("Placez les rails dans le 5ème slot")
  8. print("appuyez sur une touche pour commencer")
  9. g = read()
  10.  
  11. turtle.forward()
  12.  
  13. local k = turtle.getItemCount(5)
  14. local n = k * q
  15.  
  16. for b = 1, n do
  17.  
  18. for j = 1, q do
  19.  
  20. if turtle.getItemCount(1) < 3 then
  21. turtle.select(2)
  22. end
  23. if turtle.getItemCount(2) < 3 then
  24. turtle.select(3)
  25. end
  26. if turtle.getItemCount(3) < 3 then
  27. turtle.select(4)
  28. end
  29.  
  30. turtle.placeDown()
  31.  
  32. turtle.turnLeft()
  33. turtle.forward()
  34. turtle.placeDown()
  35. turtle.turnLeft()
  36. turtle.turnLeft()
  37. turtle.forward()
  38. turtle.forward()
  39. turtle.placeDown()
  40. turtle.turnLeft()
  41. turtle.turnLeft()
  42. turtle.forward()
  43. turtle.turnRight()
  44. turtle.forward()
  45. end
  46.  
  47. turtle.up()
  48. turtle.back()
  49. turtle.turnRight()
  50. turtle.turnRight()
  51. turtle.select(5)
  52. turtle.placeDown()
  53. turtle.turnRight()
  54. turtle.turnRight()
  55. turtle.forward()
  56. turtle.down()
  57.  
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement