Missing Kartia dialogs and condition checks.

This commit is contained in:
MobiusDev
2016-07-20 18:33:30 +00:00
parent d5ef17f953
commit 9d59227c29
16 changed files with 261 additions and 57 deletions

View File

@@ -1,9 +0,0 @@
<html><body>Kartia Researcher:<br>
If you'll accept the challenge, you have to tell me where to send you. So where?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest KartiasLabyrinth enter_85_solo">Kartia's Labyrinth Lv. 85 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest KartiasLabyrinth enter_90_solo">Kartia's Labyrinth Lv. 90 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest KartiasLabyrinth enter_95_solo">Kartia's Labyrinth Lv. 95 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest KartiasLabyrinth enter_85_group">Kartia's Labyrinth Lv. 85 Party</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest KartiasLabyrinth enter_90_group">Kartia's Labyrinth Lv. 90 Party</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest KartiasLabyrinth enter_95_group">Kartia's Labyrinth Lv. 95 Party</Button>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Kartia Researcher:<br>
If you'll accept the challenge, you have to tell me where to send you. So where?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_zellaka_solo">Kartia's Labyrinth Lv. 85 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_pelline_solo">Kartia's Labyrinth Lv. 90 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_kalios_solo">Kartia's Labyrinth Lv. 95 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_zellaka_party">Kartia's Labyrinth Lv. 85 Party</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_pelline_party">Kartia's Labyrinth Lv. 90 Party</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_kalios_party">Kartia's Labyrinth Lv. 95 Party</Button>
</body></html>

View File

@@ -1,6 +1,6 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
You've heard of Dimensional Rifts, I'm assuming. How outside of the physical world we inhabit there are still other dimensions?<br> You've heard of Dimensional Rifts, I'm assuming. How outside of the physical world we inhabit there are still other dimensions?<br>
Of course the dimensions were kept apart to keep them from interfering with one another.<br> Of course the dimensions were kept apart to keep them from interfering with one another.<br>
Ever since Shilen's rising however the balance has been completely thrown off. As for Kartia's Labyrinth, we've discovered that she built it specifically as a stronghold amongst the dimensional rifts, guarded by three hand-picked demons.<br> Ever since Shilen's rising however the balance has been completely thrown off. As for Kartia's Labyrinth, we've discovered that she built it specifically as a stronghold amongst the dimensional rifts, guarded by three hand-picked demons.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 3">"I see."</Button> <Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest KartiasLabyrinth 33647-3.htm">"I see."</Button>
</body></html> </body></html>

View File

@@ -1,7 +1,7 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.<br> Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.<br>
The monsters that crossed space and time to Kartia's Labyrinth are part of Shilen's plot to infiltrate the whole of Aden. Our goal is to stop them, but we're only researchers. We need heroes.<br> The monsters that crossed space and time to Kartia's Labyrinth are part of Shilen's plot to infiltrate the whole of Aden. Our goal is to stop them, but we're only researchers. We need heroes.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">Challenge Kartia's Labyrinth</Button> <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-1.htm">Challenge Kartia's Labyrinth</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 2">"What's Kartia's Labyrinth?"</Button> <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-2.htm">"What's Kartia's Labyrinth?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button> <Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html> </body></html>

View File

@@ -1,6 +1,6 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
My, you don't know anything about the history of Kartia's Labyrinth, do you?<br> My, you don't know anything about the history of Kartia's Labyrinth, do you?<br>
But I can see you're curious about its history.<br> But I can see you're curious about its history.<br>
Well, if you bring me something they left behind, I will probably be able to give you some information. A cronicle, perhaps?<br> Well, if you bring me something they left behind, I will probably be able to give you some information. A cronicle, perhaps?<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 3">Quest</Button> <Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest KartiasLabyrinth 33647-3.htm">Quest</Button>
</body></html> </body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Kartia Researcher:<br>
Good luck with your journey, and please be careful!
</body></html>

View File

@@ -1,3 +1,3 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
You must not overstep your abilities. Please choose a location that suits your level. You must not overstep your abilities. Please choose a location that suits your level.
</body></html> </body></html>

View File

@@ -1,3 +1,3 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
The party leader must ask me while you are in a party. The party leader must ask me while you are in a party.
</body></html> </body></html>

View File

@@ -1,3 +1,3 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
I think there is a problem with the Dimensional Rift. Come back later when I've sorted it out. I think there is a problem with the Dimensional Rift. Come back later when I've sorted it out.
</body></html> </body></html>

View File

@@ -1,8 +1,8 @@
<html><body>Kartia Researcher:<br> <html><body>Kartia Researcher:<br>
Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.<br> Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.<br>
The monsters that crossed space and time to Kartia's Labyrinth are part of Shilen's plot to infiltrate the whole of Aden. Our goal is to stop them, but we're only researchers. We need heroes.<br> The monsters that crossed space and time to Kartia's Labyrinth are part of Shilen's plot to infiltrate the whole of Aden. Our goal is to stop them, but we're only researchers. We need heroes.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"I'm gonna go in."</Button> <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-1.htm">"I'm gonna go in."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 2">"What's Kartia's Labyrinth?"</Button> <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-2.htm">"What's Kartia's Labyrinth?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 4">"I'm curious about the labyrinth's history."</Button> <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-4.htm">"I'm curious about the labyrinth's history."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button> <Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html> </body></html>

View File

@@ -16,6 +16,7 @@
*/ */
package instances.KartiasLabyrinth; package instances.KartiasLabyrinth;
import java.util.Calendar;
import java.util.List; import java.util.List;
import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.commons.util.CommonUtil;
@@ -36,6 +37,7 @@ import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.model.zone.L2ZoneType; import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.util.Util;
import instances.AbstractInstance; import instances.AbstractInstance;
import quests.Q00494_IncarnationOfGreedZellakaGroup.Q00494_IncarnationOfGreedZellakaGroup; import quests.Q00494_IncarnationOfGreedZellakaGroup.Q00494_IncarnationOfGreedZellakaGroup;
@@ -60,6 +62,30 @@ public final class KartiasLabyrinth extends AbstractInstance
33619, 33619,
33630, 33630,
}; };
private static final int[] BARTON =
{
33610,
33621,
33632,
};
private static final int[] ELISE =
{
33616,
33627,
33638,
};
private static final int[] ELIYAH =
{
33614,
33625,
33636,
};
private static final int[] HAYUK =
{
33612,
33623,
33634,
};
// @formatter:off // @formatter:off
private static final int[] MONSTERS = private static final int[] MONSTERS =
{ {
@@ -130,12 +156,26 @@ public final class KartiasLabyrinth extends AbstractInstance
private static final int TEMPLATE_ID_GROUP_85 = 208; private static final int TEMPLATE_ID_GROUP_85 = 208;
private static final int TEMPLATE_ID_GROUP_90 = 209; private static final int TEMPLATE_ID_GROUP_90 = 209;
private static final int TEMPLATE_ID_GROUP_95 = 210; private static final int TEMPLATE_ID_GROUP_95 = 210;
private static final int MIN_LVL_85 = 85;
private static final int MIN_LVL_90 = 90;
private static final int MIN_LVL_95 = 95;
private static final int MAX_LVL_85 = 89;
private static final int MAX_LVL_90 = 94;
private static final int MAX_LVL_95 = 99;
private static final String KARTIA_ENTRY_VAR = "Last_Kartia_entry";
private static final String KARTIA_PARTY_ENTRY_VAR = "Last_Kartia_party_entry";
public KartiasLabyrinth() public KartiasLabyrinth()
{ {
addStartNpc(KARTIA_RESEARCHER); addStartNpc(KARTIA_RESEARCHER);
addFirstTalkId(KARTIA_RESEARCHER);
addFirstTalkId(ADOLPH); addFirstTalkId(ADOLPH);
addFirstTalkId(BARTON);
addFirstTalkId(ELISE);
addFirstTalkId(ELIYAH);
addFirstTalkId(HAYUK);
addTalkId(ADOLPH); addTalkId(ADOLPH);
addTalkId(KARTIA_RESEARCHER);
addSpawnId(BOZ_ENERGY); addSpawnId(BOZ_ENERGY);
addSpawnId(BOSSES); addSpawnId(BOSSES);
addAttackId(MINI_BOSSES); addAttackId(MINI_BOSSES);
@@ -157,35 +197,132 @@ public final class KartiasLabyrinth extends AbstractInstance
{ {
switch (event) switch (event)
{ {
case "enter_85_solo": case "33647-1.htm":
case "33647-2.htm":
case "33647-3.htm":
case "33647-4.htm":
{ {
enterInstance(player, npc, TEMPLATE_ID_SOLO_85); return event;
break;
} }
case "enter_90_solo": case "request_zellaka_solo":
{ {
enterInstance(player, npc, TEMPLATE_ID_SOLO_90); if (!checkConditions(player, TEMPLATE_ID_SOLO_85))
break; {
return "33647-8.htm";
}
else if ((player.getLevel() >= MIN_LVL_85) && (player.getLevel() <= MAX_LVL_85))
{
enterInstance(player, npc, TEMPLATE_ID_SOLO_85);
savePlayer(player);
return "33647-5.htm";
}
else
{
return "33647-6.htm";
}
} }
case "enter_95_solo": case "request_pelline_solo":
{ {
enterInstance(player, npc, TEMPLATE_ID_SOLO_95); if (!checkConditions(player, TEMPLATE_ID_SOLO_90))
break; {
return "33647-8.htm";
}
else if ((player.getLevel() >= MIN_LVL_90) && (player.getLevel() <= MAX_LVL_90))
{
enterInstance(player, npc, TEMPLATE_ID_SOLO_90);
savePlayer(player);
return "33647-5.htm";
}
else
{
return "33647-6.htm";
}
} }
case "enter_85_group": case "request_kalios_solo":
{ {
if (!checkConditions(player, TEMPLATE_ID_SOLO_95))
{
return "33647-8.htm";
}
else if ((player.getLevel() >= MIN_LVL_95) && (player.getLevel() <= MAX_LVL_95))
{
enterInstance(player, npc, TEMPLATE_ID_SOLO_95);
savePlayer(player);
return "33647-5.htm";
}
else
{
return "33647-6.htm";
}
}
case "request_zellaka_party":
{
if ((player.getParty() == null) || !player.getParty().isLeader(player))
{
return "33647-7.htm";
}
for (L2PcInstance member : player.getParty().getMembers())
{
if (!checkConditions(member, TEMPLATE_ID_GROUP_85) || (member.getLevel() < MIN_LVL_85) || (member.getLevel() > MAX_LVL_85) || (Util.calculateDistance(player, member, false, false) > 500))
{
return "33647-8.htm";
}
}
enterInstance(player, npc, TEMPLATE_ID_GROUP_85); enterInstance(player, npc, TEMPLATE_ID_GROUP_85);
break; savePlayer(player);
for (L2PcInstance member : player.getParty().getMembers())
{
player.getInstanceWorld().addAllowed(member);
member.teleToLocation(player, true);
savePlayer(member);
}
return "33647-5.htm";
} }
case "enter_90_group": case "request_pelline_party":
{ {
if ((player.getParty() == null) || !player.getParty().isLeader(player))
{
return "33647-7.htm";
}
for (L2PcInstance member : player.getParty().getMembers())
{
if (!checkConditions(member, TEMPLATE_ID_GROUP_90) || (member.getLevel() < MIN_LVL_90) || (member.getLevel() > MAX_LVL_90) || (Util.calculateDistance(player, member, false, false) > 500))
{
return "33647-8.htm";
}
}
enterInstance(player, npc, TEMPLATE_ID_GROUP_90); enterInstance(player, npc, TEMPLATE_ID_GROUP_90);
break; savePlayer(player);
for (L2PcInstance member : player.getParty().getMembers())
{
player.getInstanceWorld().addAllowed(member);
member.teleToLocation(player, true);
savePlayer(member);
}
return "33647-5.htm";
} }
case "enter_95_group": case "request_kalios_party":
{ {
if ((player.getParty() == null) || !player.getParty().isLeader(player))
{
return "33647-7.htm";
}
for (L2PcInstance member : player.getParty().getMembers())
{
if (!checkConditions(member, TEMPLATE_ID_GROUP_95) || (member.getLevel() < MIN_LVL_95) || (member.getLevel() > MAX_LVL_95) || (Util.calculateDistance(player, member, false, false) > 500))
{
return "33647-8.htm";
}
}
enterInstance(player, npc, TEMPLATE_ID_GROUP_95); enterInstance(player, npc, TEMPLATE_ID_GROUP_95);
break; savePlayer(player);
for (L2PcInstance member : player.getParty().getMembers())
{
player.getInstanceWorld().addAllowed(member);
member.teleToLocation(player, true);
savePlayer(member);
}
return "33647-5.htm";
} }
default: default:
{ {
@@ -925,7 +1062,31 @@ public final class KartiasLabyrinth extends AbstractInstance
@Override @Override
public String onFirstTalk(L2Npc npc, L2PcInstance player) public String onFirstTalk(L2Npc npc, L2PcInstance player)
{ {
return "adolph.html"; if (npc.getId() == KARTIA_RESEARCHER)
{
return "33647.htm";
}
if (CommonUtil.contains(ADOLPH, npc.getId()))
{
return "adolph.html";
}
if (CommonUtil.contains(BARTON, npc.getId()))
{
return "barton.html";
}
if (CommonUtil.contains(ELISE, npc.getId()))
{
return "elise.html";
}
if (CommonUtil.contains(ELIYAH, npc.getId()))
{
return "eliyah.html";
}
if (CommonUtil.contains(HAYUK, npc.getId()))
{
return "hayuk.html";
}
return "";
} }
private boolean isSoloKartia(Instance instance) private boolean isSoloKartia(Instance instance)
@@ -933,6 +1094,36 @@ public final class KartiasLabyrinth extends AbstractInstance
return (instance.getTemplateId() == TEMPLATE_ID_SOLO_85) || (instance.getTemplateId() == TEMPLATE_ID_SOLO_90) || (instance.getTemplateId() == TEMPLATE_ID_SOLO_95); return (instance.getTemplateId() == TEMPLATE_ID_SOLO_85) || (instance.getTemplateId() == TEMPLATE_ID_SOLO_90) || (instance.getTemplateId() == TEMPLATE_ID_SOLO_95);
} }
protected void savePlayer(L2PcInstance player)
{
if (isSoloKartia(player.getInstanceWorld()))
{
player.getVariables().set(KARTIA_ENTRY_VAR, System.currentTimeMillis());
}
else
{
player.getVariables().set(KARTIA_PARTY_ENTRY_VAR, System.currentTimeMillis());
}
}
protected boolean checkConditions(L2PcInstance player, int templateId)
{
long lastEntry = 0;
if ((templateId == TEMPLATE_ID_SOLO_85) || (templateId == TEMPLATE_ID_SOLO_90) || (templateId == TEMPLATE_ID_SOLO_95))
{
lastEntry = player.getVariables().getLong(KARTIA_ENTRY_VAR, 0);
}
else
{
lastEntry = player.getVariables().getLong(KARTIA_PARTY_ENTRY_VAR, 0);
}
final Calendar entryResetTime = Calendar.getInstance();
entryResetTime.set(Calendar.HOUR, 6);
entryResetTime.set(Calendar.MINUTE, 30);
entryResetTime.set(Calendar.AM_PM, Calendar.AM);
return lastEntry < entryResetTime.getTimeInMillis();
}
public static void main(String[] args) public static void main(String[] args)
{ {
new KartiasLabyrinth(); new KartiasLabyrinth();

View File

@@ -0,0 +1,4 @@
<html><body>Barton:<br>
Always procrastinating... Why doesn't the Captain attack?<br1>
What? Me? As you can see, I am Tyrr Warrior Barton, best warrior in the Aden Kingdom. You weren't going to fight without me, were you?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Elise:<br>
I am Priestess Elise. I will heal your wounds and support your efforts. Do not underestimate my importance in battle, or you may wind up healing your own foolish self.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eliyah:<br>
Hayuk acts smart, but he is nothing compared to me. My guardian spirits cannot stand their master being in danger, and they attack accordingly. You must fight numbers with numbers, don't you think?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hayuk:<br>
Unlike my colleague Barton, who is not the sharpest tool in the shed, I prefer to engage in smart combat. It would be a mistake to think that I am weaker than him.
</body></html>

View File

@@ -1,3 +0,0 @@
<html><body>Kartia Researcher:<br>
Good luck on your journey, and please be careful!
</body></html>