Package l2p.gameserver.model.quest

Examples of l2p.gameserver.model.quest.Quest


      }
      else
      {
        player.sendPacket(Msg.CONGRATULATIONS_YOUR_RAID_WAS_SUCCESSFUL);
      }
      Quest q = QuestManager.getQuest(508);
      if(q != null)
      {
        String qn = q.getName();
        if(player.getClan() != null && player.getClan().getLeader().isOnline() && player.getClan().getLeader().getPlayer().getQuestState(qn) != null)
        {
          QuestState st = player.getClan().getLeader().getPlayer().getQuestState(qn);
          st.getQuest().onKill(this, st);
        }
View Full Code Here


  }

  @Override
  protected boolean thinkActive()
  {
    Quest q = QuestManager.getQuest(24);
    if(q != null)
    {
      for(L2Player player : L2World.getAroundPlayers(getActor(), 900, 200))
      {
        player.processQuestEvent(q.getName(), myEvent, null);
      }
    }
    return super.thinkActive();
  }
View Full Code Here

    L2Player player = (L2Player) getSelf();
    if(player == null)
    {
      return;
    }
    Quest q = QuestManager.getQuest("_234_FatesWhisper");
    QuestState qs = player.getQuestState(q.getClass());
    if(qs != null)
    {
      qs.exitCurrentQuest(true);
    }
    q.newQuestState(player, Quest.COMPLETED);
    if(player.getRace() == Race.kamael)
    {
      q = QuestManager.getQuest("_236_SeedsOfChaos");
      qs = player.getQuestState(q.getClass());
      if(qs != null)
      {
        qs.exitCurrentQuest(true);
      }
      q.newQuestState(player, Quest.COMPLETED);
    }
    else
    {
      q = QuestManager.getQuest("_235_MimirsElixir");
      qs = player.getQuestState(q.getClass());
      if(qs != null)
      {
        qs.exitCurrentQuest(true);
      }
      q.newQuestState(player, Quest.COMPLETED);
    }
  }
View Full Code Here

        if(wordList.length < 2)
        {
          activeChar.sendMessage("USAGE: //quest id|name [SHOW|STATE|VAR|CLEAR] ...");
          return true;
        }
        Quest _quest = QuestManager.getQuest2(wordList[1]);
        if(_quest == null)
        {
          activeChar.sendMessage("Quest " + wordList[1] + " undefined");
          return true;
        }
View Full Code Here

    if(targetChar == null)
    {
      activeChar.sendMessage("Player " + var[0] + " is offline now");
      return;
    }
    Quest _quest = QuestManager.getQuest2(var[1]);
    if(_quest == null)
    {
      activeChar.sendMessage("Quest " + var[1] + " undefined");
      return;
    }
    QuestState qs = targetChar.getQuestState(_quest.getName());
    if(qs == null)
    {
      activeChar.sendMessage("Player " + targetChar.getName() + " havn't Quest [" + _quest.getName() + "]");
    }
    ShowQuestState(qs, activeChar);
  }
View Full Code Here

  }

  @Override
  protected boolean thinkActive()
  {
    Quest q = QuestManager.getQuest(24);
    if(q != null)
    {
      for(L2Player player : L2World.getAroundPlayers(getActor(), 900, 200))
      {
        player.processQuestEvent(q.getName(), myEvent, null);
      }
    }
    return super.thinkActive();
  }
View Full Code Here

      st.set("cond", "2");
      st.playSound(SOUND_MIDDLE);
    }
    else if(event.equalsIgnoreCase("Contract"))
    {
      Quest q1 = QuestManager.getQuest(_184_NikolasCooperationContract.class);
      if(q1 != null)
      {
        st.giveItems(ADENA_ID, 18100);
        st.addExpAndSp(60000, 3000, true);
        QuestState qs1 = q1.newQuestState(player, STARTED);
        q1.notifyEvent("30621-01.htm", qs1, npc);
        st.playSound(SOUND_MIDDLE);
        st.exitCurrentQuest(false);
      }
      return null;
    }
    else if(event.equalsIgnoreCase("Consideration"))
    {
      Quest q2 = QuestManager.getQuest(_185_NikolasCooperationConsideration.class);
      if(q2 != null)
      {
        st.giveItems(ADENA_ID, 18100);
        QuestState qs2 = q2.newQuestState(st.getPlayer(), STARTED);
        q2.notifyEvent("30621-01.htm", qs2, npc);
        st.playSound(SOUND_MIDDLE);
        st.exitCurrentQuest(false);
      }
      return null;
    }
View Full Code Here

        {
          return false;
        }
        if(itemId == 57 || itemId == 6353)
        {
          Quest q = QuestManager.getQuest(255);
          if(q != null)
          {
            player.processQuestEvent(q.getName(), "CE" + itemId, null);
          }
        }
      }
      else if(FortressSiegeManager.isCombatFlag(itemId))
      {
View Full Code Here

                }
                if (qs.getQuest().notifyTalk(this, qs)) {
                    return;
                }
            } else {
                Quest q = QuestManager.getQuest(questId);
                if (q != null) {
                    // check for start point
                    Quest[] qlst = getTemplate().getEventQuests(QuestEventType.QUEST_START);
                    if (qlst != null && qlst.length > 0) {
                        for (Quest element : qlst) {
                            if (element == q) {
                                qs = q.newQuestState(player, Quest.CREATED);
                                if (qs.getQuest().notifyTalk(this, qs)) {
                                    return;
                                }
                                break;
                            }
View Full Code Here

    L2Player pkilled = killed.getPlayer();
    if(pkiller == null || pkilled == null)
    {
      return;
    }
    Quest q = QuestManager.getQuest(_738_DestroyKeyTargets.class);
    L2Party party = pkiller.getParty();
    if(party == null)
    {
      takeQuest(q, pkilled, pkiller);
    }
View Full Code Here

TOP

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

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.