Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("back")
- rednet.open("top")
- m.setTextColor(colors.white)
- m.setBackgroundColor(colors.black)
- m.clear()
- m.setTextScale(0.5)
- local offset = 17
- --AFK
- function Draw()
- m.clear()
- m.setCursorPos(4,2)
- m.setBackgroundColor(colors.black)
- m.write("AFK Farming")
- --AFK true/false
- if afk == true then
- m.setCursorPos(7,5)
- m.setBackgroundColor(colors.green)
- m.write("aktiv")
- m.setBackgroundColor(colors.black)
- else
- m.setCursorPos(6,5)
- m.setBackgroundColor(colors.red)
- m.write("inaktiv")
- m.setBackgroundColor(colors.black)
- end
- --ON
- m.setCursorPos(4,8)
- m.setBackgroundColor(colors.green)
- m.write("ON")
- m.setBackgroundColor(colors.black)
- --OFF
- m.setCursorPos(12,8)
- m.setBackgroundColor(colors.red)
- m.write("OFF")
- m.setBackgroundColor(colors.black)
- m.setCursorPos(23,2)
- m.setBackgroundColor(colors.black)
- m.write("MobFarm On/Off")
- --MobFarm trueFalse
- if mfarm == true then
- m.setCursorPos(26,5)
- m.setBackgroundColor(colors.green)
- m.write("aktiv")
- m.setBackgroundColor(colors.black)
- else
- m.setCursorPos(25,5)
- m.setBackgroundColor(colors.red)
- m.write("inaktiv")
- m.setBackgroundColor(colors.black)
- end
- --ON
- m.setCursorPos(23,8)
- m.setBackgroundColor(colors.green)
- m.write("ON")
- m.setBackgroundColor(colors.black)
- --OFF
- m.setCursorPos(31,8)
- m.setBackgroundColor(colors.red)
- m.write("OFF")
- m.setBackgroundColor(colors.black)
- end
- Draw()
- while true do
- local event, side, xPos, yPos = os.pullEvent("monitor_touch")
- print("x: "..xPos.." y: "..yPos)
- --AFK
- if xPos >= 4 and xPos <= 5 then
- rednet.broadcast("afk_on")
- afk = true
- Draw()
- end
- if xPos >= 12 and xPos <= 14 then
- rednet.broadcast("afk_off")
- afk = false
- Draw()
- end
- --AFK
- --MOBFARM
- if xPos >= 6 + offset and xPos <= 7 + offset then
- rednet.broadcast("mfarm_on")
- mfarm = true
- Draw()
- end
- if xPos >= 14 + offset and xPos <= 16 + offset then
- rednet.broadcast("mfarm_off")
- mfarm = false
- Draw()
- end
- --MOBFARM
- end
Add Comment
Please, Sign In to add comment