Examples of QuestState


Examples of com.l2jfrozen.gameserver.model.quest.QuestState

    L2PcInstance player = getClient().getActiveChar();

    if(player == null)
      return;

    QuestState qs = player.getQuestState("255_Tutorial");
    if(qs != null)
    {
      qs.getQuest().notifyEvent("CE" + eventId + "", null, player);
    }
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.quest.QuestState

    L2PcInstance player = getClient().getActiveChar();

    if(player == null)
      return;

    QuestState qs = player.getQuestState("255_Tutorial");
    if(qs != null)
    {
      qs.getQuest().notifyEvent(_bypass, null, player);
    }
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.quest.QuestState

    checkAllowedSkills();

    sendPacket(new EtcStatusUpdate(this));

    //if player has quest 422: Repent Your Sins, remove it
    QuestState st = getQuestState("422_RepentYourSins");

    if(st != null)
    {
      st.exitQuest(true);
      st = null;
    }

    for(int i = 0; i < 3; i++)
    {
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.quest.QuestState

           * If they both exist, remove both unique items and continue with adding the sub-class.
           */
          if(!Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS)
          {

            QuestState qs = player.getQuestState("235_MimirsElixir");
            if(qs == null || !qs.isCompleted())
            {
              player.sendMessage("You must have completed the Mimir's Elixir quest to continue adding your sub class.");
              player.setLocked(false);
              return;
            }
            qs = player.getQuestState("234_FatesWhisper");

            if(qs == null || !qs.isCompleted())
            {
              player.sendMessage("You must have completed the Fate's Whisper quest to continue adding your sub class.");
              player.setLocked(false);
              return;
            }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.quest.QuestState

   * @param event the event
   * @return the quest state
   */
  public QuestState processQuestEvent(String quest, String event)
  {
    QuestState retval = null;
    if(event == null)
    {
      event = "";
    }

    if(!_quests.containsKey(quest))
      return retval;

    QuestState qs = getQuestState(quest);
    if(qs == null && event.length() == 0)
      return retval;

    if(qs == null)
    {
      Quest q = null;
      if(!Config.ALT_DEV_NO_QUESTS)
        q = QuestManager.getInstance().getQuest(quest);
     
      if(q == null)
        return retval;
      qs = q.newQuestState(this);
    }
    if(qs != null)
    {
      if(getLastQuestNpcObject() > 0)
      {
        L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
        if(object instanceof L2NpcInstance && isInsideRadius(object, L2NpcInstance.INTERACTION_DISTANCE, false, false))
        {
          L2NpcInstance npc = (L2NpcInstance) object;
          QuestState[] states = getQuestsForTalk(npc.getNpcId());

          if(states != null)
          {
            for(QuestState state : states)
            {
              if(state.getQuest().getQuestIntId() == qs.getQuest().getQuestIntId() && !qs.isCompleted())
              {
                if(qs.getQuest().notifyEvent(event, npc, this))
                {
                  showQuestWindow(quest, qs.getStateId());
                }

                retval = qs;
              }
            }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.quest.QuestState

    writeC(0x80);
    writeH(_quests.length);
    for(Quest q : _quests)
    {
      writeD(q.getQuestIntId());
      QuestState qs = _activeChar.getQuestState(q.getName());
      if(qs == null)
      {
        writeD(0);
        continue;
      }

      int states = qs.getInt("__compltdStateFlags");
      if(states != 0)
      {
        writeD(states);
      }
      else
      {
        writeD(qs.getInt("cond"));
      }
    }
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.quest.QuestState

    for(Quest q : questList)
    {
      writeD(q.getQuestIntId());

      QuestState qs = _activeChar.getQuestState(q.getName());

      if(qs == null)
      {
        writeD(0);
        continue;
      }

      writeD(qs.getInt("cond")); // stage of quest progress
    }
  }
View Full Code Here

Examples of l2p.gameserver.model.quest.QuestState

      showHtmlFile(player, npcId + "-NL.htm", npc, null);
      return;
    }
    for(L2Player mem : player.getParty().getPartyMembers())
    {
      QuestState qs = mem.getQuestState(QUEST_ID);
      if(qs == null || !qs.isStarted() && !qs.isCompleted())
      {
        showHtmlFile(player, npcId + "-NS.htm", npc, mem);
        return;
      }
      if(mem.getInventory().getItemByItemId(ENTRANCE_PASS) == null)
View Full Code Here

Examples of lineage2.gameserver.model.quest.QuestState

    {
      htmltext = "32640-10.htm";
    }
    else if (id == CREATED)
    {
      QuestState ImTheOnlyOneYouCanTrust = st.getPlayer().getQuestState(_240_ImTheOnlyOneYouCanTrust.class);
      if ((st.getPlayer().getLevel() >= 81) && (ImTheOnlyOneYouCanTrust != null) && ImTheOnlyOneYouCanTrust.isCompleted())
      {
        htmltext = "32640-1.htm";
      }
      else
      {
View Full Code Here

Examples of lineage2.gameserver.model.quest.QuestState

      {
        return;
      }
      Player player = cha.getPlayer();
     
      QuestState qs = player.getQuestState(_10301_ShadowOfTerrorBlackishRedFog.class);
      if(qs != null && qs.getCond() == 3 && player.getVar("instance10301") == null)
      {
        Quest q = QuestManager.getQuest(10301);
        player.processQuestEvent(q.getName(), "enterInstance", null);
        //player.setVar("instance10301", "true", -1);
        return;
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.