Пример #1
0
 def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   npcId = npc.getNpcId()
   party = player.getParty()
   closed = self.loadGlobalQuestVar("closed")
   if npcId == STEWARD :
     if st.getQuestItemsCount(HEMOSYCLE) >= 10 :
       if closed == "" :
         if party:
           st.takeItems(HEMOSYCLE,10)
           for player in party.getPartyMembers() :
             GrandBossManager.getInstance().getZone(113669,-126122,-3489).allowPlayerEntry(player, 7200)
             player.teleToLocation(113669,-126122,-3489)
           self.saveGlobalQuestVar("closed", "1")
           self.startQuestTimer("prosnuca",1,None,None)
           self.startQuestTimer("captain",1,None,None)
           self.startQuestTimer("mdef",1,None,None)
           self.startQuestTimer("pdef",1,None,None)
           self.startQuestTimer("resist",1,None,None)
           self.startQuestTimer("teleout",1800000,None,player)
         else :
           return "<html><body><font color=LEVEL>Only with party...</font></body></html>"
       else :
         return "<html><body>The Raid currently<font color=LEVEL> in process.<font>.<br1>Try later.</body></html>"
     else : 
       return "<html><body>You dont have <font color=LEVEL>10 Silver Hemocyte<font>.</body></html>"
   return
Пример #2
0
 def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   npcId = npc.getNpcId()
   party = player.getParty()
   closed = self.loadGlobalQuestVar("closed")
   if npcId == STEWARD :
     if st.getQuestItemsCount(HEMOSYCLE) >= 10 :
       if closed == "" :
         if party:
           st.takeItems(HEMOSYCLE,10)
           for player in party.getPartyMembers() :
             GrandBossManager.getInstance().getZone(113669,-126122,-3489).allowPlayerEntry(player, 7200)
             player.teleToLocation(113669,-126122,-3489)
           self.saveGlobalQuestVar("closed", "1")
           self.startQuestTimer("prosnuca",1,None,None)
           self.startQuestTimer("captain",1,None,None)
           self.startQuestTimer("mdef",1,None,None)
           self.startQuestTimer("pdef",1,None,None)
           self.startQuestTimer("resist",1,None,None)
           self.startQuestTimer("teleout",1800000,None,player)
         else :
           return "<html><body><font color=LEVEL>Only with party...</font></body></html>"
       else :
         return "<html><body>The Raid currently<font color=LEVEL> in process.<font>.<br1>Try later.</body></html>"
     else : 
       return "<html><body>You dont have <font color=LEVEL>10 Silver Hemocyte<font>.</body></html>"
   return
Пример #3
0
 def onKill(self, npc, player, isPet) :
   GrandBossManager.getInstance().setBossStatus(Benom,DEAD)
   self.cancelQuestTimer("BenomWalk", npc, None)
   self.cancelQuestTimer("BenomWalkFinish", npc, None)
   self.cancelQuestTimer("BenomBossDespawn", npc, None)
   self.cancelQuestTimer("Talk", npc, None)
   self.cancelQuestTimer("Attacking", npc, None)
   return
Пример #4
0
 def onKill(self, npc, player, isPet) :
   GrandBossManager.getInstance().setBossStatus(Benom,DEAD)
   self.cancelQuestTimer("BenomWalk", npc, None)
   self.cancelQuestTimer("BenomWalkFinish", npc, None)
   self.cancelQuestTimer("BenomBossDespawn", npc, None)
   self.cancelQuestTimer("Talk", npc, None)
   self.cancelQuestTimer("Attacking", npc, None)
   return
Пример #5
0
 def onTalk(self, npc, player):
     st = player.getQuestState("sailren")
     npcId = npc.getNpcId()
     close = self.loadGlobalQuestVar("close")
     time = self.loadGlobalQuestVar("time")
     party = player.getParty()
     if npcId == STATUE:
         if st.getQuestItemsCount(STONE) >= 1:
             if close == "":
                 if party:
                     for player in party.getPartyMembers():
                         st.takeItems(STONE, 1)
                         self.saveGlobalQuestVar("close", "1")
                         zone = GrandBossManager.getInstance().getZone(
                             27244, -7026, -1974)
                         if zone:
                             zone.allowPlayerEntry(player, 3600)
                         player.teleToLocation(27244, -7026, -1974)
                         self.startQuestTimer("start", 30000, npc, player)
                         self.startQuestTimer("open", 1800000, npc, None)
                 else:
                     return "<html><body><font color=LEVEL>Only with party...</font></body></html>"
             else:
                 return "<html><body><font color=LEVEL>Some one else is inside...</font></body></html>"
         else:
             return "<html><body>You need quest item: <font color=LEVEL>Gazkh...</font></body></html>"
     return
Пример #6
0
 def onFirstTalk (self,npc,player):
   st = player.getQuestState(qn)
   if not st : st = self.newQuestState(player)

   baiumStatus = GrandBossManager.getInstance().getBossStatus(29020)
   if baiumStatus != 2 and st.getQuestItemsCount(4295) :
     st.exitQuest(1)
     return "31862.htm"
   else :
     npc.showChatWindow(player)
     st.exitQuest(1)
     return
   return
Пример #7
0
    def onFirstTalk(self, npc, player):
        st = player.getQuestState(qn)
        if not st: st = self.newQuestState(player)

        baiumStatus = GrandBossManager.getInstance().getBossStatus(29020)
        if baiumStatus != 2 and st.getQuestItemsCount(4295):
            st.exitQuest(1)
            return "31862.htm"
        else:
            npc.showChatWindow(player)
            st.exitQuest(1)
            return
        return
Пример #8
0
 def onAdvEvent(self, event, npc, player) :
   status = GrandBossManager.getInstance().getBossStatus(Benom)
   if event == "BenomTeleSpawn" :
     self.Teleport = self.addSpawn(BenomTeleport, 11013, -49629, -547, 13400, False, 0)
   elif event == "BenomRaidRoomSpawn" :
     if self.BenomIsSpawned == 0 and status == 0 :
       self.Benomm = self.addSpawn(Benom, 12047, -49211, -3009, 0, False, 0)
       self.BenomIsSpawned = 1
   elif event == "BenomRaidSiegeSpawn" :
     if status == 0 :
       if self.BenomIsSpawned == 0 :
         self.Benomm = self.addSpawn(Benom, 11025, -49152, -537, 0, False, 0)
         self.BenomIsSpawned = 1
       elif self.BenomIsSpawned == 1 :
         self.Benomm.teleToLocation(11025, -49152, -537)
       self.startQuestTimer("BenomSpawnEffect", 100, None, None)
       self.startQuestTimer("BenomBossDespawn", 5400000, None, None)
       self.Teleport.deleteMe()
   elif event == "BenomSpawnEffect" :
     self.Benomm.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE)
     self.Benomm.broadcastPacket(SpecialCamera(self.Benomm.getObjectId(), 200, 0, 150, 0, 5000))
     self.Benomm.broadcastPacket(SocialAction(self.Benomm.getObjectId(), 3))
     self.startQuestTimer("BenomWalk", 5000, self.Benomm, None)
     self.BenomWalkRouteStep = 0
   elif event == "Attacking" :
     NumPlayers = []
     for player in npc.getKnownList().getKnownPlayers().values() :
       NumPlayers.append(player)
     if len(NumPlayers) > 0 :
       target = NumPlayers[Rnd.get(len(NumPlayers))]
       npc.addDamageHate(target, 0, 999)
       npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target)
       self.startQuestTimer("Attacking", 2000, npc, player)
     elif len(NumPlayers) == 0 :
         self.startQuestTimer("BenomWalkFinish", 2000, npc, None)
   elif event == "BenomWalkFinish" :
     if npc.getCastle().getSiege().getIsInProgress() :
       self.cancelQuestTimer("Attacking", npc, player)
       X = benomWalkRoutes[self.BenomWalkRouteStep][0]
       Y = benomWalkRoutes[self.BenomWalkRouteStep][1]
       Z = benomWalkRoutes[self.BenomWalkRouteStep][2]
       npc.teleToLocation(X, Y, Z)
       npc.setWalking()
       self.BenomWalkRouteStep = 0
       self.startQuestTimer("BenomWalk", 2200, npc, None)
   elif event == "BenomWalk" :
     if self.BenomWalkRouteStep == 33 :
       self.BenomWalkRouteStep = 0
       self.startQuestTimer("BenomWalk", 100, npc, None)
     else :
       self.startQuestTimer("Talk", 100, npc, None)
       if self.BenomWalkRouteStep == 14 :
         self.startQuestTimer("DoorOpen", 15000, None, None)
         self.startQuestTimer("DoorClose", 23000, None, None)
       if self.BenomWalkRouteStep == 32 :
         self.startQuestTimer("DoorOpen", 500, None, None)
         self.startQuestTimer("DoorClose", 4000, None, None)
       Time = WalkTimes[self.BenomWalkRouteStep]
       npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE)
       X = benomWalkRoutes[self.BenomWalkRouteStep][0]
       Y = benomWalkRoutes[self.BenomWalkRouteStep][1]
       Z = benomWalkRoutes[self.BenomWalkRouteStep][2]
       npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(X, Y, Z, 0))
       self.BenomWalkRouteStep = int(self.BenomWalkRouteStep) + 1
       self.startQuestTimer("BenomWalk", Time, npc, None)
   elif event == "DoorOpen" :
     DoorTable.getInstance().getDoor(20160005).openMe()
   elif event == "DoorClose" :
     DoorTable.getInstance().getDoor(20160005).closeMe()
   elif event == "Talk" :
     if Rnd.get(100) < 40 :
       npc.broadcastPacket(CreatureSay(npc.getObjectId(), 0, "Benom", BenomSpeak[Rnd.get(4)]))
   elif event == "BenomBossDespawn" :
     GrandBossManager.getInstance().setBossStatus(Benom,LIVE)
     self.BenomIsSpawned = 0
     self.Benomm.deleteMe()
   return
Пример #9
0
 def onTalk(self, npc, player):
     npcId = npc.getNpcId()
     htmltext = ""
     if npcId == 13001:  #heart of warding
         if self.antharasAI:
             status = GrandBossManager.getInstance().getBossStatus(29019)
             statusW = GrandBossManager.getInstance().getBossStatus(29066)
             statusN = GrandBossManager.getInstance().getBossStatus(29067)
             statusS = GrandBossManager.getInstance().getBossStatus(29068)
             if status == 2 or statusW == 2 or statusN == 2 or statusS == 2:
                 htmltext = "13001-02.htm"
             elif status == 3 or statusW == 3 or statusN == 3 or statusS == 3:
                 htmltext = "13001-01.htm"
             elif status == 0 or status == 1:  #If entrance to see Antharas is unlocked (he is Dormant or Waiting)
                 st = player.getQuestState(qn)
                 if st.getQuestItemsCount(3865) > 0:
                     st.takeItems(3865, 1)
                     zone = GrandBossManager.getInstance().getZone(
                         179700, 113800, -7709)
                     if zone:
                         zone.allowPlayerEntry(player, 30)
                     x = 179700 + Rnd.get(700)
                     y = 113800 + Rnd.get(2100)
                     player.teleToLocation(x, y, -7709)
                     if status == 0:
                         self.antharasAI.setAntharasSpawnTask()
                     return
                 else:
                     htmltext = "13001-03.htm"
     elif npcId == 31859:  #antharas teleport cube
         x = 79800 + Rnd.get(600)
         y = 151200 + Rnd.get(1100)
         player.teleToLocation(x, y, -3534)
         return
     elif npcId == 31385:  #heart of volcano
         htmltext = "31385-01.htm"
         if self.valakasAI:
             status = GrandBossManager.getInstance().getBossStatus(29028)
             if status == 0 or status == 1:  #If entrance to see Valakas is unlocked (he is Dormant or Waiting)
                 st = player.getQuestState(qn)
                 if self.count >= 200:
                     htmltext = "31385-03.htm"
                 elif st.getInt("allowEnter") == 1:
                     st.unset("allowEnter")
                     zone = GrandBossManager.getInstance().getZone(
                         212852, -114842, -1632)
                     if zone:
                         zone.allowPlayerEntry(player, 30)
                     x = 204328 + Rnd.get(600)
                     y = -111874 + Rnd.get(600)
                     player.teleToLocation(x, y, 70)
                     self.count = self.count + 1
                     if status == 0:
                         valakas = GrandBossManager.getInstance().getBoss(
                             29028)
                         self.valakasAI.startQuestTimer(
                             "lock_entry_and_spawn_valakas",
                             60000 * Config.VALAKAS_WAIT_TIME, valakas,
                             None)
                         GrandBossManager.getInstance().setBossStatus(
                             29028, 1)
                     return
                 else:  #player cheated, wasn't ported via npc Klein
                     htmltext = "31385-04.htm"
             elif status == 2:
                 htmltext = "31385-02.htm"
             else:
                 htmltext = "31385-01.htm"
         else:
             htmltext = "31385-01.htm"
     elif npcId == 31384:  #Gatekeeper of Fire Dragon
         DoorTable.getInstance().getDoor(24210004).openMe()
         return
     elif npcId == 31686:  #Gatekeeper of Fire Dragon
         DoorTable.getInstance().getDoor(24210006).openMe()
         return
     elif npcId == 31687:  #Gatekeeper of Fire Dragon
         DoorTable.getInstance().getDoor(24210005).openMe()
         return
     elif npcId == 31540:  #Watcher of Valakas Klein
         st = player.getQuestState(qn)
         if self.count < 50:
             htmltext = "31540-01.htm"
         elif self.count < 100:
             htmltext = "31540-02.htm"
         elif self.count < 150:
             htmltext = "31540-03.htm"
         elif self.count < 200:
             htmltext = "31540-04.htm"
         else:
             htmltext = "31540-05.htm"
     elif npcId == 31759:  #valakas teleport cube
         x = 150037 + Rnd.get(500)
         y = -57720 + Rnd.get(500)
         player.teleToLocation(x, y, -2976)
         return
     return htmltext
Пример #10
0
 def onAdvEvent(self, event, npc, player) :
   status = GrandBossManager.getInstance().getBossStatus(Benom)
   if event == "BenomTeleSpawn" :
     self.Teleport = self.addSpawn(BenomTeleport, 11013, -49629, -547, 13400, False, 0)
   elif event == "BenomRaidRoomSpawn" :
     if self.BenomIsSpawned == 0 and status == 0 :
       self.Benomm = self.addSpawn(Benom, 12047, -49211, -3009, 0, False, 0)
       self.BenomIsSpawned = 1
   elif event == "BenomRaidSiegeSpawn" :
     if status == 0 :
       if self.BenomIsSpawned == 0 :
         self.Benomm = self.addSpawn(Benom, 11025, -49152, -537, 0, False, 0)
         self.BenomIsSpawned = 1
       elif self.BenomIsSpawned == 1 :
         self.Benomm.teleToLocation(11025, -49152, -537)
       self.startQuestTimer("BenomSpawnEffect", 100, None, None)
       self.startQuestTimer("BenomBossDespawn", 5400000, None, None)
       self.Teleport.deleteMe()
   elif event == "BenomSpawnEffect" :
     self.Benomm.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE)
     self.Benomm.broadcastPacket(SpecialCamera(self.Benomm.getObjectId(), 200, 0, 150, 0, 5000))
     self.Benomm.broadcastPacket(SocialAction(self.Benomm.getObjectId(), 3))
     self.startQuestTimer("BenomWalk", 5000, self.Benomm, None)
     self.BenomWalkRouteStep = 0
   elif event == "Attacking" :
     NumPlayers = []
     for player in npc.getKnownList().getKnownPlayers().values() :
       NumPlayers.append(player)
     if len(NumPlayers) > 0 :
       target = NumPlayers[Rnd.get(len(NumPlayers))]
       npc.addDamageHate(target, 0, 999)
       npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target)
       self.startQuestTimer("Attacking", 2000, npc, player)
     elif len(NumPlayers) == 0 :
         self.startQuestTimer("BenomWalkFinish", 2000, npc, None)
   elif event == "BenomWalkFinish" :
     if npc.getCastle().getSiege().getIsInProgress() :
       self.cancelQuestTimer("Attacking", npc, player)
       X = benomWalkRoutes[self.BenomWalkRouteStep][0]
       Y = benomWalkRoutes[self.BenomWalkRouteStep][1]
       Z = benomWalkRoutes[self.BenomWalkRouteStep][2]
       npc.teleToLocation(X, Y, Z)
       npc.setWalking()
       self.BenomWalkRouteStep = 0
       self.startQuestTimer("BenomWalk", 2200, npc, None)
   elif event == "BenomWalk" :
     if self.BenomWalkRouteStep == 33 :
       self.BenomWalkRouteStep = 0
       self.startQuestTimer("BenomWalk", 100, npc, None)
     else :
       self.startQuestTimer("Talk", 100, npc, None)
       if self.BenomWalkRouteStep == 14 :
         self.startQuestTimer("DoorOpen", 15000, None, None)
         self.startQuestTimer("DoorClose", 23000, None, None)
       if self.BenomWalkRouteStep == 32 :
         self.startQuestTimer("DoorOpen", 500, None, None)
         self.startQuestTimer("DoorClose", 4000, None, None)
       Time = WalkTimes[self.BenomWalkRouteStep]
       npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE)
       X = benomWalkRoutes[self.BenomWalkRouteStep][0]
       Y = benomWalkRoutes[self.BenomWalkRouteStep][1]
       Z = benomWalkRoutes[self.BenomWalkRouteStep][2]
       npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(X, Y, Z, 0))
       self.BenomWalkRouteStep = int(self.BenomWalkRouteStep) + 1
       self.startQuestTimer("BenomWalk", Time, npc, None)
   elif event == "DoorOpen" :
     DoorTable.getInstance().getDoor(20160005).openMe()
   elif event == "DoorClose" :
     DoorTable.getInstance().getDoor(20160005).closeMe()
   elif event == "Talk" :
     if Rnd.get(100) < 40 :
       npc.broadcastPacket(CreatureSay(npc.getObjectId(), 0, "Benom", BenomSpeak[Rnd.get(4)]))
   elif event == "BenomBossDespawn" :
     GrandBossManager.getInstance().setBossStatus(Benom,LIVE)
     self.BenomIsSpawned = 0
     self.Benomm.deleteMe()
   return
Пример #11
0
 def onTalk (self,npc,player):
    npcId = npc.getNpcId()
    htmltext = ""
    if npcId == 13001 : #heart of warding
        if self.antharasAI :
            status = GrandBossManager.getInstance().getBossStatus(29019)
            statusW = GrandBossManager.getInstance().getBossStatus(29066)
            statusN = GrandBossManager.getInstance().getBossStatus(29067)
            statusS = GrandBossManager.getInstance().getBossStatus(29068)
            if status == 2 or statusW == 2 or statusN == 2 or statusS == 2:
                htmltext = "13001-02.htm"
            elif status == 3 or statusW == 3 or statusN == 3 or statusS == 3:
                htmltext = "13001-01.htm"
            elif status == 0 or status == 1 : #If entrance to see Antharas is unlocked (he is Dormant or Waiting)
                st = player.getQuestState(qn)
                if st.getQuestItemsCount(3865) > 0 :
                    st.takeItems(3865,1)
                    zone = GrandBossManager.getInstance().getZone(179700,113800,-7709)
                    if zone : 
                        zone.allowPlayerEntry(player,30)
                    x = 179700 + Rnd.get(700) 
                    y = 113800 + Rnd.get(2100) 
                    player.teleToLocation(x,y,-7709)
                    if status == 0 :
                        self.antharasAI.setAntharasSpawnTask()
                    return
                else :
                    htmltext = "13001-03.htm"
    elif npcId == 31859 : #antharas teleport cube
        x = 79800 + Rnd.get(600)
        y = 151200 + Rnd.get(1100)
        player.teleToLocation(x,y,-3534)
        return
    elif npcId == 31385 : #heart of volcano
        htmltext = "31385-01.htm"
        if self.valakasAI :
            status = GrandBossManager.getInstance().getBossStatus(29028)
            if status == 0 or status == 1 : #If entrance to see Valakas is unlocked (he is Dormant or Waiting)
                st = player.getQuestState(qn)
                if self.count >= 200 :
                   htmltext = "31385-03.htm"
                elif st.getInt("allowEnter") == 1:
                   st.unset("allowEnter")
                   zone = GrandBossManager.getInstance().getZone(212852,-114842,-1632)
                   if zone :
                      zone.allowPlayerEntry(player,30)
                   x = 204328 + Rnd.get(600)
                   y = -111874 + Rnd.get(600)
                   player.teleToLocation(x,y,70)
                   self.count = self.count+1
                   if status == 0 :
                      valakas = GrandBossManager.getInstance().getBoss(29028)
                      self.valakasAI.startQuestTimer("lock_entry_and_spawn_valakas",60000*Config.VALAKAS_WAIT_TIME, valakas, None)
                      GrandBossManager.getInstance().setBossStatus(29028,1)
                   return
                else: #player cheated, wasn't ported via npc Klein
                  htmltext = "31385-04.htm"   
            elif status == 2 :
                htmltext = "31385-02.htm"
            else :
                htmltext = "31385-01.htm"
        else :
            htmltext = "31385-01.htm"
    elif npcId == 31384 : #Gatekeeper of Fire Dragon
        DoorTable.getInstance().getDoor(24210004).openMe()
        return
    elif npcId == 31686 : #Gatekeeper of Fire Dragon
        DoorTable.getInstance().getDoor(24210006).openMe()
        return
    elif npcId == 31687 : #Gatekeeper of Fire Dragon
        DoorTable.getInstance().getDoor(24210005).openMe()
        return
    elif npcId == 31540 : #Watcher of Valakas Klein
        st = player.getQuestState(qn)
        if self.count < 50 :
           htmltext = "31540-01.htm"
        elif self.count < 100 :
           htmltext = "31540-02.htm"
        elif self.count < 150 :
           htmltext = "31540-03.htm"
        elif self.count < 200 :
           htmltext = "31540-04.htm"
        else:
           htmltext = "31540-05.htm"
    elif npcId == 31759 : #valakas teleport cube
        x = 150037 + Rnd.get(500)
        y = -57720 + Rnd.get(500)
        player.teleToLocation(x,y,-2976)
        return
    return htmltext