Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myip = os.computerID()
- print(myip)
- print("lights on, lights off, hello")
- hal = 119
- light1 = 110
- light2 = 135
- light3 = 136
- light4 = 137
- light5 = 138
- light6 = 139
- light7 = 140
- light8 = 141
- light9 = 142
- light10 = 143
- light11 = 144
- light12 = 145
- light13 = 146
- light14 = 147
- light15 = 148
- light16 = 149
- light17 = 150
- light18 = 151
- light19 = 152
- light20 = 153
- light21 = 154
- light22 = 155
- light23 = 156
- light24 = 157
- light25 = 158
- rednet.open("bottom")
- function turnlightson()
- rednet.send(light1, "lights on")
- rednet.send(light2, "lights on")
- rednet.send(light3, "lights on")
- rednet.send(light4, "lights on")
- rednet.send(light5, "lights on")
- rednet.send(light6, "lights on")
- rednet.send(light7, "lights on")
- rednet.send(light8, "lights on")
- rednet.send(light9, "lights on")
- rednet.send(light10, "lights on")
- rednet.send(light11, "lights on")
- rednet.send(light12, "lights on")
- rednet.send(light13, "lights on")
- rednet.send(light14, "lights on")
- rednet.send(light15, "lights on")
- rednet.send(light16, "lights on")
- rednet.send(light17, "lights on")
- rednet.send(light18, "lights on")
- rednet.send(light19, "lights on")
- rednet.send(light20, "lights on")
- rednet.send(light21, "lights on")
- rednet.send(light22, "lights on")
- rednet.send(light23, "lights on")
- rednet.send(light24, "lights on")
- rednet.send(light25, "lights on")
- end
- function turnlightsoff()
- rednet.send(light1, "lights off")
- rednet.send(light2, "lights off")
- rednet.send(light3, "lights off")
- rednet.send(light4, "lights off")
- rednet.send(light5, "lights off")
- rednet.send(light6, "lights off")
- rednet.send(light7, "lights off")
- rednet.send(light8, "lights off")
- rednet.send(light9, "lights off")
- rednet.send(light10, "lights off")
- rednet.send(light11, "lights off")
- rednet.send(light12, "lights off")
- rednet.send(light13, "lights off")
- rednet.send(light14, "lights off")
- rednet.send(light15, "lights off")
- rednet.send(light16, "lights off")
- rednet.send(light17, "lights off")
- rednet.send(light18, "lights off")
- rednet.send(light19, "lights off")
- rednet.send(light20, "lights off")
- rednet.send(light21, "lights off")
- rednet.send(light22, "lights off")
- rednet.send(light23, "lights off")
- rednet.send(light24, "lights off")
- rednet.send(light25, "lights off")
- end
- while true do
- input = read()
- if input == "lights" or "lights on" or "lightson" then
- turnlightson()
- rednet.send(hal, input)
- elseif input == "lights off" or "lightsoff" then
- turnlightsoff()
- rednet.send(hal, input)
- else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement