Package l2p.gameserver.model.quest

Examples of l2p.gameserver.model.quest.QuestState


                qty = TEMPERATURE[i][2];
              }
            }
            if(item == MIMIRS_ELIXIR)
            {
              QuestState mimirs = st.getPlayer().getQuestState(_235_MimirsElixir.class);
              if(mimirs != null)
              {
                chance = 100;
                qty = 1;
                mimirs.set("cond", "8");
              }
              else
              {
                return "31149-7d.htm";
              }
View Full Code Here


    if(npcId == KANIS)
    {
      if(cond == 0)
      {
        //_131_BirdInACage
        QuestState BirdInCage = st.getPlayer().getQuestState(_131_BirdInACage.class);
        if(BirdInCage != null)
        {
          if(BirdInCage.isCompleted())
          {
            if(st.getPlayer().getLevel() >= 78)
            {
              htmltext = "priest_kanis_q0133_01.htm";
            }
View Full Code Here

  }

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

    int npcId = npc.getNpcId();
    int cond = st.getCond();
    L2Player player = st.getPlayer();
    if(npcId == ARTIUS)
    {
      QuestState qs = player.getQuestState(_10273_GoodDayToFly.class);
      if((qs != null) && (qs.getState() == 2) && (st.getState() == 0) && (player.getLevel() >= 78))
      {
        htmltext = "32559-01.htm";
      }
      else if(cond == 1)
      {
View Full Code Here

  {
    String htmltext = "noquest";
    int npcId = npc.getNpcId();
    //int id = st.getState();
    int cond = st.getInt("cond");
    QuestState InSearchOfTheNest = st.getPlayer().getQuestState(_109_InSearchOfTheNest.class);
    if(npcId == KAHMAN)
    {
      if(cond == 0)
      {
        if(st.getPlayer().getLevel() >= 66)
        {
          if(InSearchOfTheNest != null && InSearchOfTheNest.isCompleted())
          {
            htmltext = "merc_kahmun_q0640_0101.htm";
          }
          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

    L2Player player = qs.getRandomPartyMember(STARTED, Config.ALT_PARTY_DISTRIBUTION_RANGE);
    if(player == null)
    {
      return null;
    }
    QuestState st = player.getQuestState(qs.getQuest().getName());
    Integer _chance = common_chances.get(npc.getNpcId());
    if(_chance == null)
    {
      return null;
    }
    if(Rnd.chance(_chance))
    {
      st.giveItems(Rnd.chance(Urn_Chance) ? Ancient_Ash_Urn : Ancient_Porcelain, 1);
      st.playSound(SOUND_ITEMGET);
    }
    return null;
  }
View Full Code Here

  }

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

    }
    if(player.getDistance(leader) > Config.ALT_PARTY_DISTRIBUTION_RANGE)
    {
      return;
    }
    QuestState qs = leader.getQuestState(getClass());
    if(qs == null)
    {
      return;
    }
    long count = qs.getQuestItemsCount(item);
    if(count < maxcount)
    {
      qs.giveItems(item, 1);
      if(count == maxcount - 1)
      {
        qs.playSound(SOUND_MIDDLE);
      }
      else
      {
        qs.playSound(SOUND_ITEMGET);
      }
    }
  }
View Full Code Here

      {
        if(player == null)
        {
          continue;
        }
        QuestState qs = player.getQuestState(getName());
        if(qs != null)
        {
          qs.exitCurrentQuest(true);
        }
      }
      offlineMemberExit(st);
    }
    catch(Exception e)
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.