Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --NOTE this is a computercraft code for 2 computers to control the MFR auto-spawners--
- --THIS omputer DOSEN'T need to be an ADVANCED one the FIRST one DOES--
- --NOTE in order for this to work you will also need controler Alpha (first computer)--
- --http://pastebin.com/xTj02yqc--
- local function redstone1()
- if enderman1 == 1 then
- redstone.setAnalogOutput("left", 15)
- enderman1 = 0 else
- redstone.setAnalogOutput("left", 0)
- enderman1 = 1
- end
- end
- local function redstone2()
- if essence2 == 1 then
- redstone.setAnalogOutput("top", 15)
- essence2 = 0 else
- redstone.setAnalogOutput("top", 0)
- essence2 = 1
- end
- end
- local function redstone3()
- if custom3 == 1 then
- redstone.setAnalogOutput("back", 15)
- custom3 = 0 else
- redstone.setAnalogOutput("back", 0)
- custom3 = 1
- end
- end
- local function update()
- rednet.open("right")
- while true do
- id,message = rednet.receive()
- if message == "enderman" then
- redstone1()
- elseif message == "essence" then
- redstone2()
- elseif message == "custom" then
- redstone3()
- end
- end
- end
- enderman1 = 1
- essence2 = 1
- custom3 = 1
- update()
Advertisement
Add Comment
Please, Sign In to add comment