Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("front")
- --non vengono pi usati gli id ma il broadcast
- --id_server = 16
- --questo il secondo campo in rednet(indica a chi altro deve essere inviato il segnale) per sicurezza controllare i campi di rednet sul sito
- --id_server2 = 16
- print()
- print("--SHIP MANAGER v1.0 by creeloper27--")
- print()
- print("(you can say help to get the command list)")
- print()
- print("what do you want to do?")
- risposta = read()
- if risposta == "help" then
- print("COMMANDS LIST:")
- print()
- print("-LC [top/flor/wall OR all] [on/off] (this stay for Lights Control)")
- print()
- print("-DC [exlas/exforc OR all] [on/off] (this stay for Defence Control)")
- print()
- print("press enter to continue...")
- read()
- elseif risposta == "LC top on" then
- print("Turning 'top' section lamps 'on'")
- --rednet.send( id_server, id_server2, "Ltopon")
- rednet.broadcast("Ltopon")
- print("Done!")
- sleep(1)
- elseif risposta == "LC top off" then
- print("Turning 'top' section lamps 'off'")
- --rednet.send( id_server, id_server2, "Ltopoff")
- rednet.broadcast("Ltopoff")
- print("Done!")
- sleep(1)
- elseif risposta == "LC floor on" then
- print("Turning 'floor' section lamps 'on'")
- --rednet.send( id_server, id_server2, "Ltopoff")
- rednet.broadcast("Lflooron")
- print("Done!")
- sleep(1)
- elseif risposta == "LC floor off" then
- print("Turning 'floor' section lamps 'off'")
- --rednet.send( id_server, id_server2, "Ltopoff")
- rednet.broadcast("Lflooroff")
- print("Done!")
- sleep(1)
- elseif risposta == "LC wall on" then
- print("Turning 'wall' section lamps 'on'")
- --rednet.send( id_server, id_server2, "Ltopon")
- rednet.broadcast("Lwallon")
- print("Done!")
- sleep(1)
- elseif risposta == "LC wall off" then
- print("Turning 'wall' section lamps 'off'")
- --rednet.send( id_server, id_server2, "Ltopoff")
- rednet.broadcast("Lwalloff")
- print("Done!")
- sleep(1)
- elseif risposta == "LC all on" then
- print("Turning all section lamps 'on'")
- rednet.broadcast("Lwallon")
- rednet.broadcast("Ltopon")
- rednet.broadcast("Lflooron")
- print("Done!")
- sleep(1)
- elseif risposta == "LC all off" then
- print("Turning all section lamps 'off'")
- rednet.broadcast("Lwalloff")
- rednet.broadcast("Ltopoff")
- rednet.broadcast("Lflooroff")
- print("Done!")
- sleep(1)
- elseif risposta == "DC exlas on" then
- print("Turning esternal lasers 'on'")
- rednet.broadcast("Dexlason")
- print("Done!")
- sleep(1)
- elseif risposta == "DC exlas off" then
- print("Turning external lasers 'off'")
- rednet.broadcast("Dexlasoff")
- print("Done!")
- sleep(1)
- elseif risposta == "DC exforc on" then
- print("Turning esternal force field 'off'")
- rednet.broadcast("Dexforcon")
- print("Done!")
- sleep(1)
- elseif risposta == "DC exforc off" then
- print("Turning external force field 'off'")
- rednet.broadcast("Dexforcoff")
- print("Done!")
- sleep(1)
- else
- print("Unknow command")
- print("press enter to continue...")
- read()
- end
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment