Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("left")
- while(true)
- do
- os.loadAPI("split")
- id,commandline,dis = rednet.receive()
- local cmd = split.split(commandline,";")
- print(cmd[1].." - "..cmd[2].." - "..cmd[3])
- if(cmd[1] == "close") then break end
- if(cmd[1] == "fire")
- then
- print("Ziel: "..cmd[2].." - "..cmd[3])
- p = peripheral.wrap("back")
- p.setTarget(tonumber(cmd[2]),0,tonumber(cmd[3]))
- p.launch()
- print("Rakete abgefeuert!")
- end
- end
- rednet.close()
Advertisement
Add Comment
Please, Sign In to add comment