Retail dialogs for quest Vestige of the Magic Power (783).

Contributed by Iris.
This commit is contained in:
MobiusDev 2018-04-08 09:19:43 +00:00
parent dea8ec6cf0
commit fad362e881
38 changed files with 426 additions and 152 deletions

View File

@ -0,0 +1,4 @@
<html><body>Leona Blackbird:<br>
Come back later.<br>
(This quest is a daily quest and will be available tomorrow at 6.30am.)
</body></html>

View File

@ -1,4 +1,5 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-02.htm">"NEXT 1"</Button>
A lot of Adventurers have helped us out. Thanks to them, we were able to use Chaos Fragments to interfere with Beleth's plan.<br>
Well, it did work well for a while.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-02.htm">"What happened?"</Button>
</body></html>

View File

@ -1,4 +1,5 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-03.htm">"NEXT 2"</Button>
I'm not sure since when, but the Chaos Fragments from the Phantasmal Ridge started giving off an eerie energy. As time passed, that energy grew stronger, and I asked Devianne to investigate. She said that those Chaos Fragments were much more powerful than the regular ones.<br>
After that, we started calling them High-Grade Chaos Fragments, and we started investigating the reason for the change.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-03.htm">"Go on."</Button>
</body></html>

View File

@ -1,4 +1,5 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"NEXT 3"</Button>
We don't know why those changes happened. It's Beleth's plan to defend himself, by transforming the monsters in the Phantasmal Ridge. They've been trying to get their resources more easily.<br>
We cannot let this go on. If we don't stop them now, all our efforts will be in vain. Could you help me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Leave it to me."</Button>
</body></html>

View File

@ -1,4 +1,9 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Starrt Quest
It's a fortunate thing that such a skilled adventurer as yourself has commited to making yourself available to the cause. Here is your mission. Please select how much you can take on.<br>
Basic Mission - Collect 300 High-grade Chaos Fragments<br>
Intermediate Mission - Collect 600 High-grade Chaos Fragments<br>
Advanced Mission - Collect 900 High-grade Chaos Fragments<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-05.htm">"I'll take the basic mission."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-06.htm">"I'll take the intermediate mission."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-07.htm">"I'll take the advanced mission."</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I see you have chosen the basic mission. You will be required to collect 300 High-grade Chaos Fragments. Once you have made the decision, you will not be given the reward until you complete the mission. Please make sure you have made a careful decision.<br>
Are you sure want to proceed with the mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-05a.htm">"Yes, I've made my decision."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Let me reconsider.."</Button>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Quest Progress
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I understand. You must go to the Phantasmal Ridge and collect 300 High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
So let me see 1, 2... 300 High-grade Fragment of Chaos! This is great!... Here, take your reward...<br>
Come see me tomorrow...
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I see you have chosen the intermediate mission. You will be required to collect 600 High-grade Chaos Fragments. Once you have made the decision, you will not be given the reward until you complete the mission. Please make sure you have made a careful decision.<br>
Are you sure want to proceed with the mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-06a.htm">"Yes, I've made my decision."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Let me reconsider.."</Button>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Quest Condition 2
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-07.html">"NEXT 4"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I understand. You must go to the Phantasmal Ridge and collect 600 High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
Are those 600 High-grade Fragment of Chaos? Wow... Here, take your reward...<br>
Come see me tomorrow...
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I see you have chosen the advanced mission. You will be required to collect 300 High-grade Chaos Fragments. Once you have made the decision, you will not be given the reward until you complete the mission. Please make sure you have made a careful decision.<br>
Are you sure want to proceed with the mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-07a.htm">"Yes, I've made my decision."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Let me reconsider.."</Button>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Quest Finish
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I understand. You must go to the Phantasmal Ridge and collect 900 High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
Oh my... I see you brought me 900 High-grade Fragment of Chaos! You are the best... Here, take your reward...<br>
Come see me tomorrow...
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
Are you still here? You must go to the Phantasmal Ridge and collect High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -16,9 +16,11 @@
*/
package quests.Q00783_VestigeOfTheMagicPower;
import java.util.List;
import com.l2jmobius.gameserver.enums.Faction;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
@ -30,7 +32,7 @@ import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter;
/**
* Vestige of the Magic Power (783)
* @URL https://l2wiki.com/Vestige_of_the_Magic_Power
* @author Gigi
* @author Gigi, Iris
*/
public class Q00783_VestigeOfTheMagicPower extends Quest
{
@ -81,6 +83,9 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
{
case "31595-02.htm":
case "31595-03.htm":
case "31595-05.htm":
case "31595-06.htm":
case "31595-07.htm":
{
htmltext = event;
break;
@ -91,35 +96,62 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
htmltext = event;
break;
}
case "31595-07.html":
case "31595-05a.htm":
{
if (qs.isCond(2))
{
if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0)
{
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 100);
giveItems(player, BASIC_SUPPLY_BOX, 1);
addExpAndSp(player, 4845395970L, 11628900);
}
else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) <= 1)
{
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 200);
giveItems(player, INTERMEDIATE_SUPPLY_BOX, 1);
addExpAndSp(player, 9690791940L, 23257800);
}
else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2)
{
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 300);
giveItems(player, ADVANCED_SUPPLY_BOX, 1);
addExpAndSp(player, 14536187910L, 34886700);
}
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
qs.setCond(2, true);
htmltext = event;
break;
}
case "31595-06a.htm":
{
qs.setCond(3, true);
htmltext = event;
break;
}
case "31595-07a.htm":
{
qs.setCond(3, true);
htmltext = event;
break;
}
case "31595-05b.htm":
{
qs.exitQuest(QuestType.DAILY, true);
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 100);
giveItemRandomly(player, BASIC_SUPPLY_BOX, 1, 1, 0.9, false);
giveItemRandomly(player, INTERMEDIATE_SUPPLY_BOX, 1, 1, 0.4, false);
giveItemRandomly(player, ADVANCED_SUPPLY_BOX, 1, 1, 0.2, false);
addExpAndSp(player, 12113489880L, 12113460);
htmltext = event;
break;
}
case "31595-06b.htm":
{
qs.exitQuest(QuestType.DAILY, true);
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 200);
giveItemRandomly(player, BASIC_SUPPLY_BOX, 1, 1, 0.4, false);
giveItemRandomly(player, INTERMEDIATE_SUPPLY_BOX, 1, 1, 0.9, false);
giveItemRandomly(player, ADVANCED_SUPPLY_BOX, 1, 1, 0.2, false);
addExpAndSp(player, 24226979760L, 24226920);
htmltext = event;
break;
}
case "31595-07b.htm":
{
qs.exitQuest(QuestType.DAILY, true);
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 300);
giveItemRandomly(player, BASIC_SUPPLY_BOX, 1, 1, 0.2, false);
giveItemRandomly(player, INTERMEDIATE_SUPPLY_BOX, 1, 1, 0.5, false);
giveItemRandomly(player, ADVANCED_SUPPLY_BOX, 1, 1, 0.9, false);
giveItems(player, ADVANCED_SUPPLY_BOX, 1);
addExpAndSp(player, 36340469640L, 36340380);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
@ -141,12 +173,37 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
{
if (qs.isCond(1))
{
htmltext = "31595-05.html";
htmltext = "31595-04.htm";
}
else if (qs.isCond(2))
else if (qs.isCond(5))
{
htmltext = "31595-06.html";
htmltext = "31595-05b.htm";
onAdvEvent(htmltext, npc, player);
}
else if (qs.isCond(6))
{
htmltext = "31595-06b.htm";
onAdvEvent(htmltext, npc, player);
}
else if (qs.isCond(7))
{
htmltext = "31595-07b.htm";
onAdvEvent(htmltext, npc, player);
}
else if (qs.isCond(2) || qs.isCond(3) || qs.isCond(4))
{
htmltext = "31595-08.htm";
}
break;
}
case State.COMPLETED:
{
if (!qs.isNowAvailable())
{
htmltext = "31595-00a.htm";
break;
}
htmltext = "31595-01.htm";
break;
}
}
@ -157,37 +214,72 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if (qs != null)
if (killer.isInParty())
{
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 300))
final L2Party party = killer.getParty();
final List<L2PcInstance> partyMember = party.getMembers();
for (L2PcInstance singleMember : partyMember)
{
if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 300)
QuestState qsPartyMember = getQuestState(singleMember, false);
double distance = npc.calculateDistance(singleMember, true, false);
if ((qsPartyMember != null) && (distance <= 1000))
{
qs.setCond(2, true);
if (qsPartyMember.isCond(2))
{
if (giveItemRandomly(singleMember, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qsPartyMember.setCond(5, true);
}
}
if (qsPartyMember.isCond(3))
{
if (giveItemRandomly(singleMember, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qsPartyMember.setCond(6, true);
}
}
if (qsPartyMember.isCond(4))
{
if (giveItemRandomly(singleMember, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qsPartyMember.setCond(7, true);
}
}
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 1) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 600))
{
if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 600)
{
qs.setCond(2, true);
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 900))
{
if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 900)
{
qs.setCond(2, true);
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else
{
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if (qs != null)
{
if (qs.isCond(2))
{
if (giveItemRandomly(killer, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qs.setCond(5, true);
}
}
if (qs.isCond(3))
{
if (giveItemRandomly(killer, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qs.setCond(6, true);
}
}
if (qs.isCond(4))
{
if (giveItemRandomly(killer, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qs.setCond(7, true);
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@ -0,0 +1,4 @@
<html><body>Leona Blackbird:<br>
Come back later.<br>
(This quest is a daily quest and will be available tomorrow at 6.30am.)
</body></html>

View File

@ -1,4 +1,5 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-02.htm">"NEXT 1"</Button>
A lot of Adventurers have helped us out. Thanks to them, we were able to use Chaos Fragments to interfere with Beleth's plan.<br>
Well, it did work well for a while.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-02.htm">"What happened?"</Button>
</body></html>

View File

@ -1,4 +1,5 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-03.htm">"NEXT 2"</Button>
I'm not sure since when, but the Chaos Fragments from the Phantasmal Ridge started giving off an eerie energy. As time passed, that energy grew stronger, and I asked Devianne to investigate. She said that those Chaos Fragments were much more powerful than the regular ones.<br>
After that, we started calling them High-Grade Chaos Fragments, and we started investigating the reason for the change.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-03.htm">"Go on."</Button>
</body></html>

View File

@ -1,4 +1,5 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"NEXT 3"</Button>
We don't know why those changes happened. It's Beleth's plan to defend himself, by transforming the monsters in the Phantasmal Ridge. They've been trying to get their resources more easily.<br>
We cannot let this go on. If we don't stop them now, all our efforts will be in vain. Could you help me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Leave it to me."</Button>
</body></html>

View File

@ -1,4 +1,9 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Starrt Quest
It's a fortunate thing that such a skilled adventurer as yourself has commited to making yourself available to the cause. Here is your mission. Please select how much you can take on.<br>
Basic Mission - Collect 300 High-grade Chaos Fragments<br>
Intermediate Mission - Collect 600 High-grade Chaos Fragments<br>
Advanced Mission - Collect 900 High-grade Chaos Fragments<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-05.htm">"I'll take the basic mission."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-06.htm">"I'll take the intermediate mission."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-07.htm">"I'll take the advanced mission."</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I see you have chosen the basic mission. You will be required to collect 300 High-grade Chaos Fragments. Once you have made the decision, you will not be given the reward until you complete the mission. Please make sure you have made a careful decision.<br>
Are you sure want to proceed with the mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-05a.htm">"Yes, I've made my decision."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Let me reconsider.."</Button>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Quest Progress
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I understand. You must go to the Phantasmal Ridge and collect 300 High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
So let me see 1, 2... 300 High-grade Fragment of Chaos! This is great!... Here, take your reward...<br>
Come see me tomorrow...
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I see you have chosen the intermediate mission. You will be required to collect 600 High-grade Chaos Fragments. Once you have made the decision, you will not be given the reward until you complete the mission. Please make sure you have made a careful decision.<br>
Are you sure want to proceed with the mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-06a.htm">"Yes, I've made my decision."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Let me reconsider.."</Button>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Quest Condition 2
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-07.html">"NEXT 4"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I understand. You must go to the Phantasmal Ridge and collect 600 High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
Are those 600 High-grade Fragment of Chaos? Wow... Here, take your reward...<br>
Come see me tomorrow...
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I see you have chosen the advanced mission. You will be required to collect 300 High-grade Chaos Fragments. Once you have made the decision, you will not be given the reward until you complete the mission. Please make sure you have made a careful decision.<br>
Are you sure want to proceed with the mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-07a.htm">"Yes, I've made my decision."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00783_VestigeOfTheMagicPower 31595-04.htm">"Let me reconsider.."</Button>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
@TODO Need retail HTML text<br>
Quest Finish
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
I understand. You must go to the Phantasmal Ridge and collect 900 High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
Oh my... I see you brought me 900 High-grade Fragment of Chaos! You are the best... Here, take your reward...<br>
Come see me tomorrow...
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Fire Dragon Bride Leona Blackbird:<br>
Are you still here? You must go to the Phantasmal Ridge and collect High-grade Chaos Fragments.<br>
High-grade Chaos Fragments can be obtained by slaying the Smaug, Lunatikan, Jabberwok, Kanzaroth, Kandiloth, Viper, Kefensis, Slaver, Garion, Garion Neti, Desert Wendigo, Koraza, Bend Beetle. Let us successfully complete the mission and deter Beleth's ambitions.
</body></html>

View File

@ -16,9 +16,11 @@
*/
package quests.Q00783_VestigeOfTheMagicPower;
import java.util.List;
import com.l2jmobius.gameserver.enums.Faction;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
@ -30,7 +32,7 @@ import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter;
/**
* Vestige of the Magic Power (783)
* @URL https://l2wiki.com/Vestige_of_the_Magic_Power
* @author Gigi
* @author Gigi, Iris
*/
public class Q00783_VestigeOfTheMagicPower extends Quest
{
@ -81,6 +83,9 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
{
case "31595-02.htm":
case "31595-03.htm":
case "31595-05.htm":
case "31595-06.htm":
case "31595-07.htm":
{
htmltext = event;
break;
@ -91,35 +96,62 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
htmltext = event;
break;
}
case "31595-07.html":
case "31595-05a.htm":
{
if (qs.isCond(2))
{
if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0)
{
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 100);
giveItems(player, BASIC_SUPPLY_BOX, 1);
addExpAndSp(player, 4845395970L, 11628900);
}
else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) <= 1)
{
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 200);
giveItems(player, INTERMEDIATE_SUPPLY_BOX, 1);
addExpAndSp(player, 9690791940L, 23257800);
}
else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2)
{
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 300);
giveItems(player, ADVANCED_SUPPLY_BOX, 1);
addExpAndSp(player, 14536187910L, 34886700);
}
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
qs.setCond(2, true);
htmltext = event;
break;
}
case "31595-06a.htm":
{
qs.setCond(3, true);
htmltext = event;
break;
}
case "31595-07a.htm":
{
qs.setCond(3, true);
htmltext = event;
break;
}
case "31595-05b.htm":
{
qs.exitQuest(QuestType.DAILY, true);
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 100);
giveItemRandomly(player, BASIC_SUPPLY_BOX, 1, 1, 0.9, false);
giveItemRandomly(player, INTERMEDIATE_SUPPLY_BOX, 1, 1, 0.4, false);
giveItemRandomly(player, ADVANCED_SUPPLY_BOX, 1, 1, 0.2, false);
addExpAndSp(player, 12113489880L, 12113460);
htmltext = event;
break;
}
case "31595-06b.htm":
{
qs.exitQuest(QuestType.DAILY, true);
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 200);
giveItemRandomly(player, BASIC_SUPPLY_BOX, 1, 1, 0.4, false);
giveItemRandomly(player, INTERMEDIATE_SUPPLY_BOX, 1, 1, 0.9, false);
giveItemRandomly(player, ADVANCED_SUPPLY_BOX, 1, 1, 0.2, false);
addExpAndSp(player, 24226979760L, 24226920);
htmltext = event;
break;
}
case "31595-07b.htm":
{
qs.exitQuest(QuestType.DAILY, true);
addFactionPoints(player, Faction.BLACKBIRD_CLAN, 300);
giveItemRandomly(player, BASIC_SUPPLY_BOX, 1, 1, 0.2, false);
giveItemRandomly(player, INTERMEDIATE_SUPPLY_BOX, 1, 1, 0.5, false);
giveItemRandomly(player, ADVANCED_SUPPLY_BOX, 1, 1, 0.9, false);
giveItems(player, ADVANCED_SUPPLY_BOX, 1);
addExpAndSp(player, 36340469640L, 36340380);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
@ -141,12 +173,37 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
{
if (qs.isCond(1))
{
htmltext = "31595-05.html";
htmltext = "31595-04.htm";
}
else if (qs.isCond(2))
else if (qs.isCond(5))
{
htmltext = "31595-06.html";
htmltext = "31595-05b.htm";
onAdvEvent(htmltext, npc, player);
}
else if (qs.isCond(6))
{
htmltext = "31595-06b.htm";
onAdvEvent(htmltext, npc, player);
}
else if (qs.isCond(7))
{
htmltext = "31595-07b.htm";
onAdvEvent(htmltext, npc, player);
}
else if (qs.isCond(2) || qs.isCond(3) || qs.isCond(4))
{
htmltext = "31595-08.htm";
}
break;
}
case State.COMPLETED:
{
if (!qs.isNowAvailable())
{
htmltext = "31595-00a.htm";
break;
}
htmltext = "31595-01.htm";
break;
}
}
@ -157,37 +214,72 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if (qs != null)
if (killer.isInParty())
{
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 300))
final L2Party party = killer.getParty();
final List<L2PcInstance> partyMember = party.getMembers();
for (L2PcInstance singleMember : partyMember)
{
if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 300)
QuestState qsPartyMember = getQuestState(singleMember, false);
double distance = npc.calculateDistance(singleMember, true, false);
if ((qsPartyMember != null) && (distance <= 1000))
{
qs.setCond(2, true);
if (qsPartyMember.isCond(2))
{
if (giveItemRandomly(singleMember, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qsPartyMember.setCond(5, true);
}
}
if (qsPartyMember.isCond(3))
{
if (giveItemRandomly(singleMember, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qsPartyMember.setCond(6, true);
}
}
if (qsPartyMember.isCond(4))
{
if (giveItemRandomly(singleMember, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qsPartyMember.setCond(7, true);
}
}
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 1) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 600))
{
if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 600)
{
qs.setCond(2, true);
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 900))
{
if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 900)
{
qs.setCond(2, true);
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else
{
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if (qs != null)
{
if (qs.isCond(2))
{
if (giveItemRandomly(killer, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qs.setCond(5, true);
}
}
if (qs.isCond(3))
{
if (giveItemRandomly(killer, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qs.setCond(6, true);
}
}
if (qs.isCond(4))
{
if (giveItemRandomly(killer, npc, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1, 300, 1, true))
{
qs.setCond(7, true);
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
}