krom

MineCraft - SpawnerRemote

Mar 24th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- minecraft soulcage computer remote
  2. -- author: KROM
  3.  
  4. local bCool = true
  5.  
  6. -- open wireless module on top
  7. rednet.open('top')
  8.  
  9. -- listen for remote command "on" or "off"
  10. while bCool == true do
  11.     local senderId, message, distance = rednet.receive()
  12.     if senderId ~= nil then
  13.         if message == 'on' then
  14.             if redstone.getOutput('bottom') == false then
  15.                 redstone.setOutput('bottom',true)
  16.             end
  17.         elseif message == 'off' then
  18.             if redstone.getOutput('bottom') == true then
  19.                 redstone.setOutput('bottom',false)
  20.             end
  21.         end
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment