Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- redstone.setOutput("left", false)
- while true do
- words = {}
- e, msg, d, b, c = os.pullEvent("chat_command")
- for word in msg:gmatch('%S+') do
- table.insert(words, word)
- end
- if words[1] ~= "goto" then
- print("Invalid command")
- else
- x = words[2]
- y = words[3]
- z = words[4]
- rednet.broadcast("incoming")
- if not rednet.receive(2) then
- print("Something went wrong!")
- end
- rednet.broadcast(x)
- rednet.broadcast(y)
- rednet.broadcast(z)
- id, msg = rednet.receive(2)
- if msg == "complete" then
- print("Successfully sent!")
- else
- print("Coords not received")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement