Advertisement
infiniteblock

Untitled

Apr 2nd, 2020
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Modem Details.
  2. local wlan_channel = 14
  3. local wlan = peripheral.wrap('top')
  4.  
  5. -- Open Modem.
  6. wlan.open(wlan_channel)
  7. print('Listening on channel '..wlan_channel)
  8. print ('Awaiting Commands....')
  9. while true do
  10.   local event, modemSide, senderChan, replyChan, msg, senderDist = os.pullEvent("modem_message")
  11.   print("MSG: "..msg)
  12.   if string.match(msg,"WWCSON") then
  13.     print("Woot Enabled")
  14.     redstone.setAnalogOutput("back",10)
  15.   end
  16.   if string.match(msg,"WWCSOFF") then
  17.     print("Woot Disabled")
  18.     redstone.setAnalogOutput("back",0)
  19.   end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement