Package net.sf.l2j.gameserver.model.quest

Examples of net.sf.l2j.gameserver.model.quest.Quest$DeSpawnScheduleTimerTask


     */
    public void showQuestWindow(L2PcInstance player, String questId)
    {
        String content;
       
        Quest q = QuestManager.getInstance().getQuest(questId);

        if (player.getWeightPenalty()>=3 && q.getQuestIntId() >= 1 && q.getQuestIntId() < 1000 ){ 
            player.sendPacket(new SystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT));
            return;
        }
       
        //FileInputStream fis = null;
       
        // Get the state of the selected quest
        QuestState qs = player.getQuestState(questId);
       
        if (qs != null)
        {
            // If the quest is alreday started, no need to show a window
            if (!qs.getQuest().notifyTalk(this, qs))
                return;
        }
        else
        {
            if (q != null)
            {
                // check for start point
                Quest[] qlst = getTemplate().getEventQuests(Quest.QuestEventType.QUEST_START);
               
                if (qlst != null && qlst.length > 0)
                {
                    for (int i=0; i < qlst.length; i++)
                    {
                        if (qlst[i] == q)
                        {
                            qs = q.newQuestState(player);
                            //disabled by mr. becouse quest dialog only show on second click.
                            //if(qs.getState().getName().equalsIgnoreCase("completed"))
                            //{
                            if (!qs.getQuest().notifyTalk(this, qs))
                                return; // no need to show a window
View Full Code Here


    // =========================================================
    // Method - Public
    public final boolean reload(String questFolder)
    {
      Quest q = getQuest(questFolder);
      String path = "";
      if (q!=null)
      {
        q.saveGlobalData();
        path = q.getPrefixPath();
      }
      return QuestJython.reloadQuest(path+questFolder);
    }
View Full Code Here

     * @param questId The id of the quest to be reloaded
     * @return true if reload was succesful, false otherwise
     */
    public final boolean reload(int questId)
    {
      Quest q = this.getQuest(questId);
      if (q == null)
      {
        return false;
      }
      q.saveGlobalData();
      return QuestJython.reloadQuest(q.getPrefixPath()+q.getName());
    }
View Full Code Here

  {
    L2PcInstance activeChar = getClient().getActiveChar();
    if (activeChar == null)
        return;

        Quest 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();
                activeChar.sendPacket(ql);
            } else
            {
                if (Config.DEBUG) _log.info("Player '"+activeChar.getName()+"' try to abort quest "+qe.getName()+" but he didn't have it started.");
            }
        } else
        {
            if (Config.DEBUG) _log.warning("Quest (id='"+_questId+"') not found.");
        }
View Full Code Here

    {
      return retval;
    }
    if (qs == null)
    {
      Quest q = QuestManager.getInstance().getQuest(quest);
      if (q == null)
      {
        return retval;
      }
      qs = q.newQuestState(this);
    }
    if (qs != null)
    {
      if (getLastQuestNpcObject() > 0)
      {
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.quest.Quest$DeSpawnScheduleTimerTask

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.