예제 #1
0
파일: GBreset.py 프로젝트: w001122/s4L2J
	def htm_list(self):
		gbrt = self.get_GB_respawn_time()
		r = ""
		for key in self.gb_list.keys():
			boss_name, boss_status, dummy = self.gb_list[key]
			curr_status = GrandBossManager.getInstance().getBossStatus(key)
			if len(boss_status)-1 == curr_status:
				r += "<tr><td width=100>" + boss_name + "(" + str(key)+ ")" + "</td><td width=150><a action=\"bypass -h Quest " + self.qn + " " + str(key)+ "\">" + self.get_gbrt_string(gbrt[key]) + "</a></td></tr>"
			else:
				r += "<tr><td width=100>" + boss_name + "(" + str(key)+ ")" + "</td><td>" + boss_status[curr_status] + "</td></tr>"
		# if self.get_STEWARD_state():
			# r += "<tr><td width=100>" + "芙蕾雅的執事" + "</td><td><a action=\"bypass -h Quest " + self.qn + " " + "IFS" + "\">" + " 忙 " + "</a></td></tr>"
		# else:
			# r += "<tr><td width=100>" + "芙蕾雅的執事" + "</td><td>" + "閒" + "</td></tr>"
		r += "<tr><td width=100>" + "與希露再次見面" + "</td><td><a action=\"bypass -h Quest " + self.qn + " " + "reset 10286_ReunionWithSirra" + "\">" + " 重置任務 " + "</a></td></tr>"
		for instance_name, instance_id, require in self.reset_instance:
			r += "<tr><td width=100>" + instance_name + "</td><td><a action=\"bypass -h Quest " + self.qn + " " + "show_require " + str(instance_id) + "\">" + " 重置副本時間" + "</a></td></tr>"
		return self.htm_header + "<table>" + r + "</table>" + self.htm_footer
 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(
                             "1001", 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
예제 #3
0
파일: GBreset.py 프로젝트: w001122/s4L2J
	def beleth_unlock(self, arg):
		GrandBossManager.getInstance().setBossStatus(29118, 0)
		DoorTable.getInstance().getDoor(20240001).openMe()
예제 #4
0
파일: GBreset.py 프로젝트: w001122/s4L2J
	def antharas_unlock(self, arg):
		boss_id = arg[0]
		GrandBossManager.getInstance().setBossStatus(boss_id, 0)
		for p in L2World.getInstance().getAllPlayersArray():
			p.broadcastPacket(Earthquake(185708,114298,-8221,20,10))
예제 #5
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(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
                    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("1001",Config.Valakas_Wait_Time, valakas, None)
                      GrandBossManager.getInstance().setBossStatus(29028,1)
                   return
                #Update by rocknow-Start
                elif st.getQuestItemsCount(7267) > 0 :
                   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 :
                      valakas = GrandBossManager.getInstance().getBoss(29028)
                      self.valakasAI.startQuestTimer("1001",Config.Valakas_Wait_Time, valakas, None)
                      GrandBossManager.getInstance().setBossStatus(29028,1)
                   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