Advertisement
QQII

Multifloor Sender V0.1

Jun 6th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. --Multifloor Sender V0.1 by QQII
  2. --Declerations
  3. local modem = peripheral.wrap("right")  --Wraps the modem on the right side.
  4. local floor = 0             --Floor to open
  5.  
  6. --Initial
  7. if (not modem) or (peripheral.getType("right") ~= "modem") then
  8.     print("ERROR: no wireless modem found")
  9.     return
  10. end
  11.  
  12. --Main Loop
  13. while true do
  14.     floor = tonumber(read())
  15.     modem.transmit(1000, 0, floor)
  16.     os.sleep(10)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement