コード例 #1
0
ファイル: __init__.py プロジェクト: mjsxjy/l2jtw_datapack
 def onTalk(self, npc, player):
     npcId = npc.getNpcId()
     htmltext = ""
     if npcId == 13001:  #heart of warding
         htmltext = "13001-01.htm"
         if self.antharasAI:
             status = GrandBossManager.getInstance().getBossStatus(29019)
             if 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)
                     self.antharasAI.zone.allowPlayerEntry(player, 30)
                     x = 179700 + Rnd.get(700)
                     y = 113800 + Rnd.get(2100)
                     player.teleToLocation(x, y, -7709)
                     if status == 0:
                         antharas = GrandBossManager.getInstance().getBoss(
                             29019)
                         self.antharasAI.startQuestTimer(
                             "waiting", 1800000, antharas, None)
                         GrandBossManager.getInstance().setBossStatus(
                             29019, 1)
                     return
                 else:
                     htmltext = "13001-03.htm"
             elif status == 2:
                 htmltext = "13001-02.htm"
     elif npcId == 31859:  #antharas teleport cube
         x = 79800 + Rnd.get(600)
         y = 151200 + Rnd.get(1100)
         player.teleToLocation(x, y, -3534)
         return
     return htmltext
コード例 #2
0
ファイル: __init__.py プロジェクト: Vados420/l2jtw_datapack
 def onTalk (self,npc,player):
    npcId = npc.getNpcId()
    htmltext = ""
    if npcId == 13001 : #heart of warding
        htmltext = "13001-01.htm"
        if self.antharasAI :
            status = GrandBossManager.getInstance().getBossStatus(29019)
            if 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)
                    self.antharasAI.zone.allowPlayerEntry(player,30)
                    x = 179700 + Rnd.get(700)
                    y = 113800 + Rnd.get(2100)
                    player.teleToLocation(x,y,-7709)
                    if status == 0 :
                        antharas = GrandBossManager.getInstance().getBoss(29019)
                        self.antharasAI.startQuestTimer("waiting",1800000, antharas, None)
                        GrandBossManager.getInstance().setBossStatus(29019,1)
                    return
                else :
                    htmltext = "13001-03.htm"
            elif status == 2 :
                htmltext = "13001-02.htm"
    elif npcId == 31859 : #antharas teleport cube
        x = 79800 + Rnd.get(600)
        y = 151200 + Rnd.get(1100)
        player.teleToLocation(x,y,-3534)
        return
    return htmltext
コード例 #3
0
ファイル: sailren.py プロジェクト: Vados420/l2jtw_datapack
 def onKill (self,npc,player,isPet):
   st = player.getQuestState("sailren")
   if not st: return
   if GrandBossManager.getInstance().checkIfInZone("LairofSailren", player) :
     npcId = npc.getNpcId()
     if npcId == VELOCIRAPTOR :
       SailrenManager.getInstance().setSailrenSpawnTask(PTEROSAUR)
     elif npcId == PTEROSAUR :
       SailrenManager.getInstance().setSailrenSpawnTask(TYRANNOSAURUS)
     elif npcId == TYRANNOSAURUS :
       SailrenManager.getInstance().setSailrenSpawnTask(SAILREN)
     elif npcId == SAILREN :
       SailrenManager.getInstance().setCubeSpawn()
       st.exitQuest(1)
   return
コード例 #4
0
 def onKill(self, npc, player, isPet):
     st = player.getQuestState("sailren")
     if not st: return
     if GrandBossManager.getInstance().checkIfInZone(
             "LairofSailren", player):
         npcId = npc.getNpcId()
         if npcId == VELOCIRAPTOR:
             SailrenManager.getInstance().setSailrenSpawnTask(PTEROSAUR)
         elif npcId == PTEROSAUR:
             SailrenManager.getInstance().setSailrenSpawnTask(TYRANNOSAURUS)
         elif npcId == TYRANNOSAURUS:
             SailrenManager.getInstance().setSailrenSpawnTask(SAILREN)
         elif npcId == SAILREN:
             SailrenManager.getInstance().setCubeSpawn()
             st.exitQuest(1)
     return
コード例 #5
0
ファイル: __init__.py プロジェクト: mjsxjy/l2jtw_datapack
 def onTalk(self, npc, player):
     npcId = npc.getNpcId()
     htmltext = ""
     if npcId == 13001:  #heart of warding
         htmltext = "13001-01.htm"
         if self.antharasAI:
             status = GrandBossManager.getInstance().getBossStatus(29019)
             if 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(
                         181323, 114850, -7618)  #Update by rocknow
                     if zone:
                         zone.allowPlayerEntry(player, 30)
                     x = 174170 + Rnd.get(260)  #Update by rocknow
                     y = 113983 + Rnd.get(1500)  #Update by rocknow
                     player.teleToLocation(x, y, -7709)
                     if status == 0:
                         self.antharasAI.startQuestTimer(
                             "waiting", 0, npc, None)  #Update by rocknow
                         #Delete by rocknow
                         #Delete by rocknow
                     return
                 else:
                     htmltext = "13001-03.htm"
             elif status == 2:
                 htmltext = "13001-02.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:
                         self.valakasAI.startQuestTimer(
                             "1001", 0, npc, None)  #Update by rocknow
                         #Delete by rocknow
                         #Delete by rocknow
                     return
                 elif st.getQuestItemsCount(
                         7267) > 0:  #Update by rocknow-Start
                     st.takeItems(7267, 1)
                     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:
                         self.valakasAI.startQuestTimer(
                             "1001", 0, npc, None)
                     return  #Update by rocknow-End
                 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