Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- x,y,z = commands.getBlockPosition()
- local i = -1
- local e = 1
- local o = 2
- rednet.open("bottom")
- event, id, choix, = os.pullEvent()
- if event == "rednet_message" then
- if choix == "Dock" then
- mat = "wool"
- rednet.broadcast("request")
- print("Docking granted")
- elseif choix == "Undock" then
- mat = "air"
- rednet.broadcast("quit")
- print("Undocked work please wait...")
- end
- while o ~= 15 do
- while i ~= 2 do
- if (choix == "Dock") and (i = 0) then
- commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
- else
- commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
- i = i+1
- sleep(0.1)
- end
- end
- i = 1
- sleep(0.1)
- while i ~= 4 do
- if (choix == "Dock") and (i = 2) then
- commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
- else
- commands.async.setBlock("~2", "~"..(i), "~"..(-o), "minecraft:"..mat)
- i = i+1
- sleep(0.1)
- end
- end
- i = 1
- sleep(0.1)
- while i ~= -2 do
- if (choix == "Dock") and (i = 0) then
- commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
- else
- commands.async.setBlock("~"..(i), "~4", "~"..(-o), "minecraft:"..mat)
- i = i-1
- sleep(0.1)
- end
- end
- i = 3
- sleep(0.1)
- while i ~= 0 do
- if (choix == "Dock") and (i = 2) then
- commands.async.setBlock("~"..(i), "~", "~"..(-o), "minecraft:"..mat)
- else
- commands.async.setBlock("~-2", "~"..(i), "~"..(-o), "minecraft:"..mat)
- i = i -1
- sleep(0.1)
- end
- end
- i = -1
- sleep(0.1)
- o = o+1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement