Various script improvements.

Contributed by NightBR.
This commit is contained in:
MobiusDevelopment
2019-04-15 17:54:01 +00:00
parent 90ca2cc7e8
commit 6972b74a10
34 changed files with 97 additions and 34 deletions

View File

@@ -31,6 +31,13 @@ public class Herphah extends AbstractNpcAI
{
// NPC
private static final int HERPHAH = 34362;
// Misc
private static final String[] RANDOM_VOICE =
{
"Npcdialog1.herphah_ep50_greeting_1",
"Npcdialog1.herphah_ep50_greeting_2",
"Npcdialog1.herphah_ep50_greeting_3"
};
private Herphah()
{
@@ -67,7 +74,7 @@ public class Herphah extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
player.sendPacket(new PlaySound(3, "Npcdialog1.herphah_faction_1", 0, 0, 0, 0, 0));
player.sendPacket(new PlaySound(3, RANDOM_VOICE[getRandom(3)], 0, 0, 0, 0, 0));
return "34362.html";
}

View File

@@ -31,6 +31,13 @@ public class Penny extends AbstractNpcAI
{
// NPC
private static final int PENNY = 34413;
// Misc
private static final String[] RANDOM_VOICE =
{
"Npcdialog1.peny_ep50_greeting_7",
"Npcdialog1.peny_ep50_greeting_8",
"Npcdialog1.peny_ep50_greeting_9"
};
private Penny()
{
@@ -61,7 +68,7 @@ public class Penny extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
player.sendPacket(new PlaySound(3, "Npcdialog1.penny_faction_1", 0, 0, 0, 0, 0));
player.sendPacket(new PlaySound(3, RANDOM_VOICE[getRandom(3)], 0, 0, 0, 0, 0));
return "34413.html";
}

View File

@@ -195,12 +195,15 @@ public abstract class LetterQuest extends Quest
{
player.teleToLocation(_startTeleport);
takeItems(player, _startSOE, -1);
qs.setCond(2, true);
}
}
player.sendPacket(TutorialCloseHtml.STATIC_PACKET);
player.clearHtmlActions(HtmlActionScope.TUTORIAL_HTML);
}
if ((qs != null) && qs.isCond(1))
{
qs.setCond(2, true);
}
}
@RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)

View File

@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
*/
public class Q00738_DimensionalExplorationOfTheUnworldlyVisitors extends Quest
{
private static final int START_NPC = 34360;
private static final int START_NPC = 34359;
public Q00738_DimensionalExplorationOfTheUnworldlyVisitors()
{

View File

@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
*/
public class Q10571_StrategicReconciliation extends Quest
{
private static final int START_NPC = 34360;
private static final int START_NPC = 34359;
public Q10571_StrategicReconciliation()
{