Package l2p.gameserver.model.quest

Examples of l2p.gameserver.model.quest.QuestTimer


            st.startQuestTimer("VultusSonOfVoltarQuestMonster", 200000);
          }
          if(sound == 1)
          {
            st.playSound(SOUND_BEFORE_BATTLE);
            QuestTimer timer = st.getQuestTimer("Wait1");
            if(timer != null)
            {
              timer.cancel();
            }
          }
          else
          {
            st.startQuestTimer("Wait1", 300000);
            htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
          }
        }
        else if(st.getQuestItemsCount(PashikasHead) > 0 && st.getQuestItemsCount(VultusHead) > 0)
        {
          st.takeItems(PashikasHead, -1);
          st.takeItems(VultusHead, -1);
          st.takeItems(GloveOfVoltar, -1);
          st.giveItems(ScepterOfBreka, 1);
          htmltext = "30615-06.htm";
          if(st.getQuestItemsCount(ScepterOfBreka) > 0 && st.getQuestItemsCount(ScepterOfEnku) > 0 && st.getQuestItemsCount(ScepterOfVuku) > 0 && st.getQuestItemsCount(ScepterOfTurek) > 0 && st.getQuestItemsCount(ScepterOfTunath) > 0)
          {
            st.set("cond", "5");
            st.setState(STARTED);
            st.playSound(SOUND_MIDDLE);
          }
          else
          {
            st.playSound(SOUND_ITEMGET);
          }
        }
        else if(st.getQuestItemsCount(ScepterOfBreka) > 0)
        {
          htmltext = "30615-07.htm";
        }
        else
        {
          htmltext = "30615-01.htm";
        }
      }
    }
    else if(npcId == Kepra)
    {
      if(cond == 4)
      {
        if(st.getQuestItemsCount(ManakiaLetter2st) > 0)
        {
          htmltext = "30616-02.htm";
        }
        else if(st.getQuestItemsCount(GloveOfKepra) > 0 && st.getQuestItemsCount(EnkuOverlordHead) < 4)
        {
          htmltext = "30616-05.htm";
          L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
          if(isQuest != null)
          {
            st.startQuestTimer("Wait2", 300000);
            htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
          }
          else
          {
            QuestTimer timer = st.getQuestTimer("Wait2");
            if(timer != null)
            {
              timer.cancel();
            }
            st.startQuestTimer("EnkuOrcOverlordQuestMonster", 200000);
            st.addSpawn(EnkuOrcOverlordQuestMonster);
            st.addSpawn(EnkuOrcOverlordQuestMonster);
            st.addSpawn(EnkuOrcOverlordQuestMonster);
            st.addSpawn(EnkuOrcOverlordQuestMonster);
            st.playSound(SOUND_BEFORE_BATTLE);
          }
        }
        else if(st.getQuestItemsCount(EnkuOverlordHead) >= 4)
        {
          htmltext = "30616-06.htm";
          st.takeItems(EnkuOverlordHead, -1);
          st.takeItems(GloveOfKepra, -1);
          st.giveItems(ScepterOfEnku, 1);
          if(st.getQuestItemsCount(ScepterOfBreka) > 0 && st.getQuestItemsCount(ScepterOfEnku) > 0 && st.getQuestItemsCount(ScepterOfVuku) > 0 && st.getQuestItemsCount(ScepterOfTurek) > 0 && st.getQuestItemsCount(ScepterOfTunath) > 0)
          {
            st.set("cond", "5");
            st.setState(STARTED);
            st.playSound(SOUND_MIDDLE);
          }
          else
          {
            st.playSound(SOUND_ITEMGET);
          }
        }
        else if(st.getQuestItemsCount(ScepterOfEnku) > 0)
        {
          htmltext = "30616-07.htm";
        }
        else
        {
          htmltext = "30616-01.htm";
        }
      }
    }
    else if(npcId == Burai)
    {
      if(cond == 4)
      {
        if(st.getQuestItemsCount(KasmansLetter2rd) > 0)
        {
          htmltext = "30617-02.htm";
        }
        else if(st.getQuestItemsCount(GloveOfBurai) > 0 && st.getQuestItemsCount(MakumBugbearHead) < 2)
        {
          htmltext = "30617-05.htm";
          L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
          if(isQuest != null)
          {
            st.startQuestTimer("Wait3", 300000);
            htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
          }
          else
          {
            QuestTimer timer = st.getQuestTimer("Wait3");
            if(timer != null)
            {
              timer.cancel();
            }
            st.startQuestTimer("MakumBugbearThugQuestMonster", 200000);
            st.addSpawn(MakumBugbearThugQuestMonster);
            st.addSpawn(MakumBugbearThugQuestMonster);
            st.playSound(SOUND_BEFORE_BATTLE);
View Full Code Here


    }
    else if(cond == 4)
    {
      if(npcId == PashikasSonOfVoltarQuestMonster)
      {
        QuestTimer timer = st.getQuestTimer("PashikasSonOfVoltarQuestMonster");
        if(timer != null)
        {
          timer.cancel();
        }
        L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(PashikasSonOfVoltarQuestMonster);
        if(isQuest != null)
        {
          isQuest.deleteMe();
        }
        if(st.getQuestItemsCount(GloveOfVoltar) > 0 && st.getQuestItemsCount(PashikasHead) == 0)
        {
          st.giveItems(PashikasHead, 1);
        }
      }
      else if(npcId == VultusSonOfVoltarQuestMonster)
      {
        QuestTimer timer = st.getQuestTimer("VultusSonOfVoltarQuestMonster");
        if(timer != null)
        {
          timer.cancel();
        }
        L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(VultusSonOfVoltarQuestMonster);
        if(isQuest != null)
        {
          isQuest.deleteMe();
        }
        if(st.getQuestItemsCount(GloveOfVoltar) > 0 && st.getQuestItemsCount(VultusHead) == 0)
        {
          st.giveItems(VultusHead, 1);
        }
      }
    }
    else if(cond == 6 && st.getQuestItemsCount(TimakOrcHead) >= 20 && st.getQuestItemsCount(TamlinOrcSkull) >= 20)
    {
      st.set("cond", "7");
      st.setState(STARTED);
    }
    else if(cond == 9)
    {
      if(npcId == RagnaOrcOverlord || npcId == RagnaOrcSeer)
      {
        L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(RevenantOfTantosChief);
        if(isQuest == null)
        {
          st.startQuestTimer("RevenantOfTantosChief", 300000);
          st.addSpawn(RevenantOfTantosChief);
          st.playSound(SOUND_BEFORE_BATTLE);
        }
        else
        {
          QuestTimer timer = st.getQuestTimer("Wait4");
          if(timer == null)
          {
            st.startQuestTimer("Wait4", 300000);
          }
        }
      }
      else if(npcId == RevenantOfTantosChief)
      {
        QuestTimer timer = st.getQuestTimer("RevenantOfTantosChief");
        if(timer != null)
        {
          timer.cancel();
        }
        timer = st.getQuestTimer("Wait4");
        if(timer != null)
        {
          timer.cancel();
        }
        L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(RevenantOfTantosChief);
        if(isQuest != null)
        {
          isQuest.deleteMe();
View Full Code Here

      {
        spawn = 1;
      }
      if(spawn == 1) //если хоть один моб есть в мире, ставим таймер на удаление их(ня всякий) + говорим игроку подождать.
      {
        QuestTimer timer = st.getQuestTimer("Wait1");
        if(timer == null)
        {
          st.startQuestTimer("Wait1", 300000);
        }
        htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
      }
      else
      {
        st.takeItems(ManakiaLetter1st, -1);
        st.giveItems(GloveOfVoltar, 1);
        QuestTimer timer = st.getQuestTimer("Wait1");
        if(timer != null)
        {
          timer.cancel();
        }
        st.startQuestTimer("PashikasSonOfVoltarQuestMonster", 200000);
        st.startQuestTimer("VultusSonOfVoltarQuestMonster", 200000);
        st.addSpawn(PashikasSonOfVoltarQuestMonster);
        st.addSpawn(VultusSonOfVoltarQuestMonster);
        st.playSound(SOUND_BEFORE_BATTLE);
      }
    }
    else if(event.equalsIgnoreCase("30616-04.htm"))
    {
      //Проверяем есть ли в мире уже квест монстры
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
      if(isQuest != null)
      {
        QuestTimer timer = st.getQuestTimer("Wait2");
        if(timer == null)
        {
          st.startQuestTimer("Wait2", 300000);
        }
        htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
      }
      else
      {
        st.takeItems(ManakiaLetter2st, -1);
        st.giveItems(GloveOfKepra, 1);
        QuestTimer timer = st.getQuestTimer("Wait2");
        if(timer != null)
        {
          timer.cancel();
        }
        st.startQuestTimer("EnkuOrcOverlordQuestMonster", 200000);
        st.addSpawn(EnkuOrcOverlordQuestMonster);
        st.addSpawn(EnkuOrcOverlordQuestMonster);
        st.addSpawn(EnkuOrcOverlordQuestMonster);
        st.addSpawn(EnkuOrcOverlordQuestMonster);
        st.playSound(SOUND_BEFORE_BATTLE);
      }
    }
    else if(event.equalsIgnoreCase("30617-04.htm"))
    {
      //Проверяем есть ли в мире уже квест монстры
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
      if(isQuest != null)
      {
        QuestTimer timer = st.getQuestTimer("Wait3");
        if(timer == null)
        {
          st.startQuestTimer("Wait3", 300000);
        }
        htmltext = "<html><head><body>Plees wait 5 minutes</body></html>";
      }
      else
      {
        st.takeItems(KasmansLetter2rd, -1);
        st.giveItems(GloveOfBurai, 1);
        QuestTimer timer = st.getQuestTimer("Wait3");
        if(timer != null)
        {
          timer.cancel();
        }
        st.startQuestTimer("MakumBugbearThugQuestMonster", 200000);
        st.addSpawn(MakumBugbearThugQuestMonster);
        st.addSpawn(MakumBugbearThugQuestMonster);
        st.playSound(SOUND_BEFORE_BATTLE);
      }
    }
    else if(event.equalsIgnoreCase("30618-03.htm"))
    {
      st.takeItems(KasmansLetter3rd, -1);
      st.giveItems(ScepterOfTunath, 1);
      if(st.getQuestItemsCount(ScepterOfBreka) != 0 && st.getQuestItemsCount(ScepterOfEnku) != 0 && st.getQuestItemsCount(ScepterOfVuku) != 0 && st.getQuestItemsCount(ScepterOfTurek) != 0 && st.getQuestItemsCount(ScepterOfTunath) != 0)
      {
        st.set("cond", "5");
        st.setState(STARTED);
      }
    }
    else if(event.equalsIgnoreCase("30619-03.htm"))
    {
      st.takeItems(KasmansLetter1rd, -1);
      st.giveItems(DrikosContract, 1);
    }
    //Далее идет 3 велосипеда
    else if(event.equalsIgnoreCase("Wait1") || event.equalsIgnoreCase("PashikasSonOfVoltarQuestMonster") || event.equalsIgnoreCase("VultusSonOfVoltarQuestMonster"))
    {
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(PashikasSonOfVoltarQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      isQuest = L2ObjectsStorage.getByNpcId(VultusSonOfVoltarQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait1");
      if(timer != null)
      {
        timer.cancel();
      }
      timer = st.getQuestTimer("PashikasSonOfVoltarQuestMonster");
      if(timer != null)
      {
        timer.cancel();
      }
    }
    else if(event.equalsIgnoreCase("Wait2") || event.equalsIgnoreCase("EnkuOrcOverlordQuestMonster"))
    {
      //Велосипед, но нужно удалить всех 4 одинаковых мобов
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      isQuest = L2ObjectsStorage.getByNpcId(EnkuOrcOverlordQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait2");
      if(timer != null)
      {
        timer.cancel();
      }
      timer = st.getQuestTimer("EnkuOrcOverlordQuestMonster");
      if(timer != null)
      {
        timer.cancel();
      }
    }
    else if(event.equalsIgnoreCase("Wait3") || event.equalsIgnoreCase("MakumBugbearThugQuestMonster"))
    {
      //Велосипед, но нужно удалить всех 2 одинаковых мобов
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      isQuest = L2ObjectsStorage.getByNpcId(MakumBugbearThugQuestMonster);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait3");
      if(timer != null)
      {
        timer.cancel();
      }
      timer = st.getQuestTimer("MakumBugbearThugQuestMonster");
      if(timer != null)
      {
        timer.cancel();
      }
    }
    else if(event.equalsIgnoreCase("Wait4") || event.equalsIgnoreCase("RevenantOfTantosChief"))
    {
      //Тележка...
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(RevenantOfTantosChief);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait4");
      if(timer != null)
      {
        timer.cancel();
      }
      timer = st.getQuestTimer("RevenantOfTantosChief");
      if(timer != null)
      {
        timer.cancel();
      }
    }
    return htmltext;
  }
View Full Code Here

        }
      }
    }
    else if(npcId == QuestMonsterDurkaSpirit)
    {
      QuestTimer timer = st.getQuestTimer("QuestMonsterDurkaSpirit_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      for(L2NpcInstance qnpc : L2ObjectsStorage.getAllByNpcId(QuestMonsterDurkaSpirit, false))
      {
        qnpc.deleteMe();
      }
View Full Code Here

        isQuest = L2ObjectsStorage.getByNpcId(OlMahumPilgrimNPC);
        if(isQuest != null)
        {
          isQuest.deleteMe();
        }
        QuestTimer timer = st.getQuestTimer("Wait2");
        if(timer != null)
        {
          timer.cancel();
        }
      }
    }
    else if(npcId == Kakan)
    {
View Full Code Here

        {
          st.giveItems(HugeNail, 1);
        }
        st.set("cond", "3");
        st.setState(STARTED);
        QuestTimer timer = st.getQuestTimer("Wait1");
        if(timer != null)
        {
          timer.cancel();
        }
      }
    }
    else if(npcId == OlMahumInspector)
    {
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(OlMahumInspector);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait2");
      if(timer != null)
      {
        timer.cancel();
      }
      if(cond == 6)
      {
        st.set("cond", "7");
        st.setState(STARTED);
      }
    }
    else if(npcId == OlMahumBetrayer)
    {
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(OlMahumBetrayer);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait3");
      if(timer != null)
      {
        timer.cancel();
      }
      if(cond == 8)
      {
        if(st.getQuestItemsCount(LetterOfBetrayer) == 0)
        {
          st.giveItems(LetterOfBetrayer, 1);
        }
        st.set("cond", "9");
        st.setState(STARTED);
      }
    }
    else if(npcId == CrimsonWerewolf)
    {
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(CrimsonWerewolf);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait4");
      if(timer != null)
      {
        timer.cancel();
      }
      if(cond == 12)
      {
        st.set("cond", "13");
        st.setState(STARTED);
      }
    }
    else if(npcId == KrudelLizardman)
    {
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(KrudelLizardman);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      QuestTimer timer = st.getQuestTimer("Wait5");
      if(timer != null)
      {
        timer.cancel();
      }
      if(cond == 15)
      {
        st.set("cond", "16");
        st.setState(STARTED);
View Full Code Here

      st.set("cond", "12");
      st.setState(STARTED);
    }
    if(event.equalsIgnoreCase("32332-01.htm"))
    {
      QuestTimer timer = st.getQuestTimer("Katenar_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      st.giveItems(Sealed_Doc, 1);
      st.set("cond", "13");
      st.unset("id");
      st.setState(STARTED);
View Full Code Here

  {
    int npcId = npc.getNpcId();
    int cond = st.getInt("cond");
    if(npcId == Guardian_Angel)
    {
      QuestTimer timer = st.getQuestTimer("Guardian_Angel_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      Despawn_Guardian_Angel();
      if(cond == 12)
      {
        for(L2Player cha : L2World.getAroundPlayers(st.getPlayer()))
View Full Code Here

    }
    else if(event.equalsIgnoreCase("32236-01a.htm"))
    {
      st.set("cond", "13");
      st.giveItems(H_LETTER, 1);
      QuestTimer timer = st.getQuestTimer("HARKILGAMED_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      DESPAWN_HARKILGAMED();
    }
    else if(event.equalsIgnoreCase("32215-05a.htm"))
    {
View Full Code Here

        st.setState(STARTED);
      }
    }
    else if(cond == 4 && npcId == DrevanulPrinceZeruel)
    {
      QuestTimer timer = st.getQuestTimer("DrevanulPrinceZeruel_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(DrevanulPrinceZeruel);
      if(isQuest != null)
      {
        isQuest.deleteMe();
      }
      st.set("cond", "5");
      st.unset("id");
      st.setState(STARTED);
    }
    else if(cond == 9 && npcId == DrevanulPrinceZeruel)
    {
      if(st.getItemEquipped(Inventory.PAPERDOLL_RHAND) == SwordOfBinding)
      {
        st.takeItems(Brimstone_2nd, 1);
        st.takeItems(SoultrapCrystal, 1);
        st.giveItems(PurgatoryKey, 1);
        st.giveItems(ZeruelBindCrystal, 1);
        st.playSound(SOUND_MIDDLE);
        st.unset("id");
        st.set("cond", "10");
        st.setState(STARTED);
        return "You trapped the Seal of Drevanul Prince Zeruel";
      }
      QuestTimer timer = st.getQuestTimer("DrevanulPrinceZeruel_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(DrevanulPrinceZeruel);
      if(isQuest != null)
      {
        isQuest.deleteMe();
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.quest.QuestTimer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.