Examples of QuestTimer


Examples of l2p.gameserver.model.quest.QuestTimer

    }
    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

Examples of l2p.gameserver.model.quest.QuestTimer

        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

Examples of l2p.gameserver.model.quest.QuestTimer

    else if(npcId == AldersSpirit)
    {
      htmltext = "30613-02.htm";
      st.set("cond", "11");
      st.setState(STARTED);
      QuestTimer timer = st.getQuestTimer("AldersSpirit_Fail");
      if(timer != null)
      {
        timer.cancel();
      }
      L2NpcInstance isQuest = L2ObjectsStorage.getByNpcId(AldersSpirit);
      if(isQuest != null)
      {
        isQuest.deleteMe();
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

        if(st.getQuestItemsCount(5588) == 0)
        {
          st.giveItems(5588, 1);
        }
        st.set("Ex", "-3");
        QuestTimer timer = st.getQuestTimer("QT");
        if(timer != null)
        {
          timer.cancel();
        }
        st.startQuestTimer("QT", 30000);
      }
      else if(Ex == -3)
      {
        st.playTutorialVoice("tutorial_voice_002");
        st.set("Ex", "0");
      }
      else if(Ex == -4)
      {
        st.playTutorialVoice("tutorial_voice_008");
        st.set("Ex", "-5");
      }
    }
    // Tutorial close
    else if(event.startsWith("TE"))
    {
      QuestTimer timer = st.getQuestTimer("TE");
      if(timer != null)
      {
        timer.cancel();
      }
      int event_id = 0;
      if(!event.equalsIgnoreCase("TE"))
      {
        event_id = Integer.valueOf(event.substring(2));
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

      }
      qs.takeItems(LIDIA_HAIR_PIN, -1);
    }
    else if(npcId == MYSTERIOUS_WIZARD)
    {
      QuestTimer timer_speak = qs.getQuestTimer("To talk with Mystik");
      if(cond == 10 && qs.getQuestItemsCount(SUSPICIOUS_TOTEM_DOLL) != 0)
      {
        htmltext = "31522-01.htm";
      }
      else if(cond == 11 && timer_speak == null && qs.getQuestItemsCount(SUSPICIOUS_TOTEM_DOLL1) == 0)
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

      st.setState(STARTED);
    }
    else if(event.equals("Wait1"))
    {
      Despawn_OlMahumSupportTroop();
      QuestTimer timer = st.getQuestTimer("Wait1");
      if(timer != null)
      {
        timer.cancel();
      }
      return null;
    }
    return htmltext;
  }
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

  {
    if(L2ObjectsStorage.getNpc(st2.getInt("Archon")) != null)
    {
      return;
    } // Не убили, или убили чужого
    QuestTimer qt = st2.getQuestTimer("Archon Hellisha has despawned");
    if(qt != null)
    {
      qt.cancel();
    }
    if(st2.getQuestItemsCount(Items[3]) < 700)
    {
      st2.giveItems(Items[3], 1);
    }
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

      L2NpcInstance Mob_2 = FindMySpawn(player, NPC[4]);
      if(Mob_2 != null)
      {
        AutoChat(Mob_2, Text[13].replace("PLAYERNAME", player.getName()));
        DeleteMySpawn(player, NPC[4]);
        QuestTimer qt = st.getQuestTimer("Mob_2 has despawned");
        if(qt != null)
        {
          qt.cancel();
        }
        qt = st.getQuestTimer("NPC_4 Timer");
        if(qt != null)
        {
          qt.cancel();
        }
      }
      return null;
    }
    else if(event.equalsIgnoreCase("5-1"))
    {
      st.set("cond", "6");
      st.takeItems(Items[4], 1);
      Cast(st.findTemplate(NPC[5]), player, 4546, 1);
      st.playSound(SOUND_MIDDLE);
      htmltext = "5-02.htm";
    }
    else if(event.equalsIgnoreCase("6-1"))
    {
      st.set("cond", "8");
      st.takeItems(Items[5], 1);
      Cast(st.findTemplate(NPC[6]), player, 4546, 1);
      st.playSound(SOUND_MIDDLE);
      htmltext = "6-03.htm";
    }
    else if(event.equalsIgnoreCase("7-1"))
    {
      if(FindMySpawn(player, Mob[0]) == null)
      {
        L2NpcInstance Mob_1 = spawn(Mob[0], new Location(X[0], Y[0], Z[0]));
        AddSpawn(player, Mob_1, 180000);
        startQuestTimer("Mob_0 Timer", 500L, Mob_1, player);
        startQuestTimer("Mob_1 has despawned", 120000L, Mob_1, player);
        htmltext = "7-02.htm";
      }
      else
      {
        htmltext = "7-03.htm";
      }
    }
    else if(event.equalsIgnoreCase("7-2"))
    {
      st.set("cond", "10");
      st.takeItems(Items[6], 1);
      Cast(st.findTemplate(NPC[7]), player, 4546, 1);
      st.playSound(SOUND_MIDDLE);
      htmltext = "7-06.htm";
    }
    else if(event.equalsIgnoreCase("8-1"))
    {
      st.set("cond", "14");
      st.takeItems(Items[7], 1);
      Cast(st.findTemplate(NPC[8]), player, 4546, 1);
      st.playSound(SOUND_MIDDLE);
      htmltext = "8-02.htm";
    }
    else if(event.equalsIgnoreCase("9-1"))
    {
      st.set("cond", "17");
      st.takeItems(Items[8], 1);
      Cast(st.findTemplate(NPC[9]), player, 4546, 1);
      st.playSound(SOUND_MIDDLE);
      htmltext = "9-03.htm";
    }
    else if(event.equalsIgnoreCase("10-1"))
    {
      if(st.getInt("Quest0") == 0 || FindMySpawn(player, NPC[4]) == null)
      {
        DeleteMySpawn(player, NPC[4]);
        DeleteMySpawn(player, Mob[2]);
        st.set("Quest0", "1");
        st.set("Quest1", "45");
        L2NpcInstance NPC_4 = spawn(NPC[4], new Location(X[2], Y[2], Z[2]));
        L2NpcInstance Mob_2 = spawn(Mob[2], new Location(X[1], Y[1], Z[1]));
        AddSpawn(player, Mob_2, 300000);
        AddSpawn(player, NPC_4, 300000);
        startQuestTimer("Mob_2 Timer", 1000, Mob_2, player);
        startQuestTimer("Mob_2 despawn", 59000, Mob_2, player);
        startQuestTimer("NPC_4 Timer", 500, NPC_4, player);
        startQuestTimer("NPC_4 despawn", 60000, NPC_4, player);
        htmltext = "10-02.htm";
      }
      else if(st.getInt("Quest1") == 45)
      {
        htmltext = "10-03.htm";
      }
      else if(st.getInt("Tab") == 1)
      {
        L2NpcInstance Mob_2 = FindMySpawn(player, NPC[4]);
        if(Mob_2 == null || !st.getPlayer().knowsObject(Mob_2))
        {
          DeleteMySpawn(player, NPC[4]);
          Mob_2 = spawn(NPC[4], new Location(X[2], Y[2], Z[2]));
          AddSpawn(player, Mob_2, 300000);
          st.set("Quest0", "1");
          st.set("Quest1", "0"); // На всякий случай
          QuestTimer qt = st.getQuestTimer("NPC_4 despawn");
          if(qt != null)
          {
            qt.cancel();
          }
          startQuestTimer("NPC_4 despawn", 180000, Mob_2, player);
        }
        htmltext = "10-04.htm";
      }
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

          {
            st.set("Quest0", "1");
            AutoChat(npc, Text[17].replace("PLAYERNAME", player.getName()));
            npc.reduceCurrentHp(9999999, npc, null, true, true, false, false);
            DeleteMySpawn(player, Mob[2]);
            QuestTimer qt = st.getQuestTimer("Mob_2 despawn");
            if(qt != null)
            {
              qt.cancel();
            }
            st.set("Tab", "1");
          }
        }
      }
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestTimer

              st.giveItems(Items[6], 1);
              st.set("cond", "9");
              st.playSound(SOUND_MIDDLE);
            }
          }
          QuestTimer qt = st.getQuestTimer("Mob_1 has despawned");
          if(qt != null)
          {
            qt.cancel();
          }
          DeleteMySpawn(st2.getPlayer(), Mob[0]);
        }
      }
      else if(npcId == Mob[1] && cond == 15)
      {
        QuestState st2 = findRightState(player, npc);
        if(st2 != null)
        {
          if(!player.isInParty())
          {
            if(st == st2)
            {
              AutoChat(npc, Text[4].replace("PLAYERNAME", player.getName()));
              process_step_15to16(st);
            }
            else
            {
              AutoChat(npc, Text[5].replace("PLAYERNAME", player.getName()));
            }
          }
          QuestTimer qt = st.getQuestTimer("Archon Hellisha has despawned");
          if(qt != null)
          {
            qt.cancel();
          }
          DeleteMySpawn(st2.getPlayer(), Mob[1]);
        }
      }
      else if(npcId == Mob[2] && cond == 17)
      {
        QuestState st2 = findRightState(player, npc);
        if(st == st2)
        {
          st.set("Quest0", "1");
          AutoChat(npc, Text[17].replace("PLAYERNAME", player.getName()));
          npc.reduceCurrentHp(9999999, npc, null, true, true, false, false);
          DeleteMySpawn(player, Mob[2]);
          QuestTimer qt = st.getQuestTimer("Mob_2 despawn");
          if(qt != null)
          {
            qt.cancel();
          }
          st.set("Tab", "1");
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.