Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("top")
- m.clear()
- function fillTable()
- button.setTable("Cows On", spawn1on, 6,19,3,5)
- button.setTable("Cows Off", spawn1off, 21,34,3,5)
- button.setTable("Sheep On", spawn2on, 6,19,7,9)
- button.setTable("Sheep Off", spawn2off, 21,34,7,9)
- button.setTable("Zombies On", spawn3on, 6,19,11,13)
- button.setTable("Zombies Off", spawn3off, 21,34,11,13)
- button.setTable("Creepers On", spawn4on, 6,19,15,17)
- button.setTable("Creepers Off", spawn4off, 21,34,15,17)
- button.setTable("Skeletons On", spawn5on, 6,19,19,21)
- button.setTable("Skeletons Off", spawn5off, 21,34,19,21)
- button.setTable("Enderman On", spawn6on, 6,19,23,25)
- button.setTable("Enderman Off", spawn6off, 21,34,23,25)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function spawn1on()
- button.flash("Cows On")
- rednet.broadcast("spawn 1 on")
- end
- function spawn1off()
- button.flash("Cows Off")
- rednet.broadcast("spawn 1 off")
- end
- function spawn2on()
- button.flash("Sheep On")
- rednet.broadcast("spawn 2 on")
- end
- function spawn2off()
- button.flash("Sheep Off")
- rednet.broadcast("spawn 2 off")
- end
- function spawn3on()
- button.flash("Zombies On")
- rednet.broadcast("spawn 3 on")
- end
- function spawn3off()
- button.flash("Zombies Off")
- rednet.broadcast("spawn 3 off")
- end
- function spawn4on()
- button.flash("Creepers On")
- rednet.broadcast("spawn 4 on")
- end
- function spawn4off()
- button.flash("Creepers Off")
- rednet.broadcast("spawn 4 off")
- end
- function spawn5on()
- button.flash("Skeletons On")
- rednet.broadcast("spawn 5 on")
- end
- function spawn5off()
- button.flash("Skeletons Off")
- rednet.broadcast("spawn 5 off")
- end
- function spawn6on()
- button.flash("Enderman On")
- rednet.broadcast("spawn 6 on")
- end
- function spawn6off()
- button.flash("Enderman Off")
- rednet.broadcast("spawn 6 off")
- end
- fillTable()
- button.heading("Monster Spawner Controller")
- button.label(1,4,"Sp.1")
- button.label(1,8,"Sp.2")
- button.label(1,12,"Sp.3")
- button.label(1,16,"Sp.4")
- button.label(1,20,"Sp.5")
- button.label(1,24,"Sp.6")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement