Cleanup for quest 503.

This commit is contained in:
MobiusDevelopment 2019-11-16 00:53:31 +00:00
parent 57039c7dd1
commit b80b5ac85a
2 changed files with 84 additions and 74 deletions

View File

@ -308,8 +308,10 @@ public class Q00503_PursuitOfClanAmbition extends Quest
} }
case "SPAWN_WITCH": case "SPAWN_WITCH":
{ {
addSpawn(WITCH_ATHREA, 160688, 21296, -3714, 0); final Npc athrea = addSpawn(WITCH_ATHREA, 160688, 21296, -3714, 0, false, 0);
addSpawn(WITCH_KALIS, 160690, 21176, -3712, 0); athrea.setScriptValue(50301);
final Npc kalis = addSpawn(WITCH_KALIS, 160690, 21176, -3712, 0, false, 0);
kalis.setScriptValue(50302);
break; break;
} }
} }
@ -436,9 +438,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
String htmltext = getNoQuestMsg(player); String htmltext = getNoQuestMsg(player);
if (qs.isCreated() || qs.isCompleted()) if (qs.isCreated() || qs.isCompleted())
{ {
if (npc.getId() == SIR_GUSTAV_ATHEBALDT) if ((npc.getId() == SIR_GUSTAV_ATHEBALDT) && (lqs != null))
{
if (lqs != null)
{ {
if (player.isClanLeader()) if (player.isClanLeader())
{ {
@ -469,7 +469,6 @@ public class Q00503_PursuitOfClanAmbition extends Quest
} }
} }
} }
}
else if (qs.isStarted()) else if (qs.isStarted())
{ {
switch (npc.getId()) switch (npc.getId())
@ -570,7 +569,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
{ {
if (lqs != null) if (lqs != null)
{ {
if ((qs.getMemoState() == 1000)) if (qs.getMemoState() == 1000)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@ -598,11 +597,11 @@ public class Q00503_PursuitOfClanAmbition extends Quest
htmltext = "30645-05.html"; htmltext = "30645-05.html";
} }
} }
else if ((qs.getMemoState() == 3000)) else if (qs.getMemoState() == 3000)
{ {
htmltext = "30645-07.html"; htmltext = "30645-07.html";
} }
else if ((qs.getMemoState() > 3000)) else if (qs.getMemoState() > 3000)
{ {
htmltext = "30645-08.html"; htmltext = "30645-08.html";
} }
@ -657,7 +656,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
{ {
if (lqs != null) if (lqs != null)
{ {
if ((qs.getMemoState() == 4000)) if (qs.getMemoState() == 4000)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@ -672,7 +671,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
htmltext = "30764-04.html"; htmltext = "30764-04.html";
} }
} }
else if ((qs.getMemoState() == 5000)) else if (qs.getMemoState() == 5000)
{ {
if (getQuestItemsCount(player, SPITEFUL_SOUL_ENERGY) < 10) if (getQuestItemsCount(player, SPITEFUL_SOUL_ENERGY) < 10)
{ {
@ -686,7 +685,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
htmltext = "30764-08a.html"; htmltext = "30764-08a.html";
} }
} }
else if ((qs.getMemoState() >= 6000)) else if (qs.getMemoState() >= 6000)
{ {
htmltext = "30764-09.html"; htmltext = "30764-09.html";
} }
@ -803,15 +802,21 @@ public class Q00503_PursuitOfClanAmbition extends Quest
switch (npc.getId()) switch (npc.getId())
{ {
case WITCH_ATHREA: case WITCH_ATHREA:
{
if (npc.isScriptValue(50301))
{ {
startQuestTimer("DESPAWN_WITCH_ATHREA", 180000, npc, null); startQuestTimer("DESPAWN_WITCH_ATHREA", 180000, npc, null);
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WAR_AND_DEATH)); npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WAR_AND_DEATH));
}
break; break;
} }
case WITCH_KALIS: case WITCH_KALIS:
{
if (npc.isScriptValue(50302))
{ {
startQuestTimer("DESPAWN_WITCH_KALIS", 180000, npc, null); startQuestTimer("DESPAWN_WITCH_KALIS", 180000, npc, null);
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AMBITION_AND_POWER)); npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AMBITION_AND_POWER));
}
break; break;
} }
case IMPERIAL_COFFER: case IMPERIAL_COFFER:

View File

@ -308,8 +308,10 @@ public class Q00503_PursuitOfClanAmbition extends Quest
} }
case "SPAWN_WITCH": case "SPAWN_WITCH":
{ {
addSpawn(WITCH_ATHREA, 160688, 21296, -3714, 0); final Npc athrea = addSpawn(WITCH_ATHREA, 160688, 21296, -3714, 0, false, 0);
addSpawn(WITCH_KALIS, 160690, 21176, -3712, 0); athrea.setScriptValue(50301);
final Npc kalis = addSpawn(WITCH_KALIS, 160690, 21176, -3712, 0, false, 0);
kalis.setScriptValue(50302);
break; break;
} }
} }
@ -436,9 +438,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
String htmltext = getNoQuestMsg(player); String htmltext = getNoQuestMsg(player);
if (qs.isCreated() || qs.isCompleted()) if (qs.isCreated() || qs.isCompleted())
{ {
if (npc.getId() == SIR_GUSTAV_ATHEBALDT) if ((npc.getId() == SIR_GUSTAV_ATHEBALDT) && (lqs != null))
{
if (lqs != null)
{ {
if (player.isClanLeader()) if (player.isClanLeader())
{ {
@ -469,7 +469,6 @@ public class Q00503_PursuitOfClanAmbition extends Quest
} }
} }
} }
}
else if (qs.isStarted()) else if (qs.isStarted())
{ {
switch (npc.getId()) switch (npc.getId())
@ -570,7 +569,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
{ {
if (lqs != null) if (lqs != null)
{ {
if ((qs.getMemoState() == 1000)) if (qs.getMemoState() == 1000)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@ -598,11 +597,11 @@ public class Q00503_PursuitOfClanAmbition extends Quest
htmltext = "30645-05.html"; htmltext = "30645-05.html";
} }
} }
else if ((qs.getMemoState() == 3000)) else if (qs.getMemoState() == 3000)
{ {
htmltext = "30645-07.html"; htmltext = "30645-07.html";
} }
else if ((qs.getMemoState() > 3000)) else if (qs.getMemoState() > 3000)
{ {
htmltext = "30645-08.html"; htmltext = "30645-08.html";
} }
@ -657,7 +656,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
{ {
if (lqs != null) if (lqs != null)
{ {
if ((qs.getMemoState() == 4000)) if (qs.getMemoState() == 4000)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@ -672,7 +671,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
htmltext = "30764-04.html"; htmltext = "30764-04.html";
} }
} }
else if ((qs.getMemoState() == 5000)) else if (qs.getMemoState() == 5000)
{ {
if (getQuestItemsCount(player, SPITEFUL_SOUL_ENERGY) < 10) if (getQuestItemsCount(player, SPITEFUL_SOUL_ENERGY) < 10)
{ {
@ -686,7 +685,7 @@ public class Q00503_PursuitOfClanAmbition extends Quest
htmltext = "30764-08a.html"; htmltext = "30764-08a.html";
} }
} }
else if ((qs.getMemoState() >= 6000)) else if (qs.getMemoState() >= 6000)
{ {
htmltext = "30764-09.html"; htmltext = "30764-09.html";
} }
@ -803,15 +802,21 @@ public class Q00503_PursuitOfClanAmbition extends Quest
switch (npc.getId()) switch (npc.getId())
{ {
case WITCH_ATHREA: case WITCH_ATHREA:
{
if (npc.isScriptValue(50301))
{ {
startQuestTimer("DESPAWN_WITCH_ATHREA", 180000, npc, null); startQuestTimer("DESPAWN_WITCH_ATHREA", 180000, npc, null);
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WAR_AND_DEATH)); npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WAR_AND_DEATH));
}
break; break;
} }
case WITCH_KALIS: case WITCH_KALIS:
{
if (npc.isScriptValue(50302))
{ {
startQuestTimer("DESPAWN_WITCH_KALIS", 180000, npc, null); startQuestTimer("DESPAWN_WITCH_KALIS", 180000, npc, null);
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AMBITION_AND_POWER)); npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AMBITION_AND_POWER));
}
break; break;
} }
case IMPERIAL_COFFER: case IMPERIAL_COFFER: