Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MFR Autospawner control panel using AE, for CC 1.63+ (No Bundled cable support).
- -- Outputs Redstone signal in varying strength down bottom of computer. Use a MFR Programmable Rednet Controller to translate RS strength signals into Bundled cable colour channels corresponding to table below:
- -- white/RSS 1: remove safari net
- -- orange/RSS 2: mob 1 Wither skeleton
- -- magenta/RSS 3: mob 2 Blaze
- -- lightBlue/RSS 4: mob 3 Enderman
- -- yellow/RSS 5: mob 4 Ghast
- -- lime/RSS 6: mob 5 Slime
- -- pink/RSS 7: mob 6 Blizz
- -- gray/RSS 8: mob 7
- -- lightgray/RSS 9: mob 8 Villagers
- --Details on "physical" build: http://forum.feed-the-beast.com/threads/rhns-continued-adventures-a-build-journal-guide-collection-etc.42664/page-10#post-658213
- mouseWidth = 0
- mouseHeight = 0
- function detectDevice(DeviceName)
- DeviceSide="none"
- for k,v in pairs(redstone.getSides()) do
- if peripheral.getType(v)==DeviceName then
- DeviceSide = v
- break
- end
- end
- return(DeviceSide)
- end
- MonitorSide=detectDevice("monitor")
- if MonitorSide~="none" then
- monitor=peripheral.wrap(MonitorSide)
- print ("Monitor on the " .. MonitorSide .. " connected.")
- else
- print("No monitor found")
- end
- monitor.clear()
- monitor.setCursorPos(1,1)
- w,h=monitor.getSize()
- print(w)
- print(h)
- -- Draw buttons
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,2)
- monitor.write(" Wither Skelly ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,4)
- monitor.write(" Blaze ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,6)
- monitor.write(" Enderman ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,8)
- monitor.write(" Ghast ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,10)
- monitor.write(" Green Slime ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,12)
- monitor.write(" Blizz ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,14)
- monitor.write(" Mob 7 ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,16)
- monitor.write(" Villagers ")
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,18)
- monitor.write(" STOP ")
- monitor.setBackgroundColour((colours.black))
- -- Check click function
- -- white/RSS 1: remove safari net
- -- orange/RSS 2: mob 1 Wither skeleton
- -- magenta/RSS 3: mob 2 Blaze
- -- lightBlue/RSS 4: mob 3 Enderman
- -- yellow/RSS 5: mob 4 Ghast
- -- lime/RSS 6: mob 5 Slime
- -- pink/RSS 7: mob 6 Blizz
- -- gray/RSS 8: mob 7
- -- lightgray/RSS 9: mob 8 Villagers
- function checkClickPosition()
- if mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 2 then
- -- button 1 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 2)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 4 then
- -- button 2 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 3)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 6 then
- -- button 3 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 4)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 8 then
- -- button 4 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 5)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 10 then
- -- button 5 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 6)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 12 then
- -- button 6 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 7)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 14 then
- -- button 7 clicked
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 8)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 16 then
- -- button 8 clicked (Villagers, auto stop after sleep period)
- redstone.setAnalogOutput("bottom", 1)
- sleep(1)
- redstone.setAnalogOutput("bottom", 9)
- sleep(40)
- redstone.setAnalogOutput("bottom", 1)
- elseif mouseWidth > 1 and mouseWidth < 18 and mouseHeight == 18 then
- -- button 9 stop clicked
- redstone.setAnalogOutput("bottom", 1)
- end
- end
- repeat
- event,p1,p2,p3 = os.pullEvent()
- if event=="monitor_touch" then
- mouseWidth = p2 -- sets mouseWidth
- mouseHeight = p3 -- and mouseHeight
- checkClickPosition() -- this runs our function
- end
- until event=="char" and p1==("x")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement