def __init__(self, air): DistributedPlayerAI.__init__(self, air) HumanDNA.__init__(self) DistributedBattleAvatarAI.__init__(self, air) self.avatarType = [0, 0, 0, 0] self.inInvasion = False self.skillEffects = []
def __init__(self, air): DistributedPlayerAI.__init__(self, air) HumanDNA.__init__(self) DistributedBattleAvatarAI.__init__(self, air) DistributedQuestAvatarAI.__init__(self, air) self.inventoryId = 0 self.founder = False self.defaultShard = 0 self.defaultZone = 0
def setAvatars(self, avatars): avList = [] for avNum, avName, avDNA, avPosition, nameState in avatars: nameOpen = int(nameState == 1) names = [avName, '', '', ''] if nameState == 2: # PENDING names[1] = avName elif nameState == 3: # APPROVED names[2] = avName elif nameState == 4: # REJECTED names[3] = avName dna = HumanDNA() dna.makeFromNetString(avDNA) avList.append(PotentialAvatar(avNum, names, dna, avPosition, nameOpen)) while len(avList) < 4: avList.append(OTPGlobals.AvatarSlotAvailable) self.cr.handleAvatarsList({0: avList})
def setAvatars(self, avatars): avList = [] for avNum, avName, avDNA, avPosition, nameState in avatars: nameOpen = int(nameState == 1) names = [avName, '', '', ''] if nameState == 2: # PENDING names[1] = avName elif nameState == 3: # APPROVED names[2] = avName elif nameState == 4: # REJECTED names[3] = avName dna = HumanDNA() dna.makeFromNetString(avDNA) avList.append( PotentialAvatar(avNum, names, dna, avPosition, nameOpen)) while len(avList) < 4: avList.append(OTPGlobals.AvatarSlotAvailable) self.cr.handleAvatarsList({0: avList})
def setAvatars(self, avatars): avatarList = {} data = [] for avNum, avName, avDNA, avPosition, nameState in avatars: nameOpen = int(nameState == 1) names = [avName, '', '', ''] if nameState == 2: # PENDING names[1] = avName elif nameState == 3: # APPROVED names[2] = avName elif nameState == 4: # REJECTED names[3] = avName dna = HumanDNA() dna.makeFromNetString(avDNA) data.append( PotentialAvatar(avNum, names, dna, avPosition, nameOpen)) avatarList[1] = data + [OTPGlobals.AvatarSlotAvailable ] * (OTPGlobals.AvatarNumSlots - len(data)) self.cr.handleAvatarsList(avatarList)
def enterStart(self, dna, index): # Basic sanity-checking: if index >= 4: self.demand('Kill', 'Invalid index specified!') return if not HumanDNA().isValidNetString(dna): self.demand('Kill', 'Invalid DNA specified!') return self.index = index self.dna = dna # Okay, we're good to go, let's query their account. self.demand('RetrieveAccount')