Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- os.loadAPI("touch")
- mon = peripheral.wrap("bottom")
- local t1 = touch.new("bottom")
- local t = t1
- function writeButtons()
- t1:add("Blaze",nil,2,2,8,4,colors.red,colors.lime)
- t1:add("Wither",nil,12,2,18,4,colors.red,colors.lime)
- t1:add("Light",nil,22,2,28,4,colors.red,colors.lime)
- t=t1
- t:draw()
- end
- function checkClick()
- if p1 == "Light" then
- if lightsStatus == "on" then
- rednet.broadcast("spawnerLightsOff")
- else
- rednet.broadcast("spawnerLightsOn")
- end
- elseif p1 == "Blaze" then
- elseif p1 == "Wither" then
- end
- end
- rednet.broadcast("spawnerLightsOn")
- local lightsStatus = "on"
- rednet.broadcast("witherSkeleOff")
- local witherStatus = "off"
- rednet.broadcast("blazeOff")
- local blazeStatus = "off"
- writeButtons()
- while true do
- local event,p1 = t:handleEvents(os.pullEvent())
- if event == "button_click" then
- t:toggleButton(p1)
- print(p1)
- end
- end
- rednet.broadcast("spawnerLightsOn")
- rednet.broadcast("blazeOff")
- rednet.broadcast("witherSkeleOff")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement