Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. while true do
  2.  
  3. x,y,z = commands.getBlockPosition()
  4.  
  5. local i = -1
  6. local e = 1
  7. local o = 2
  8. rednet.open("bottom")
  9.  
  10. event, id, choix, = os.pullEvent()
  11. if event == "rednet_message" then
  12. if choix == "Dock" then
  13. mat = "wool"
  14. rednet.broadcast("request")
  15. print("Docking granted")
  16. elseif choix == "Undock" then
  17. mat = "air"
  18. rednet.broadcast("quit")
  19. print("Undocked work please wait...")
  20. end
  21.  
  22. while o ~= 15 do
  23.  
  24. while i ~= 2 do
  25. if (choix == "Dock") and (i = 0) then
  26. commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
  27. else
  28. commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
  29. i = i+1
  30. sleep(0.1)
  31. end
  32. end
  33. i = 1
  34. sleep(0.1)
  35.  
  36. while i ~= 4 do
  37. if (choix == "Dock") and (i = 2) then
  38. commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
  39. else
  40. commands.async.setBlock("~2", "~"..(i), "~"..(-o), "minecraft:"..mat)
  41. i = i+1
  42. sleep(0.1)
  43. end
  44. end
  45. i = 1
  46. sleep(0.1)
  47.  
  48. while i ~= -2 do
  49. if (choix == "Dock") and (i = 0) then
  50. commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
  51. else
  52. commands.async.setBlock("~"..(i), "~4", "~"..(-o), "minecraft:"..mat)
  53. i = i-1
  54. sleep(0.1)
  55. end
  56. end
  57. i = 3
  58. sleep(0.1)
  59.  
  60. while i ~= 0 do
  61. if (choix == "Dock") and (i = 2) then
  62. commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
  63. else
  64. commands.async.setBlock("~-2", "~"..(i), "~"..(-o), "minecraft:"..mat)
  65. i = i -1
  66. sleep(0.1)
  67. end
  68. end
  69. i = -1
  70. sleep(0.1)
  71. o = o+1
  72. end
  73. end
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement