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("QM" + _number + "", null, player);
    }
  }
View Full Code Here

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

    if(!Config.ALT_DEV_NO_QUESTS)
      qe = QuestManager.getInstance().getQuest(_questId);
   
    if(qe != null)
    {
      QuestState qs = activeChar.getQuestState(qe.getName());
      if(qs != null)
      {
        qs.exitQuest(true);
        SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
        sm.addString("Quest aborted.");
        activeChar.sendPacket(sm);
        sm = null;
        QuestList ql = new QuestList();
View Full Code Here

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

    }
  }

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

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

      _log.fine("DEBUG "+getType()+": Character init end");
  }

  public void startTutorialQuest(L2PcInstance player)
  {
    QuestState qs = player.getQuestState("255_Tutorial");
    Quest q = null;

    if(qs == null && !Config.ALT_DEV_NO_QUESTS){
      q = QuestManager.getInstance().getQuest("255_Tutorial");
    }
View Full Code Here

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

       
      }
     
    }else{
     
      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

    if(player.getParty() != null)
    {
      for(L2PcInstance mem : player.getParty().getPartyMembers())
      {
        QuestState qs = mem.getQuestState(questId);
        if(qs != null && (qs.isStarted() || qs.isCompleted()) && mem.getInventory().getItemByItemId(oldBrooch) == null)
        {
          mem.addItem("Quest", cupId, 1, mem, true);
        }
      }
    }
    else
    {
      QuestState qs = player.getQuestState(questId);
      if(qs != null && (qs.isStarted() || qs.isCompleted()) && player.getInventory().getItemByItemId(oldBrooch) == null)
      {
        player.addItem("Quest", cupId, 1, player, true);
      }
    }
  }
View Full Code Here

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

        continue;
      }
     
      sb.append("<a action=\"bypass -h npc_").append(getObjectId()).append("_Quest ").append(q.getName()).append("\">[");
   
      final QuestState qs = player.getQuestState(q.getScriptName());
     
      if ((qs == null)
        || qs.getState().equals(State.ACTIVE))
      {
        state = "";
       
      }
      else if (qs.isStarted() && (qs.getInt("cond") > 0))
      {
        state =" (In Progress)";
       
      }
      else if (qs.isCompleted())
      {
        state =" (Done)";
      }
     
      sb.append(q.getDescr()).append(state).append("]</a><br>");
View Full Code Here

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

    Quest q = null;
    if (!Config.ALT_DEV_NO_QUESTS)
      q = QuestManager.getInstance().getQuest(questId);
   
    // Get the state of the selected quest
    QuestState qs = player.getQuestState(questId);
   
    if (q == null)
    {
      // No quests found
      content = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>";
    }
    else
    {
      if (player.getWeightPenalty() >= 3 && q.getQuestIntId() >= 1 && q.getQuestIntId() < 1000)
      {
        player.sendPacket(new SystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT));
        return;
      }
     
      if (qs == null)
      {
        if (q.getQuestIntId() >= 1 && q.getQuestIntId() < 20000)
        {
          Quest[] questList = player.getAllActiveQuests();
          if (questList.length >= 25) // if too many ongoing quests, don't show window and send message
          {
            player.sendMessage("You have too many quests, cannot register");
            return;
          }
        }
        // Check for start point
        for (Quest temp : getTemplate().getEventQuests(Quest.QuestEventType.QUEST_START))
        {
          if (temp == q)
          {
            qs = q.newQuestState(player);
            break;
          }
        }
      }
    }
   
    if (qs != null)
    {
      // If the quest is already started, no need to show a window
      if (!qs.getQuest().notifyTalk(this, qs))
        return;
     
      questId = qs.getQuest().getName();
      String stateId = qs.getStateId();
      String path = Config.DATAPACK_ROOT + "/data/scripts/quests/" + questId + "/" + stateId + ".htm";
      content = HtmCache.getInstance().getHtm(path);
     
      if (Config.DEBUG)
      {
View Full Code Here

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

        return;
      }

      for(L2PcInstance 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)
        {
          showHtmlFile(player, npcId + "-SE.htm", npc, mem);
          return;
        }

        if(mem.getWeightPenalty() >= 3)
        {
          mem.sendPacket(new SystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT));
          return;
        }
      }
    }
    else if(Config.FS_PARTY_MEMBER_COUNT <= 1 && player.isInParty())
    {
      if(!player.getParty().isLeader(player))
      {
        showHtmlFile(player, npcId + "-NL.htm", npc, null);
        return;
      }
      for(L2PcInstance 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)
        {
          showHtmlFile(player, npcId + "-SE.htm", npc, mem);
          return;
        }

        if(mem.getWeightPenalty() >= 3)
        {
          mem.sendPacket(new SystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT));
          return;
        }
      }
    }
    else
    {
      QuestState qs = player.getQuestState(QUEST_ID);
      if(qs == null || !qs.isStarted() && !qs.isCompleted())
      {
        showHtmlFile(player, npcId + "-NS.htm", npc, player);
        return;
      }
View Full Code Here

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

        {
          _log.info("Newbie character ended: " + getActiveChar().getCharId());
        }
      }

      QuestState qs = getActiveChar().getQuestState("255_Tutorial");

      if(qs != null && qs.getQuest() != null)
      {
        qs.getQuest().notifyEvent("CE40", null, getActiveChar());
      }

      getActiveChar().setCurrentCp(getMaxCp());
      getActiveChar().broadcastPacket(new SocialAction(getActiveChar().getObjectId(), 15));
      getActiveChar().sendPacket(new SystemMessage(SystemMessageId.YOU_INCREASED_YOUR_LEVEL));
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.