self.server.getProfileSaves(username) tribe = self.server.getProfileTribe(username) stats = str(saves)+","+str(shamancheese)+","+str(first)+","+str(cheese) if tribe != "": self.sendData("\x08" + "\x0A",[username , stats, title, titleList, "0", tribe]) else: self.sendData("\x08" + "\x0A",[username , stats, title, titleList, "0"]) else: pass else: pass def catchTheCheeseNoShaman(self, playerCode): self.sendData("\x08" + "\x17", [playerCode] ) self.sendData("\x05" + "\x13", [playerCode] ) self.room.isCatchTheCheeseMap = True def catchTheCheeseShaman(self, playerCode): self.sendData("\x08" + "\x17", [playerCode] ) self.sendData("\x05" + "\x13", [playerCode] ) self.sendData("\x08" + "\x14", [playerCode] ) self.room.isCatchTheCheeseMap = True def sendNewParty(self): if self.room.isSnowing==True: self.sendStartSnowStorm() if self.room.isSnowing==False: self.sendEndSnowStorm() self.sendData("\x05" + "\x05", [self.room.currentWorld, self.room.getPlayerCount(), 1, ""] ) def sendNewPartyCustomMap(self, mapxml, mapname, mapperma): #mapperma = 0 mapperma = str(mapperma) if self.room.isSnowing==True: self.sendStartSnowStorm() if self.room.isSnowing==False: self.sendEndSnowStorm() self.sendData("\x05" + "\x05", ["-1", self.room.getPlayerCount(), 10, "\x01"+mapxml+"\x02"+mapname+"\x02"+mapperma] ) # print 'XML Loaded: '+str(mapxml) def sendPlayerList(self): self.sendData("\x08" + "\x09", list(self.room.getPlayerList()) ) def sendNewPlayer(self, playerData): self.sendData("\x08" + "\x08", [playerData] ) def sendPlayerDisconnect(self, playerCode): self.sendData("\x08" + "\x07", [playerCode] ) def sendPlayerDied(self, playerCode, score): #score = score-1 #if score < 0: # score = 0 #self.score=score #self.room.decreaseScore(playerCode, score) self.sendData("\x08" + "\x05", [playerCode, 0, score] ) if self.room.currentShamanCode == playerCode: self.sendTwenty() #self.room.setAlready = False self.room.setTimer() #print '(%s) Time set to 20'%(self.room.name) else: players = 0 alive = 0 for playerCode, client in self.room.clients.iteritems(): players += 1 if client.isDead: pass else: alive += 1 #print 'alive: %s players: %s'%(str(alive), str(players)) if alive == 1: if players >= 2: self.sendTwenty() self.room.setTimer() def sendPlayerGotCheese(self, playerCode, score, place, timeTaken): self.sendData("\x08" + "\x06", [playerCode, 0, score, place, timeTaken] ) def sendShamanCode(self, shamanPlayerCode): if shamanPlayerCode == 0: self.sendData("\x08" + "\x14", ) else: self.sendData("\x08" + "\x14", [shamanPlayerCode] ) def sendDoubleShamanCode(self, shamanPlayerCode, shamanPlayerCodeTwo): self.sendData("\x08" + "\x14", [shamanPlayerCode, shamanPlayerCodeTwo] ) def sendSynchroniser(self, playerCode): self.sendData("\x08" + "\x15", [playerCode] ) def sendNewTitle(self, titlenum): self.sendData("\x08" + "\x0D",[titlenum]) def sendTime(self, timeLeft): self.sendData("\x05" + "\x06", [timeLeft] ) def sendTwenty(self): self.sendData("\x06" + "\x11") def sendSetAnchors(self, anchors): self.sendData("\x05" + "\x07", anchors ) def sendATEC(self): self.sendData("\x1A" + "\x1A") def sendPING(self): self.sendData("\x04" + "\x14") def sendShamanPerformance(self, shamanName, numGathered): #Will display "Info_Fromage_Chamane" in chat # - "Thanks to %1, we gathered %2 cheese !" self.sendData("\x08" + "\x11", [shamanName, numGathered] ) #pass def sendPlayerAction(self, playerCode, action): self.sendData("\x08" + "\x16", [playerCode, action] ) def sendModMessageChannel(self, name, message): self.room.sendModChat(self, "\x1A\x05", [name, message]) def sendAdminMessageChannel(self, name, message): self.room.sendAdminChat(self, "\x1A\x06", [name, message]) def sendTribeLogin(self, tribename, username): self.room.sendTribeMsg(self, "\x10\x04", [tribename, '1', username]) def sendServeurMessage(self, message): self.room.sendServeur(self, "\x06\x14", [message]) print '[Servidor] %s' % (message) def sendFriendLog(self, user): self.room.sendFriend(self, "\x08\x0B", [user]) def sendServerMessageName(self, name, message): self.room.sendWholeServer(self, "\x1A\x04", ["[~"+name+"] ", message]) def sendRestartMessage(self, message): self.room.sendWholeServer(self, "\x1A\x04", ["[SERVIDOR] ", "%s "%(message)]) def sendModMessage(self, name, message): self.room.sendAllOthersAndSelf(self, "\x1A\x04", ["[~Moderacao] ", message]) def sendServerMessage(self, message): self.room.sendWholeServer(self, "\x1A\x04", ["[~Mensagem Server] ", message]) def sendGiftAmount(self, amount): self.sendData("\x13" + "\x14", [amount] ) def saveRemainingMiceMessage(self): #You must save all the remaining mice before you can enter the hole. self.sendData("\x08" + "\x12", ) def sendPlayMusic(self, path): self.sendData("\x1A" + "\x0C", [path] ) def sendSentPrivMsg(self, username, message): self.sendData("\x06" + "\x07", [message, username] ) def sendRecievePrivMsg(self, username, message): self.sendData("\x06" + "\x07", [message, username, "x"] ) def sendPlayerNotFound(self): self.sendData("\x06" + "\x07") def getPlayerData(self): #FUR return '#'.join(map(str, #has cheese #unknown #forum ID [self.username, self.playerCode, int(self.isDead), self.score, 0, self.titleNumber, 0, self.look, self.fur, 1] )) def enterRoom(self, roomName): enter = True if roomName.startswith("[Private]"): privates = ['Kingboo', 'Sooki',