Updated NpcStringId class.

This commit is contained in:
MobiusDevelopment
2022-12-08 07:45:23 +00:00
parent ca344b5854
commit 69178eba2d
49 changed files with 6054 additions and 4982 deletions

View File

@@ -45,7 +45,7 @@ public class PlainsOfDion extends AbstractNpcAI
NpcStringId.S1_HOW_DARE_YOU_INTERRUPT_OUR_FIGHT_HEY_GUYS_HELP,
NpcStringId.S1_HEY_WE_RE_HAVING_A_DUEL_HERE,
NpcStringId.THE_DUEL_IS_OVER_ATTACK,
NpcStringId.FOUL_KILL_THE_COWARD,
NpcStringId.KILL_THE_COWARD,
NpcStringId.HOW_DARE_YOU_INTERRUPT_A_SACRED_DUEL_YOU_MUST_BE_TAUGHT_A_LESSON
};

View File

@@ -119,7 +119,7 @@ public class EnergyOfInsolence extends AbstractNpcAI
}
case POWER_ANGEL_AMON:
{
npcStringId = spawning ? NpcStringId.I_WONDER_WHO_IT_IS_THAT_IS_LURKING_ABOUT : NpcStringId.WHY_WOULD_YOU_BUILD_A_TOWER_IN_OUR_TERRITORY;
npcStringId = spawning ? NpcStringId.I_WONDER_WHO_IT_IS_THAT_IS_LURKING_ABOUT : NpcStringId.HOW_DARE_YOU_INVADE_OUR_LAND_I_WON_T_LET_IT_PASS;
}
}
npc.broadcastSay(ChatType.NPC_SHOUT, npcStringId);

View File

@@ -161,7 +161,7 @@ public final class LimitBarrier extends AbstractNpcAI
{
if (player != null)
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.YOU_HAVE_FAILED_TO_DESTROY_THE_LIMIT_BARRIER_THE_RAID_BOSS_FULLY_RECOVERS_ITS_HEALTH, 2, 5000, true));
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.YOU_HAVE_FAILED_TO_DESTROY_THE_LIMIT_BARRIER_THE_RAID_BOSS_HAS_FULLY_RECOVERED_ITS_HEALTH, 2, 5000, true));
}
npc.setCurrentHp(npc.getStat().getMaxHp(), true);
npc.stopSkillEffects(SkillFinishType.REMOVED, LIMIT_BARRIER.getSkillId());
@@ -199,7 +199,7 @@ public final class LimitBarrier extends AbstractNpcAI
npc.abortAttack();
npc.abortCast();
npc.doCast(LIMIT_BARRIER.getSkill());
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_RAID_BOSS_USES_THE_LIMIT_BARRIER_FOCUS_YOUR_ATTACKS_TO_DESTROY_THE_LIMIT_BARRIER_IN_15_SECONDS, 2, 5000, true));
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_RAID_BOSS_USES_THE_LIMIT_BARRIER_FOCUS_YOUR_ATTACKS_TO_DESTROY_THE_BARRIER_IN_15_SEC, 2, 5000, true));
startQuestTimer("RESTORE_FULL_HP", 15000, npc, attacker);
}
}
@@ -211,7 +211,7 @@ public final class LimitBarrier extends AbstractNpcAI
npc.abortAttack();
npc.abortCast();
npc.doCast(LIMIT_BARRIER.getSkill());
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_RAID_BOSS_USES_THE_LIMIT_BARRIER_FOCUS_YOUR_ATTACKS_TO_DESTROY_THE_LIMIT_BARRIER_IN_15_SECONDS, 2, 5000, true));
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_RAID_BOSS_USES_THE_LIMIT_BARRIER_FOCUS_YOUR_ATTACKS_TO_DESTROY_THE_BARRIER_IN_15_SEC, 2, 5000, true));
startQuestTimer("RESTORE_FULL_HP", 15000, npc, attacker);
}
}
@@ -223,7 +223,7 @@ public final class LimitBarrier extends AbstractNpcAI
npc.abortAttack();
npc.abortCast();
npc.doCast(LIMIT_BARRIER.getSkill());
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_RAID_BOSS_USES_THE_LIMIT_BARRIER_FOCUS_YOUR_ATTACKS_TO_DESTROY_THE_LIMIT_BARRIER_IN_15_SECONDS, 2, 5000, true));
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_RAID_BOSS_USES_THE_LIMIT_BARRIER_FOCUS_YOUR_ATTACKS_TO_DESTROY_THE_BARRIER_IN_15_SEC, 2, 5000, true));
startQuestTimer("RESTORE_FULL_HP", 15000, npc, attacker);
}
}

View File

@@ -359,7 +359,7 @@ public class ClanHallManager extends AbstractNpcAI
htmltext = getHtm(player, "ClanHallManager-funcConfirm" + funcId + ".html");
htmltext = htmltext.replace("%funcId%", String.valueOf(funcId));
htmltext = htmltext.replace("%funcLv%", String.valueOf(funcLv));
htmltext = htmltext.replace("%funcCost%", "<fstring p1=\"" + template.getCost().getCount() + "\" p2=\"" + template.getDurationAsDays() + "\">" + NpcStringId.FONT_COLOR_FFAABB_S1_FONT_ADENA_S2_DAY_S.getId() + "</fstring>");
htmltext = htmltext.replace("%funcCost%", "<fstring p1=\"" + template.getCost().getCount() + "\" p2=\"" + template.getDurationAsDays() + "\">" + NpcStringId.FONT_COLOR_FFAABB_S1_FONT_ADENA_S2_D.getId() + "</fstring>");
}
}
}
@@ -501,7 +501,7 @@ public class ClanHallManager extends AbstractNpcAI
if (func != null)
{
htmltext = htmltext.replaceAll("%" + name + "recovery%", String.valueOf((int) func.getTemplate().getValue()) + "%");
htmltext = htmltext.replaceAll("%" + name + "price%", "<fstring p1=\"" + func.getTemplate().getCost().getCount() + "\" p2=\"" + func.getTemplate().getDurationAsDays() + "\">" + NpcStringId.FONT_COLOR_FFAABB_S1_FONT_ADENA_S2_DAY_S.getId() + "</fstring>");
htmltext = htmltext.replaceAll("%" + name + "price%", "<fstring p1=\"" + func.getTemplate().getCost().getCount() + "\" p2=\"" + func.getTemplate().getDurationAsDays() + "\">" + NpcStringId.FONT_COLOR_FFAABB_S1_FONT_ADENA_S2_D.getId() + "</fstring>");
htmltext = htmltext.replace("%" + name + "expire%", "Withdraw the fee for the next time at " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(func.getExpiration())));
htmltext = htmltext.replaceAll("%" + name + "deactive%", "[<a action=\"bypass -h Quest ClanHallManager manageFunctions removeFunction confirm " + func.getType().toString() + "\">Deactivate</a>]");
}

View File

@@ -130,7 +130,7 @@ public class SinEater extends AbstractNpcAI
@Override
public void onSummonSpawn(Summon summon)
{
broadcastSummonSay(summon, getRandomBoolean() ? NpcStringId.HEY_IT_SEEMS_LIKE_YOU_NEED_MY_HELP_DOESN_T_IT : NpcStringId.ALMOST_GOT_IT_OUCH_STOP_DAMN_THESE_BLOODY_MANACLES);
broadcastSummonSay(summon, getRandomBoolean() ? NpcStringId.HEY_IT_SEEMS_LIKE_YOU_NEED_MY_HELP_DOESN_T_IT : NpcStringId.ALMOST_GOT_IT_DAMN_THESE_BLOODY_MANACLES);
startQuestTimer("TALK", 60000, null, summon.getOwner());
}

View File

@@ -301,7 +301,7 @@ public class MonsterArena extends AbstractInstance
// Make machine talk.
final Npc machine = world.getNpc(MACHINE);
machine.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HA_NOT_BAD);
machine.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_NOT_BAD_2);
// Save progress to global variables.
GlobalVariablesManager.getInstance().increaseInt(GlobalVariablesManager.MONSTER_ARENA_VARIABLE + machine.getScriptValue(), 1);

View File

@@ -183,7 +183,7 @@ public class Q00255_Tutorial extends Quest
{
qs.startQuest();
qs.setMemoState(1);
showOnScreenMsg(player, NpcStringId.SPEAK_WITH_THE_NEWBIE_HELPER, ExShowScreenMessage.TOP_CENTER, 5000);
showOnScreenMsg(player, NpcStringId.TALK_TO_NEWBIE_HELPER, ExShowScreenMessage.TOP_CENTER, 5000);
playTutorialVoice(player, STARTING_VOICE_HTML.get(player.getClassId().getId()).getSound());
showTutorialHtml(player, STARTING_VOICE_HTML.get(player.getClassId().getId()).getHtml());
}
@@ -363,7 +363,7 @@ public class Q00255_Tutorial extends Quest
{
if (qs.isMemoState(1))
{
showOnScreenMsg(event.getPlayer(), NpcStringId.SPEAK_WITH_THE_NEWBIE_HELPER, ExShowScreenMessage.TOP_CENTER, 5000);
showOnScreenMsg(event.getPlayer(), NpcStringId.TALK_TO_NEWBIE_HELPER, ExShowScreenMessage.TOP_CENTER, 5000);
final int classId = event.getPlayer().getClassId().getId();
addRadar(event.getPlayer(), HELPER_LOCATION.get(classId).getX(), HELPER_LOCATION.get(classId).getY(), HELPER_LOCATION.get(classId).getZ());
showTutorialHtml(event.getPlayer(), "tutorial_04.html");

View File

@@ -188,7 +188,7 @@ public class Q10295_RespectForGraves extends Quest
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.KILL_MONSTERS_IN_THE_CEMETERY_2.getId(), true, qs.getInt(KILL_COUNT_VAR)));
holder.add(new NpcLogListHolder(NpcStringId.LEVEL_52_ACCOMPLISHED, player.getLevel() > 51 ? 1 : 0));
holder.add(new NpcLogListHolder(NpcStringId.REACH_LV_52, player.getLevel() > 51 ? 1 : 0));
return holder;
}
return super.getNpcLogList(player);

View File

@@ -194,7 +194,7 @@ public class Q10296_LetsPayRespectsToOurFallenBrethren extends Quest
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.KILL_MONSTERS_IN_THE_FIELDS_OF_MASSACRE_2.getId(), true, qs.getInt(KILL_COUNT_VAR)));
holder.add(new NpcLogListHolder(NpcStringId.LEVEL_58_ACCOMPLISHED, player.getLevel() > 57 ? 1 : 0));
holder.add(new NpcLogListHolder(NpcStringId.REACH_LV_58, player.getLevel() > 57 ? 1 : 0));
return holder;
}
return super.getNpcLogList(player);

View File

@@ -189,7 +189,7 @@ public class Q10298_TracesOfBattle extends Quest
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.KILL_MONSTERS_ON_THE_WAR_TORN_PLAINS.getId(), true, qs.getInt(KILL_COUNT_VAR)));
holder.add(new NpcLogListHolder(NpcStringId.LEVEL_70_ACCOMPLISHED, player.getLevel() > 69 ? 1 : 0));
holder.add(new NpcLogListHolder(NpcStringId.REACH_LV_70, player.getLevel() > 69 ? 1 : 0));
return holder;
}
return super.getNpcLogList(player);

View File

@@ -61,7 +61,7 @@ public class Q10302_FoilPlansOfTheLizardmen extends Quest
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "no_lvl.html");
registerQuestItems(SOE_HIGH_PRIEST_OVEN.getId());
setQuestNameNpcStringId(NpcStringId.ERADICATE_MONSTERS_IN_THE_PLAINS_OF_THE_LIZARDMEN);
setQuestNameNpcStringId(NpcStringId.KILL_MONSTERS_IN_THE_PLAINS_OF_THE_LIZARDMEN);
}
@Override
@@ -178,7 +178,7 @@ public class Q10302_FoilPlansOfTheLizardmen extends Quest
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.ERADICATE_MONSTERS_IN_THE_PLAINS_OF_THE_LIZARDMEN.getId(), true, qs.getInt(KILL_COUNT_VAR)));
holder.add(new NpcLogListHolder(NpcStringId.KILL_MONSTERS_IN_THE_PLAINS_OF_THE_LIZARDMEN.getId(), true, qs.getInt(KILL_COUNT_VAR)));
return holder;
}
return super.getNpcLogList(player);

View File

@@ -1,4 +0,0 @@
<html><body>High Priest Orven:<br>
It's called a Tower of Insolence.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10303_SymbolOfHubris 30857-02.htm">Learn more</Button>
</body></html>

View File

@@ -1,4 +0,0 @@
<html><body>High Priest Orven:<br>
I want to ask you for help.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10303_SymbolOfHubris 30857-03.htm">"What should I do?"</Button>
</body></html>

View File

@@ -1,4 +0,0 @@
<html><body>High Priest Orven:<br>
Thank you for answering my plea.<br>
Go to the Tower of Insolence and defeat the monsters that roam near. Valid targets: <font color="LEVEL">Ghost of the Tower, Tower Watchman, Ghastly Warrior, Archer of Despair, Judge of Despair, Crendion, Swordsman of Ordeal, Hound of Destruction, Royal Guard of Insolence</font>.<br>
</body></html>

View File

@@ -1,4 +0,0 @@
<html><body>High Priest Orven:<br>
Hello my friend. Do you want to explore a dangerous tower near Aden?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10303_SymbolOfHubris 30857-01.htm">Shrug</Button>
</body></html>

View File

@@ -1,192 +0,0 @@
/*
* 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.Q10303_SymbolOfHubris;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.network.NpcStringId;
/**
* @author petryxa
*/
public class Q10303_SymbolOfHubris extends Quest
{
// NPC
private static final int ORVEN = 30857;
// Monsters
private static final int[] MONSTERS =
{
21989,
21990,
21991,
21992,
21993,
21994,
21995,
21996,
21997,
21998,
21999,
};
// Items
private static final ItemHolder SOE_HIGH_PRIEST_OVEN = new ItemHolder(91768, 1);
private static final ItemHolder SAYHA_COOKIE = new ItemHolder(93274, 10);
private static final ItemHolder SAYHA_STORM = new ItemHolder(91712, 8);
private static final ItemHolder MAGIC_LAMP_CHARGING_POTION = new ItemHolder(91757, 1);
// Misc
private static final int MIN_LEVEL = 78;
private static final String KILL_COUNT_VAR = "KillCount";
public Q10303_SymbolOfHubris()
{
super(10303);
addStartNpc(ORVEN);
addTalkId(ORVEN);
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "no_lvl.html");
registerQuestItems(SOE_HIGH_PRIEST_OVEN.getId());
setQuestNameNpcStringId(NpcStringId.KILL_MONSTERS_IN_THE_TOWER_OF_INSOLENCE);
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "30857.htm":
case "30857-01.htm":
case "30857-02.htm":
{
htmltext = event;
break;
}
case "30857-03.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "reward":
{
if (qs.isCond(2))
{
addExpAndSp(player, 100000000, 2700000);
giveItems(player, SAYHA_COOKIE);
giveItems(player, SAYHA_STORM);
giveItems(player, MAGIC_LAMP_CHARGING_POTION);
htmltext = "30857-05.html";
qs.exitQuest(false, true);
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs.isCreated())
{
htmltext = "30857.htm";
}
else if (qs.isStarted())
{
if (qs.isCond(1))
{
final int killCount = qs.getInt(KILL_COUNT_VAR) + 1;
if (killCount < 1000)
{
htmltext = "no_kill.html";
}
else
{
htmltext = "30857-01.htm";
}
}
else if (qs.isCond(2))
{
htmltext = "30857-04.html";
}
}
else if (qs.isCompleted())
{
htmltext = getAlreadyCompletedMsg(player);
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1))
{
final int killCount = qs.getInt(KILL_COUNT_VAR) + 1;
if (killCount < 1000)
{
qs.set(KILL_COUNT_VAR, killCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
else
{
qs.setCond(2, true);
giveItems(killer, SOE_HIGH_PRIEST_OVEN);
qs.unset(KILL_COUNT_VAR);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public boolean checkPartyMember(Player member, Npc npc)
{
final QuestState qs = getQuestState(member, false);
return ((qs != null) && qs.isStarted());
}
@Override
public Set<NpcLogListHolder> getNpcLogList(Player player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.KILL_MONSTERS_IN_THE_TOWER_OF_INSOLENCE.getId(), true, qs.getInt(KILL_COUNT_VAR)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@@ -1,4 +0,0 @@
<html><body>High Priest Orven:<br>
I think there are still too many monsters.<br>
Go to the <font color="LEVEL">Tower of Insolence</font> and defeat the monsters that roam near. Monsters to hunt: <font color="LEVEL">Ghost of the Tower, Tower Watchman, Ghastly Warrior, Archer of Despair, Judge of Despair, Crendion, Swordsman of Ordeal, Hound of Destruction, Royal Guard of Insolence</font>.<br>
</body></html>

View File

@@ -1,4 +0,0 @@
<html><body>Hight Priest Orven:<br>
I think you are not strong enough for this quest. Gain more experience and then come back.<br>
(This quest is available to characters of Lv. 78+.)<br>
</body></html>

View File

@@ -36,7 +36,6 @@ import quests.Q10299_GetIncrediblePower.Q10299_GetIncrediblePower;
import quests.Q10300_ExploringTheCrumaTower.Q10300_ExploringTheCrumaTower;
import quests.Q10301_NotSoSilentValley.Q10301_NotSoSilentValley;
import quests.Q10302_FoilPlansOfTheLizardmen.Q10302_FoilPlansOfTheLizardmen;
import quests.Q10303_SymbolOfHubris.Q10303_SymbolOfHubris;
import quests.Q10304_ChangesintheDragonValley.Q10304_ChangesintheDragonValley;
import quests.Q10305_DragonsSuspiciousMovements.Q10305_DragonsSuspiciousMovements;
import quests.Q10306_StopSelMahumsTroops.Q10306_StopSelMahumsTroops;
@@ -101,7 +100,6 @@ public class QuestMasterHandler
Q10300_ExploringTheCrumaTower.class,
Q10301_NotSoSilentValley.class,
Q10302_FoilPlansOfTheLizardmen.class,
Q10303_SymbolOfHubris.class,
Q10304_ChangesintheDragonValley.class,
Q10305_DragonsSuspiciousMovements.class,
Q10306_StopSelMahumsTroops.class,