Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ID = 1259
- Color = "Red"
- if not lib then os.loadAPI("lib") end
- lib.Clear()
- lib.openRednet()
- lib.fillLine()
- lib.layout("Welcome to "..Color.."'s waiting room")
- lib.fillLine()
- lib.layout()
- lib.layout()
- lib.layout("Press S to signal you are ready to spleef!")
- lib.layout("Press R to attempt to repair the arena")
- lib.layout("Press I to attempt to force start the round")
- lib.layout("Press T to input your name or the teams name!")
- lib.layout("Press G to attempt to reset match data")
- lib.layout()
- lib.layout()
- lib.fillLine()
- print("")
- Ready = "No"
- while true do
- event,param1,param2 = os.pullEvent()
- if event == "char" then
- if param1 == "s" then
- if Ready == "No" then
- lib.send(ID, "["..Color.."]".." ready")
- lib.clearLine()
- write("You have signalled you are ready")
- Ready = "Yes"
- Clear = os.startTimer(10)
- else
- lib.clearLine()
- write("You are already ready!")
- Clear = os.startTimer(10)
- end
- elseif param1 == "r" then
- lib.send(ID, "["..Color.."]".." repair")
- lib.clearLine()
- write("Commanded the arena to repair itself")
- Clear = os.startTimer(10)
- elseif param1 == "i" then
- lib.send(ID, "["..Color.."]".." force")
- lib.clearLine()
- write("Attempted to force start this round")
- Clear = os.startTimer(10)
- elseif param1 == "t" then
- lib.clearLine()
- write("Input name: ")
- Team = lib.readLimit(10)
- lib.cursor(-1)
- lib.clearLine()
- write("Team name has been set as "..Team)
- TeamSend = lib.tag(Team, Color)
- lib.send(ID, TeamSend)
- Clear = os.startTimer(10)
- elseif param1 == "g" then
- lib.send(ID, "["..Color.."]".."ResetMatch")
- lib.clearLine()
- write("Attempted to reset round")
- Clear = os.startTimer(10)
- end
- elseif event == "timer" and param1 == Clear then
- lib.clearLine()
- elseif event == "rednet_message" and param1 == ID then
- if param2 == "UnReady" then
- Ready = "No"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment