from phBot import * import phBotChat import struct import time pName = 'xMatchLocker' pVersion = '1.1.1' pUrl = 'https://raw.githubusercontent.com/JellyBitz/phBot-xPlugins/master/xMatchLocker.py' # User settings MATCH_PARTY_MASTER = "" # Set party match owner MATCH_ACADEMY_MASTER = "" # Set academy match owner MATCH_REPLY_DELAY_MAX = 10 # Seconds QUESTION_PASSWORD = "" # Set password QUESTION_MESSAGE = "Hi, can you tell me the magic words? Quickly please!" # ______________________________ Initializing ______________________________ # # Globals questionPartyTime = None questionPartyCharName = "" questionPartyRID = 0 questionPartyJID = 0 questionAcademyTime = None questionAcademyCharName = "" questionAcademyRID = 0 questionAcademyJID = 0 # ______________________________ Methods ______________________________ # # Inject Packet def Inject_PartyMatchJoinResponse(requestID,joinID,response): p = struct.pack('I', requestID) p += struct.pack('I', joinID) p += struct.pack('B',1 if response else 0) inject_joymax(0x306E,p,False) # Inject Packet def Inject_AcademyMatchJoinResponse(requestID,joinID,response): p = struct.pack('I', requestID) p += struct.pack('I', joinID) p += struct.pack('B',1 if response else 0) inject_joymax(0x347F,p,False) # ______________________________ Events ______________________________ # # All packets received from game server will be passed to this function # Returning True will keep the packet and False will not forward it to the game client def handle_joymax(opcode,data): # SERVER_PARTY_MATCH_JOIN_REQUEST if opcode == 0x706D and QUESTION_PASSWORD: try: # Save all data for this request global questionPartyTime,questionPartyRID,questionPartyJID,questionPartyCharName questionPartyTime = time.time() index=0 questionPartyRID = struct.unpack_from('