Ejemplo n.º 1
0
 def onAttack (self,npc,player,damage,isPet):
   CLAN = player.getClan()
   if CLAN == None :
     return
   CLANLEADER = CLAN.getLeader()
   if CLANLEADER == None :
     return
   global CLANLEADERS
   for clname in CLANLEADERS:
     if clname <> None :
       if CLANLEADER.getName() == clname :
         DevastatedCastle.getInstance().addSiegeDamage(CLAN,damage)
   return
Ejemplo n.º 2
0
 def onAttack(self, npc, player, damage, isPet):
     CLAN = player.getClan()
     if CLAN == None:
         return
     CLANLEADER = CLAN.getLeader()
     if CLANLEADER == None:
         return
     global CLANLEADERS
     for clname in CLANLEADERS:
         if clname <> None:
             if CLANLEADER.getName() == clname:
                 DevastatedCastle.getInstance().addSiegeDamage(CLAN, damage)
     return
Ejemplo n.º 3
0
 def onTalk (self,npc,player):
   global CLANLEADERS
   npcId = npc.getNpcId()
   if npcId == MESSENGER :
     for clname in CLANLEADERS:
       if player.getName() == clname :
         return "<html><body>You already registered!</body></html>"
     if DevastatedCastle.getInstance().Conditions(player) :
       CLANLEADERS.append(player.getName())
       return "<html><body>You have successful registered on a siege</body></html>"
     else:
       return "<html><body>Condition are not allow to do that!</body></html>"
   return
Ejemplo n.º 4
0
 def onTalk(self, npc, player):
     global CLANLEADERS
     npcId = npc.getNpcId()
     if npcId == MESSENGER:
         for clname in CLANLEADERS:
             if player.getName() == clname:
                 return "<html><body>You already registered!</body></html>"
         if DevastatedCastle.getInstance().Conditions(player):
             CLANLEADERS.append(player.getName())
             return "<html><body>You have successful registered on a siege</body></html>"
         else:
             return "<html><body>Condition are not allow to do that!</body></html>"
     return
Ejemplo n.º 5
0
 def onKill(self,npc,player,isPet):
   DevastatedCastle.getInstance().SiegeFinish()
   return
Ejemplo n.º 6
0
 def onKill(self, npc, player, isPet):
     DevastatedCastle.getInstance().SiegeFinish()
     return