Package l2p.gameserver.model.quest

Examples of l2p.gameserver.model.quest.QuestState


  }

  @Override
  public String onKill(L2NpcInstance npc, QuestState st)
  {
    QuestState id = null;
    L2Clan clan = st.getPlayer().getClan();
    if(clan == null)
    {
      return null;
    }
View Full Code Here


            L2Party party = st.getPlayer().getParty();
            if(party != null)
            {
              for(L2Player member : party.getPartyMembers())
              {
                QuestState qs = member.getQuestState(getClass());
                if(qs != null && qs.isStarted())
                {
                  qs.giveItems(DungeonLeaderMark, RewardMarksCount / party.getMemberCount());
                  qs.playSound(SOUND_ITEMGET);
                  qs.getPlayer().sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(5));
                }
              }
            }
            else
            {
View Full Code Here

  {
    if(!checkPlayers(pkilled, pkiller))
    {
      return;
    }
    QuestState st = pkiller.getQuestState(q.getClass());
    if(st == null)
    {
      st = q.newQuestState(pkiller, Quest.CREATED);
    }
    if(st.getState() == CREATED || st.getState() == COMPLETED && st.getInt("doneDate") != Calendar.getInstance().get(Calendar.DAY_OF_YEAR))
    {
      st.setState(STARTED);
      st.setCond(1);
      st.set("max", Rnd.get(RANDOM_MIN, RANDOM_MAX));
      st.set("kill", 0);
      st.addNotifyOfPlayerKill();
    }
  }
View Full Code Here

          htmltext = "fisher_ofulle_q0028_0101.htm";
          st.exitCurrentQuest(true);
        }
        else
        {
          QuestState OFullesSpecialBait = st.getPlayer().getQuestState(_051_OFullesSpecialBait.class);
          if(OFullesSpecialBait != null)
          {
            if(OFullesSpecialBait.isCompleted())
            {
              htmltext = "fisher_ofulle_q0028_0101.htm";
            }
            else
            {
View Full Code Here

            L2Party party = st.getPlayer().getParty();
            if(party != null)
            {
              for(L2Player member : party.getPartyMembers())
              {
                QuestState qs = member.getQuestState(getClass());
                if(qs != null && qs.isStarted())
                {
                  qs.giveItems(FragmentOfTheDungeonLeaderMark, RewardMarksCount / party.getMemberCount());
                  qs.playSound(SOUND_ITEMGET);
                  qs.getPlayer().sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(5));
                }
              }
            }
            else
            {
View Full Code Here

        {
          st.takeItems(take, 1);
        }
        if(BLOODED_FABRIC == item && st.getQuestItemsCount(BLOODED_FABRIC) >= 30)
        {
          QuestState FatesWhisper = st.getPlayer().getQuestState(_234_FatesWhisper.class);
          if(FatesWhisper != null && FatesWhisper.getCond() == 8)
          {
            FatesWhisper.set("cond", 9);
          }
        }
      }
    }
    if(npcId == ANGEL_KILLER)
View Full Code Here

  {
    String htmltext = "noquest";
    int cond = st.getInt("cond");
    if(cond == 0)
    {
      QuestState qs = st.getPlayer().getQuestState(_126_IntheNameofEvilPart2.class);
      if(qs == null || !qs.isCompleted())
      {
        htmltext = "statue_of_shilen_q0641_02.htm";
      }
      else if(st.getPlayer().getLevel() >= 77)
      {
View Full Code Here

  }

  @Override
  public String onFirstTalk(L2NpcInstance npc, L2Player player)
  {
    QuestState qs1 = player.getQuestState(_186_ContractExecution.class);
    QuestState qs2 = player.getQuestState(_187_NikolasHeart.class);
    if((qs1 != null && qs1.isCompleted() || qs2 != null && qs2.isCompleted()) && player.getQuestState(getClass()) == null)
    {
      newQuestState(player, STARTED);
    }
    return "";
  }
View Full Code Here

  @Override
  public String onEvent(String event, QuestState st, L2NpcInstance npc)
  {
    String htmltext = event;
    L2Player player = st.getPlayer();
    QuestState qs = player.getQuestState(_10273_GoodDayToFly.class);
    if(qs == null || qs.getState() != COMPLETED)
    {
      player.sendPacket(new RadarControl(2, 2, 0, 0, 0));
      player.sendPacket(new RadarControl(0, 2, -184545, 243120, 1581));
      htmltext = "32627.htm";
    }
View Full Code Here

  }

  @Override
  public String onFirstTalk(L2NpcInstance npc, L2Player player)
  {
    QuestState qs = player.getQuestState(getClass());
    if(qs == null)
    {
      newQuestState(player, STARTED);
    }
    return "";
View Full Code Here

TOP

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

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.