Advertisement
Vorakh

Turtle Ricarica Propellente

Aug 16th, 2013 (edited)
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. -- Nome: Turtle Ricarica Propellente
  2. -- Programmatore: Vorakh
  3. -- Data: 16/8/2013
  4.  
  5. -- Ricarica Propellente [refp3]
  6. local tArgs = {...}
  7. local nTNT = tonumber(tArgs[1])
  8.  
  9. turtle.back()
  10. turtle.down()
  11. turtle.down()
  12. turtle.turnRight()
  13. turtle.forward()
  14. turtle.turnLeft()
  15. --Caricamento pistone Destro
  16. i = 1
  17. turtle.select(1)
  18. while (i <= nTNT) do
  19.     turtle.place(1)
  20.     sleep(0.2)
  21.     shell.run("redpulse", "top", 1, 0.1)
  22.     i  = i + 1
  23. end
  24.  
  25. turtle.turnLeft()
  26. turtle.forward()
  27. turtle.forward()
  28. turtle.turnRight()
  29. -- Caricamento Pistone sinistro
  30. j = 1
  31. turtle.select(2)
  32. while (j <= nTNT) do
  33.     turtle.place()
  34.     sleep(0.2)
  35.     shell.run("redpulse", "top", 1, 0.1)
  36.     j  = j + 1
  37. end
  38.  
  39. turtle.turnRight()
  40. turtle.forward()
  41. turtle.turnLeft()
  42. turtle.up()
  43. turtle.up()
  44. turtle.forward()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement