Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- isThereOnlyOne = true
- isNewPlayer = false
- isOnHunt = false
- modem = peripheral.wrap("right")
- modem.open(105)
- RightMonitor = peripheral.wrap("top")
- function Title()
- RightMonitor.setBackgroundColor(colors.black)
- RightMonitor.setCursorPos(8,1)
- RightMonitor.setTextColor(colors.white)
- RightMonitor.write("Engage there for the glory")
- RightMonitor.setCursorPos(15,3)
- RightMonitor.write("of ")
- RightMonitor.setTextColor(colors.red)
- RightMonitor.write("Boethiah")
- end
- function PanelRight()
- os.loadAPI("touch")
- local button = touch.new("top")
- if not isThereOnlyOne then
- buttonName = {
- " ",
- " ",
- " ",
- " Leave ! ",
- " ",
- " Boethiah is though ",
- " against the cowards",
- " ",
- " ",
- " ",
- label = "mButton"}
- elseif isNewPlayer then
- buttonName = {
- " ",
- " ",
- " ",
- " Subscribe ! ",
- " ",
- " Spread the blood ",
- " All around the world",
- " ",
- " ",
- " ",
- label = "mButton"}
- elseif isOnHunt then
- buttonName = {
- " ",
- " ",
- " ",
- " Claim your rewards !",
- " ",
- " Boethiah is yours ",
- " ",
- " ",
- " ",
- label = "mButton"}
- else
- buttonName = {
- " ",
- " ",
- " ",
- " GO ! ",
- " ",
- " The hunt is on ",
- " ",
- " ",
- " ",
- label = "mButton"}
- end
- button:add(buttonName,nil,10,10,30,16)
- button:draw()
- Title()
- while true do
- local event,p1,_,p3,p4 = button:handleEvents(os.pullEvent())
- if event == "button_click" then
- button:flash(p1,0.5)
- Title()
- if isThereOnlyOne then
- modem.transmit(105,1,"Click")
- end
- sleep(2)
- elseif event == "modem_message" and p3 == 2 then
- t = textutils.unserialize(p4)
- if t[1] == "isThereOnlyOne" then
- isThereOnlyOne = t[2]
- elseif t[1] == "isNewPlayer" then
- isNewPlayer = t[2]
- elseif t[1] == "isOnHunt" then
- isOnHunt = t[2]
- end
- if not isThereOnlyOne then
- buttonName = {
- " ",
- " ",
- " ",
- " Leave ! ",
- " ",
- " Boethiah is though ",
- " against the cowards",
- " ",
- " ",
- " "}
- elseif isNewPlayer then
- buttonName = {
- " ",
- " ",
- " ",
- " Subscribe ! ",
- " ",
- " Spread the blood ",
- " All around the world",
- " ",
- " ",
- " "}
- elseif isOnHunt then
- buttonName = {
- " ",
- " ",
- " ",
- " Claim your rewards !",
- " ",
- " Boethiah is yours ",
- " ",
- " ",
- " "}
- else
- buttonName = {
- " ",
- " ",
- " ",
- " GO ! ",
- " ",
- " The hunt is on ",
- " ",
- " ",
- " "}
- end
- button.buttonList["mButton"].label = buttonName
- button:draw()
- Title()
- end
- end
- end
- PanelRight()
Advertisement
Add Comment
Please, Sign In to add comment