Где поменять?

  • Автор темы Автор темы Emphatic
  • Дата начала Дата начала

Emphatic

Выдающийся
Участник
Сообщения
144
Розыгрыши
0
Решения
1
Репутация
5
Реакции
56
Баллы
1 313
Где меняется значение к примеру мне надо сделать 0/4?
1.webp
 
В самом квесте
 
Текстом под спойлер и code
 
Код:
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10323_TrainLikeItsReal;

import java.util.HashSet;
import java.util.Set;

import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;

import quests.Q10322_SearchingForTheMysteriousPower.Q10322_SearchingForTheMysteriousPower;

/**
* @author Sdw, Gladicek, gyo
*/
public class Q10323_TrainLikeItsReal extends Quest
{
    // NPC's
    private static final int EVAIN = 33464;
    private static final int HOLDEN = 33194;
    private static final int SHANNON = 32974;
    // Mobs
    private static final int TRAINING_GOLEM = 27532;
    // Misc
    private static final int TRAINING_GOLEM_REQUIRED = 4;
    private static final int MAX_LEVEL = 20;
    // Items
    private static final ItemHolder SPIRITSHOTS = new ItemHolder(2509, 500);
    private static final ItemHolder SOULSHOTS = new ItemHolder(1835, 500);
   
    public Q10323_TrainLikeItsReal()
    {
        super(10323, Q10323_TrainLikeItsReal.class.getSimpleName(), "Train Like It's Real");
        addStartNpc(EVAIN);
        addTalkId(EVAIN, HOLDEN, SHANNON);
        addKillId(TRAINING_GOLEM);
        addCondMaxLevel(MAX_LEVEL, "33464-07.html");
        addCondCompletedQuest(Q10322_SearchingForTheMysteriousPower.class.getSimpleName(), "33464-07.html");
    }
   
    @Override
    public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
    {
        final QuestState qs = getQuestState(player, false);
        if (qs == null)
        {
            return null;
        }
       
        String htmltext = null;
       
        switch (event)
        {
            case "33464-02.htm":
            case "33194-02.html":
            {
                htmltext = event;
                break;
            }
            case "showscreen_spiritshot":
            {
                showOnScreenMsg(player, NpcStringId.AUTOMATE_SPIRITSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500);
                break;
            }
            case "showscreen_soulshot":
            {
                showOnScreenMsg(player, NpcStringId.AUTOMATE_SOULSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500);
                break;
            }
            case "33464-03.htm":
            {
                qs.startQuest();
                htmltext = event;
                break;
            }
            case "33194-03.html":
            {
                if (qs.isCond(1))
                {
                    // show NpcLog dialog trick
                    qs.setCond(3);
                    qs.setCond(2, true);
                    htmltext = event;
                }
                break;
            }
            case "33194-07.html":
            {
                if (qs.isCond(3))
                {
                    qs.setMemoState(0);
                    giveItems(player, SOULSHOTS);
                    showOnScreenMsg(player, NpcStringId.SOULSHOT_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
                    startQuestTimer("showscreen_soulshot", 4500, npc, player);
                    player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_003_bullet_01.htm", TutorialShowHtml.LARGE_WINDOW));
                    qs.setCond(4, true);
                    htmltext = event;
                }
                break;
            }
            case "33194-08.html":
            {
                if (qs.isCond(3))
                {
                    qs.setMemoState(0);
                    giveItems(player, SPIRITSHOTS);
                    showOnScreenMsg(player, NpcStringId.SPIRITSHOT_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
                    startQuestTimer("showscreen_spiritshot", 4500, npc, player);
                    player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_003_bullet_01.htm", TutorialShowHtml.LARGE_WINDOW));
                    qs.setCond(5, true);
                    htmltext = event;
                }
                break;
            }
            case "33194-14.html":
            {
                if (qs.isCond(8))
                {
                    qs.setCond(9, true);
                    htmltext = event;
                }
                break;
            }
            case "32974-02.html":
            {
                if (qs.isCond(9))
                {
                    addExpAndSp(player, 1700, 5);
                    giveAdena(player, 900, true);
                    qs.exitQuest(false, true);
                    htmltext = event;
                }
                break;
            }
        }
       
        return htmltext;
    }
   
    @Override
    public String onTalk(L2Npc npc, L2PcInstance player)
    {
        final QuestState qs = getQuestState(player, true);
        String htmltext = null;
       
        switch (qs.getState())
        {
            case State.CREATED:
            {
                switch (npc.getId())
                {
                    case EVAIN:
                    {
                        htmltext = "33464-01.htm";
                        break;
                    }
                    case SHANNON:
                    {
                        htmltext = "32974-03.html";
                        break;
                    }
                    case HOLDEN:
                    {
                        htmltext = getNoQuestMsg(player);
                        break;
                    }
                }
                break;
            }
            case State.STARTED:
            {
                if (npc.getId() == EVAIN)
                {
                    switch (qs.getCond())
                    {
                        case 1:
                        {
                            htmltext = "33464-04.html";
                            break;
                        }
                        case 9:
                        {
                            htmltext = "33464-05.html";
                            break;
                        }
                        default:
                        {
                            htmltext = getNoQuestMsg(player);
                            break;
                        }
                    }
                    break;
                }
                else if (npc.getId() == HOLDEN)
                {
                    switch (qs.getCond())
                    {
                        case 1:
                        {
                            htmltext = "33194-01.html";
                            break;
                        }
                        case 2:
                        {
                            htmltext = "33194-04.html";
                            break;
                        }
                        case 3:
                        {
                            // Orc Mystic will get Soulshots
                            if (!player.isMageClass() || (player.getRace() == Race.ORC))
                            {
                                htmltext = "33194-05.html";
                            }
                            else
                            {
                                htmltext = "33194-06.html";
                            }
                            break;
                        }
                        case 4:
                        {
                            htmltext = "33194-09.html";
                            qs.setCond(6, true);
                            break;
                        }
                        case 5:
                        {
                            htmltext = "33194-10.html";
                            qs.setCond(7, true);
                            break;
                        }
                        case 6:
                        {
                            htmltext = "33194-11.html";
                            break;
                        }
                        case 7:
                        {
                            // same text as 33194-10.html
                            htmltext = "33194-12.html";
                            break;
                        }
                        case 8:
                        {
                            htmltext = "33194-13.html";
                            break;
                        }
                        case 9:
                        {
                            htmltext = "33194-15.html";
                            break;
                        }
                    }
                    break;
                }
                else if (npc.getId() == SHANNON)
                {
                    if (qs.isCond(9))
                    {
                        htmltext = "32974-01.html";
                    }
                    break;
                }
            }
            case State.COMPLETED:
            {
                switch (npc.getId())
                {
                    case EVAIN:
                    {
                        htmltext = "33464-06.html";
                        break;
                    }
                    case SHANNON:
                    {
                        htmltext = "32974-05.html";
                        break;
                    }
                    case HOLDEN:
                    {
                        htmltext = getNoQuestMsg(player);
                        break;
                    }
                }
                break;
            }
        }
        return htmltext;
    }
   
    @Override
    public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
    {
        final QuestState qs = getQuestState(killer, false);
       
        if ((qs != null) && qs.isStarted())
        {
            int killedGolem = qs.getMemoState();
           
            if (qs.isCond(2))
            {
                killedGolem++;
                sendNpcLogList(killer);
               
                if (killedGolem >= TRAINING_GOLEM_REQUIRED)
                {
                    qs.setCond(3, true);
                }
                else
                {
                    qs.setMemoState(killedGolem);
                    playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
                }
            }
            else if (qs.isCond(6) || qs.isCond(7))
            {
                killedGolem++;
                sendNpcLogList(killer);
               
                if (killedGolem >= TRAINING_GOLEM_REQUIRED)
                {
                    qs.setCond(8, true);
                }
                else
                {
                    qs.setMemoState(killedGolem);
                    playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
                }
            }
        }
        return super.onKill(npc, killer, isSummon);
    }
   
    @Override
    public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
    {
        final QuestState qs = getQuestState(activeChar, false);
        final Set<NpcLogListHolder> npcLogList = new HashSet<>(1);
       
        if ((qs != null) && qs.isCond(2))
        {
            npcLogList.add(new NpcLogListHolder(NpcStringId.ELIMINATE_THE_TRAINING_GOLEM, qs.getMemoState()));
            return npcLogList;
        }
        else if ((qs != null) && (qs.isCond(6) || qs.isCond(7)))
        {
            npcLogList.add(new NpcLogListHolder(NpcStringId.ELIMINATE_THE_TRAINING_GOLEM2, qs.getMemoState()));
            return npcLogList;
        }
        return super.getNpcLogList(activeChar);
    }
}
 
Файлы клиента тогда
 
Это значение в клиенте 100%.
Но точно не в questname.
 
questname-*.dat
Столбцы:
cnt1 - количество предметов, необходимых для квеста.
items[х] - ID предметов.
cnt2 - количество "количеств" предметов, необходимых для квеста.
num_items[х] - само количество.
Поясню на примере:
Код:
cnt1    items[0]    cnt2    num_items[0]
1       4037        1       1000
При такой записи нам для квеста понадобится 1000 Coin of Luck (id 4037).
Код:
cnt1    items[0]    items[1]    cnt2    num_items[0]    num_items[1]
2       4037        57          2       1000            1000000
При такой записи нужно 1000 Coin of Luck (id 4037) и 1000000 Aden (id 57).
 
Назад
Сверху Снизу