Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- mouseWidth = 0
- mouseHeigth = 0
- term.clear()
- monitor = peripheral.wrap("left")
- monitor.setCursorPos(1,1)
- w,h=monitor.getSize()
- monitor.setBackgroundColour((colours.lime))
- monitor.setCursorPos(2,2)
- monitor.write("HOCH ")
- monitor.setCursorPos(2,4)
- monitor.write("RUFEN")
- monitor.setBackgroundColour((colours.black))
- function checkClickPosition()
- if mouseWidth > 1 and mouseWidth < 8 and mouseHeight == 2 then
- rednet.broadcast("8")
- elseif mouseWidth > 1 and mouseWidth < 8 and mouseHeight == 4 then
- rednet.broadcast("2")
- end
- end
- repeat
- event,p1,p2,p3 = os.pullEvent()
- if event=="monitor_touch" then
- mouseWidth = p2
- mouseHeight = p3
- checkClickPosition()
- end
- until event=="char" and p1==("x")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement