Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getProfileData(self, username):
- found = False
- for room in self.rooms.values():
- for client in room.clients.values():
- if client.username == username:
- if client.isInTribe:
- tribe = client.TribeName
- else:
- tribe = ''
- stats = ','.join(map(str, [client.micesaves,client.shamancheese,client.firstcount,client.cheesecount,client.hardModeSaves,client.bootcampcount,client.divineModeSaves]))
- userlook = client.look
- color1 = client.color1
- date = client.datereg
- p = Array.ByteArray()
- p.writeInt(client.avatar)
- p.writeUTF(username)
- p.writeUTF(stats)
- if str(client.titleNumber).isdigit():
- p.writeShort(int(client.titleNumber))
- else:
- t, c = str(client.titleNumber).split(',')
- p.writeShort(int(t))
- p.writeShort(len(client.titleList))
- for i in client.titleList:
- if ',' in str(i):
- t, c = str(i).split(',')
- p.writeShort(int(t))
- p.writeUnsignedByte(int(c))
- else:
- p.writeShort(int(i))
- p.writeUnsignedByte(1)
- p.writeUTF(userlook)
- p.writeUTF(tribe)
- p.writeInt(int(str(date)[:len(str(date)) - 3]))
- p.writeInt(int(color1, 16))
- p.writeShort(client.playerLevel)
- p.writeUnsignedByte(client.gender)
- priv = client.privilegeLevel
- if priv == 1 or priv == 2 or priv == 3:
- tempPriv = 1
- if priv == 10:
- tempPriv = 10
- if priv == 2 or priv == 4:
- tempPriv = 20
- if priv == 5 or priv == 6 or priv == 8:
- tempPriv = 6
- p.writeUnsignedByte(tempPriv)
- p.writeUnsignedByte(1)
- p.writeUTF(client.marriage)
- p.writeUnsignedByte(len(client.Badges))
- for i in client.Badges:
- p.writeUnsignedByte(int(i))
- statss = [30, client.racingStats[0], 1500, 124], [31, client.racingStats[1], 10000, 125], [33, client.racingStats[2], 10000, 126], [32, client.racingStats[3], 10000, 127], [26, client.survivorStats[0], 1000, 120], [27, client.survivorStats[1], 800, 121], [28, client.survivorStats[2], 20000, 122], [29, client.survivorStats[3], 10000, 123]
- p.writeUnsignedByte(len(statss))
- for stat in statss:
- p.writeUnsignedByte(int(stat[0]))
- p.writeInt(int(stat[1]))
- p.writeInt(int(stat[2]))
- p.writeUnsignedByte(int(stat[3]))
- found = p.toString()
- return found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement