Updated Vestige of the Magic Power (783).

Contributed by Stayway.
This commit is contained in:
MobiusDev
2017-10-01 21:13:49 +00:00
parent 6a714ee6c9
commit b27b60368e
3 changed files with 97 additions and 60 deletions

View File

@@ -16,6 +16,7 @@
*/ */
package quests.Q00783_VestigeOfTheMagicPower; package quests.Q00783_VestigeOfTheMagicPower;
import com.l2jmobius.gameserver.enums.Faction;
import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType; import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.L2Npc;
@@ -33,9 +34,9 @@ import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter;
*/ */
public class Q00783_VestigeOfTheMagicPower extends Quest public class Q00783_VestigeOfTheMagicPower extends Quest
{ {
// NPC's // NPCs
private static final int LEONA_BLACKBIRD = 31595; private static final int LEONA_BLACKBIRD = 31595;
// Monster's // Monsters
private static final int[] MONSTERS = private static final int[] MONSTERS =
{ {
23384, // Smaug 23384, // Smaug
@@ -52,8 +53,9 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
// Misc // Misc
private static final int MIN_LEVEL = 99; private static final int MIN_LEVEL = 99;
private static final int HIGH_GRADE_FRAGMENT_OF_CHAOS = 46557; private static final int HIGH_GRADE_FRAGMENT_OF_CHAOS = 46557;
private static final int LEONAS_REWARD_BOX = 46558; private static final int BASIC_SUPPLY_BOX = 47356;
private static final int BLOODIED_DEMONIC_TOME = 37893; private static final int INTERMEDIATE_SUPPLY_BOX = 47357;
private static final int ADVANCED_SUPPLY_BOX = 47358;
public Q00783_VestigeOfTheMagicPower() public Q00783_VestigeOfTheMagicPower()
{ {
@@ -91,43 +93,27 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
} }
case "31595-07.html": case "31595-07.html":
{ {
if ((getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) >= 250) && (getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 500)) if (qs.isCond(2))
{ {
addExpAndSp(player, 3876316782L, 9303137); if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0)
giveItems(player, LEONAS_REWARD_BOX, 1); {
takeItems(player, HIGH_GRADE_FRAGMENT_OF_CHAOS, -1); player.addFactionPoints(Faction.BLACKBIRD_CLAN, 100);
giveItems(player, BLOODIED_DEMONIC_TOME, 1); giveItems(player, BASIC_SUPPLY_BOX, 1);
qs.exitQuest(QuestType.REPEATABLE, true); addExpAndSp(player, 4845395970L, 11628900);
htmltext = event; }
break; else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) <= 1)
} {
else if ((getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) >= 500) && (getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 750)) player.addFactionPoints(Faction.BLACKBIRD_CLAN, 200);
{ giveItems(player, INTERMEDIATE_SUPPLY_BOX, 1);
addExpAndSp(player, 7752633564L, 18606274); addExpAndSp(player, 9690791940L, 23257800);
giveItems(player, LEONAS_REWARD_BOX, 2); }
takeItems(player, HIGH_GRADE_FRAGMENT_OF_CHAOS, -1); else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2)
giveItems(player, BLOODIED_DEMONIC_TOME, 1); {
qs.exitQuest(QuestType.REPEATABLE, true); player.addFactionPoints(Faction.BLACKBIRD_CLAN, 300);
htmltext = event; giveItems(player, ADVANCED_SUPPLY_BOX, 1);
break; addExpAndSp(player, 14536187910L, 34886700);
} }
else if ((getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) >= 750) && (getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 1000)) qs.exitQuest(QuestType.DAILY, true);
{
addExpAndSp(player, 11628950346L, 27909411);
giveItems(player, LEONAS_REWARD_BOX, 3);
takeItems(player, HIGH_GRADE_FRAGMENT_OF_CHAOS, -1);
giveItems(player, BLOODIED_DEMONIC_TOME, 1);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
else if (getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) >= 1000)
{
addExpAndSp(player, 15505267128L, 37212548);
giveItems(player, LEONAS_REWARD_BOX, 4);
takeItems(player, HIGH_GRADE_FRAGMENT_OF_CHAOS, -1);
giveItems(player, BLOODIED_DEMONIC_TOME, 1);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event; htmltext = event;
break; break;
} }
@@ -169,21 +155,39 @@ public class Q00783_VestigeOfTheMagicPower extends Quest
} }
@Override @Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{ {
final QuestState qs = getQuestState(player, false); final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if ((qs != null) && qs.isStarted() && (getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 1000)) if (qs != null)
{ {
giveItems(player, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1); if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 300))
if (getQuestItemsCount(player, HIGH_GRADE_FRAGMENT_OF_CHAOS) >= 250)
{ {
qs.setCond(2, true); if (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) == 300)
{
qs.setCond(2, true);
}
giveItems(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
} }
else if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 1) && (getQuestItemsCount(killer, HIGH_GRADE_FRAGMENT_OF_CHAOS) < 600))
{ {
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); 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);
} }
} }
return super.onKill(npc, player, isSummon); return super.onKill(npc, killer, isSummon);
} }
} }

View File

@@ -695,7 +695,7 @@
<set name="is_private_storeable" val="false" /> <set name="is_private_storeable" val="false" />
<capsuled_items> <capsuled_items>
<item id="37893" min="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome --> <item id="37893" min="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="3" max="1" chance="100" /> <!-- Demon Crystal --> <item id="47256" min="3" max="3" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="1" max="1" chance="100" /> <!-- Sealed Demonic Tome --> <item id="37791" min="1" max="1" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items> </capsuled_items>
</item> </item>
@@ -716,8 +716,8 @@
<set name="is_private_storeable" val="false" /> <set name="is_private_storeable" val="false" />
<capsuled_items> <capsuled_items>
<item id="37893" min="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome --> <item id="37893" min="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="3" max="6" chance="100" /> <!-- Demon Crystal --> <item id="47256" min="6" max="6" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="2" max="1" chance="100" /> <!-- Sealed Demonic Tome --> <item id="37791" min="2" max="2" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items> </capsuled_items>
</item> </item>
<item id="47174" name="Advanced Supply Box" additionalName="Blackbird Clan" type="EtcItem"> <item id="47174" name="Advanced Supply Box" additionalName="Blackbird Clan" type="EtcItem">
@@ -737,8 +737,8 @@
<set name="is_private_storeable" val="false" /> <set name="is_private_storeable" val="false" />
<capsuled_items> <capsuled_items>
<item id="37893" min="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome --> <item id="37893" min="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="9" max="6" chance="100" /> <!-- Demon Crystal --> <item id="47256" min="9" max="9" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="4" max="1" chance="100" /> <!-- Sealed Demonic Tome --> <item id="37791" min="4" max="4" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items> </capsuled_items>
</item> </item>
<item id="47175" name="Basic Supply Box" additionalName="Kingdom's Royal Guard" type="EtcItem"> <item id="47175" name="Basic Supply Box" additionalName="Kingdom's Royal Guard" type="EtcItem">

View File

@@ -858,32 +858,65 @@
<item id="47356" name="Basic Supply Box" additionalName="Blackbird Clan" type="EtcItem"> <item id="47356" name="Basic Supply Box" additionalName="Blackbird Clan" type="EtcItem">
<!-- A basic supply box received in exchange for helping the Blackbird Clan with their mission in the Phantasmal Ridge's Magic Circle area. Double click to view the item. --> <!-- A basic supply box received in exchange for helping the Blackbird Clan with their mission in the Phantasmal Ridge's Magic Circle area. Double click to view the item. -->
<set name="icon" val="icon.etc_readybox_bronze" /> <set name="icon" val="icon.etc_readybox_bronze" />
<set name="default_action" val="SKILL_REDUCE" /> <set name="default_action" val="PEEL" />
<set name="immediate_effect" val="true" />
<set name="is_tradable" val="false" /> <set name="is_tradable" val="false" />
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <set name="is_stackable" val="true" />
<set name="is_premium" val="true" />
<set name="handler" val="ExtractableItems" />
<set name="is_clan_depositable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_commissionable" val="false" />
<set name="is_private_storeable" val="false" />
<capsuled_items>
<item id="37893" min="2" max="2" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="3" max="3" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="1" max="1" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items>
</item> </item>
<item id="47357" name="Intermediate Supply Box" additionalName="Blackbird Clan" type="EtcItem"> <item id="47357" name="Intermediate Supply Box" additionalName="Blackbird Clan" type="EtcItem">
<!-- An intermediate supply box received in exchange for helping the Blackbird Clan with their mission at the Phantasmal Ridge. Double click to view the item. --> <!-- An intermediate supply box received in exchange for helping the Blackbird Clan with their mission at the Phantasmal Ridge. Double click to view the item. -->
<set name="icon" val="icon.etc_readybox_silver" /> <set name="icon" val="icon.etc_readybox_silver" />
<set name="default_action" val="SKILL_REDUCE" /> <set name="default_action" val="PEEL" />
<set name="immediate_effect" val="true" />
<set name="is_tradable" val="false" /> <set name="is_tradable" val="false" />
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <set name="is_stackable" val="true" />
<set name="is_premium" val="true" />
<set name="handler" val="ExtractableItems" />
<set name="is_clan_depositable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_commissionable" val="false" />
<set name="is_private_storeable" val="false" />
<capsuled_items>
<item id="37893" min="2" max="2" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="6" max="6" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="1" max="1" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items>
</item> </item>
<item id="47358" name="Advanced Supply Box" additionalName="Blackbird Clan" type="EtcItem"> <item id="47358" name="Advanced Supply Box" additionalName="Blackbird Clan" type="EtcItem">
<!-- An advanced supply box received in exchange for helping the Blackbird Clan with their mission at the Phantasmal Ridge. Double click to view the item. --> <!-- An advanced supply box received in exchange for helping the Blackbird Clan with their mission at the Phantasmal Ridge. Double click to view the item. -->
<set name="icon" val="icon.etc_readybox_gold" /> <set name="icon" val="icon.etc_readybox_gold" />
<set name="default_action" val="SKILL_REDUCE" /> <set name="default_action" val="PEEL" />
<set name="immediate_effect" val="true" />
<set name="is_tradable" val="false" /> <set name="is_tradable" val="false" />
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <set name="is_stackable" val="true" />
<set name="is_premium" val="true" />
<set name="handler" val="ExtractableItems" />
<set name="is_clan_depositable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_commissionable" val="false" />
<set name="is_private_storeable" val="false" />
<capsuled_items>
<item id="37893" min="2" max="2" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="9" max="9" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="3" max="3" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items>
</item> </item>
<item id="47359" name="Basic Supply Box" additionalName="Giant Trackers" type="EtcItem"> <item id="47359" name="Basic Supply Box" additionalName="Giant Trackers" type="EtcItem">
<!-- A basic supply box received in exchange for helping the Giant Trackers with their mission in the lower level of the Giant's Cave. Double click to view the item. --> <!-- A basic supply box received in exchange for helping the Giant Trackers with their mission in the lower level of the Giant's Cave. Double click to view the item. -->