Ir para conteúdo
  • Cadastre-se
  • 0

TELEPORTE VALAKAS NAO FUNCIONA


Weellz

Pergunta

E ai galera, boa noite! Venho mais uma vez humildemente pedir ajuda de vocês. ' rs

Estou com um problema com o Crystal do Valakas, mesmo fazendo a quest e com o Floating Stone no inventário ele não teleporta. Aparece uma msg de erro (You cannout enter).

Porém testei a quest do Baium e do Antharas funcionaram numa boa, creio eu que possa ser o Script mas infelizmente não sei mexer nisso. Irei deixar o Script colado ai, e se alguma alma caridosa poder me ajudar ficarei muito grato.

OBS: Projeto l2jfrozen

 

#Made by Emperorc
import sys
from com.l2jfrozen import Config
from com.l2jfrozen.gameserver.datatables.csv import DoorTable
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
from com.l2jfrozen.gameserver.datatables.sql import SpawnTable
from com.l2jfrozen.util.random import Rnd
from com.l2jfrozen.gameserver.managers import QuestManager
from com.l2jfrozen.gameserver.managers import GrandBossManager

qn = "6000_GrandBossTeleporters"

NPCs = [
    13001, #Heart of Warding : Teleport into Lair of Antharas
    31859, #Teleportation Cubic : Teleport out of Lair of Antharas
    31384, #Gatekeeper of Fire Dragon : Opening some doors
    31385, #Heart of Volcano : Teleport into Lair of Valakas
    31540, #Watcher of Valakas Klein : Teleport into Hall of Flames
    31686, #Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano
    31687, #Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano
    31759, #Teleportation Cubic : Teleport out of Lair of Valakas
    ]

class Quest (JQuest) :

 def __init__(self,id,name,descr):
     self.antharasAI = QuestManager.getInstance().getQuest("antharas")
     self.valakasAI = QuestManager.getInstance().getQuest("valakas")
     self.count = 0
     self.count2 = 0
     JQuest.__init__(self,id,name,descr)

 def onAdvEvent (self,event,npc,player):
    st = player.getQuestState(qn)
    if not st: 
       st = self.newQuestState(player)
    if event == "31540":
       if st.getQuestItemsCount(7267) > 0 :
          st.takeItems(7267,1)
          player.teleToLocation(183813,-115157,-3303)
          st.set("allowEnter","1")
          return
       else :
          htmltext = "31540-06.htm"
    return htmltext

 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

QUEST       = Quest(-1, qn, "Teleports")

for npcid in NPCs :
    QUEST.addStartNpc(npcid)
    QUEST.addTalkId(npcid)

Editado por Weellz
Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts recomendados

  • 0

Uma dúvida, você sabe que não é o crystal que verifica o item né? e sim o NPC que fica no meio do caminho até vc chegar no crystal... se vc n entregar o item pro npc o crystal n te deixa teleportar

Um mundo de diversão no Lineage 2

https://www.primeworld.com.br

Discord: Em breve

Comunidade brasileira de Lineage. Interlude Remastered / High Five / Essence 

Classes remasterizadas, sistemas únicos, diversão garantida.

Link para o comentário
Compartilhar em outros sites


  • 0

Não entendi direito o que você quis dizer amigo...

Sim, tô ligado que tem um NPC no meio do caminho (Klen), mas o que estou querendo dizer é que o Crystal de ambos como Baium e Antharas teleportam numa boa.

OBS: Apenas se tiver a quest e o item no inventário, no entanto com o Valakas não consigo teleporta para o respawn dele mesmo com o item. 

Link para o comentário
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.