Updated Retrieving the Fragment of Chaos (775).

Contributed by Stayway.
This commit is contained in:
MobiusDev 2017-10-01 20:31:03 +00:00
parent 198cf8bf13
commit 01cbfb43ea
2 changed files with 120 additions and 59 deletions

View File

@ -16,6 +16,7 @@
*/
package quests.Q00775_RetrievingTheChaosFragment;
import com.l2jmobius.gameserver.enums.Faction;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
@ -33,9 +34,9 @@ import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter;
*/
public class Q00775_RetrievingTheChaosFragment extends Quest
{
// NPC's
// NPCs
private static final int LEONA_BLACKBIRD = 31595;
// Monster's
// Monsters
private static final int[] MONSTERS =
{
23388, // Kandiloth
@ -66,8 +67,9 @@ public class Q00775_RetrievingTheChaosFragment extends Quest
private static final int MIN_LEVEL = 99;
// Item
private static final int CHAOS_FRAGMENT = 37766;
private static final int BLOODIED_DEMONIC_TOME = 37893;
private static final int LEONAS_REWARD_BOX = 46559;
private static final int BASIC_SUPPLY_BOX = 47172;
private static final int INTERMEDIATE_SUPPLY_BOX = 47173;
private static final int ADVANCED_SUPPLY_BOX = 47174;
public Q00775_RetrievingTheChaosFragment()
{
@ -104,50 +106,30 @@ public class Q00775_RetrievingTheChaosFragment extends Quest
}
case "31595-03.html":
{
if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 200) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 300))
if (qs.isCond(2))
{
giveItems(player, LEONAS_REWARD_BOX, 1);
if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0)
{
player.addFactionPoints(Faction.BLACKBIRD_CLAN, 100);
giveItems(player, BASIC_SUPPLY_BOX, 1);
addExpAndSp(player, 4522369500L, 10853640);
}
else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) <= 1)
{
player.addFactionPoints(Faction.BLACKBIRD_CLAN, 200);
giveItems(player, INTERMEDIATE_SUPPLY_BOX, 1);
addExpAndSp(player, 9044739000L, 21707280);
}
else if (player.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2)
{
player.addFactionPoints(Faction.BLACKBIRD_CLAN, 300);
giveItems(player, ADVANCED_SUPPLY_BOX, 1);
addExpAndSp(player, 13567108500L, 32560920);
}
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 300) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 400))
{
giveItems(player, LEONAS_REWARD_BOX, 2);
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 400) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 500))
{
giveItems(player, LEONAS_REWARD_BOX, 3);
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 500) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 600))
{
giveItems(player, LEONAS_REWARD_BOX, 4);
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 600) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 700))
{
giveItems(player, LEONAS_REWARD_BOX, 5);
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 700) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 800))
{
giveItems(player, LEONAS_REWARD_BOX, 6);
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 800) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 900))
{
giveItems(player, LEONAS_REWARD_BOX, 7);
}
else if ((getQuestItemsCount(player, CHAOS_FRAGMENT) >= 900) && (getQuestItemsCount(player, CHAOS_FRAGMENT) < 1000))
{
giveItems(player, LEONAS_REWARD_BOX, 8);
}
else if (getQuestItemsCount(player, CHAOS_FRAGMENT) >= 1000)
{
giveItems(player, LEONAS_REWARD_BOX, 900);
}
if (getRandom(100) < 50)
{
giveItems(player, BLOODIED_DEMONIC_TOME, 1);
}
addExpAndSp(player, 463097250, 111143);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
}
return htmltext;
@ -209,14 +191,35 @@ public class Q00775_RetrievingTheChaosFragment extends Quest
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if ((qs != null) && qs.isStarted() && (getQuestItemsCount(killer, CHAOS_FRAGMENT) < 1000))
if (qs != null)
{
if (getQuestItemsCount(killer, CHAOS_FRAGMENT) == 100)
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) == 0) && (getQuestItemsCount(killer, CHAOS_FRAGMENT) < 250))
{
qs.setCond(2, true);
if (getQuestItemsCount(killer, CHAOS_FRAGMENT) == 250)
{
qs.setCond(2, true);
}
giveItems(killer, CHAOS_FRAGMENT, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 1) && (getQuestItemsCount(killer, CHAOS_FRAGMENT) < 500))
{
if (getQuestItemsCount(killer, CHAOS_FRAGMENT) == 500)
{
qs.setCond(2, true);
}
giveItems(killer, CHAOS_FRAGMENT, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if ((killer.getFactionLevel(Faction.BLACKBIRD_CLAN) >= 2) && (getQuestItemsCount(killer, CHAOS_FRAGMENT) < 750))
{
if (getQuestItemsCount(killer, CHAOS_FRAGMENT) == 750)
{
qs.setCond(2, true);
}
giveItems(killer, CHAOS_FRAGMENT, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
giveItems(killer, CHAOS_FRAGMENT, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
return super.onKill(npc, killer, isSummon);
}

View File

@ -681,32 +681,65 @@
<item id="47172" 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 Beleth's Magic Circle area. Double click to view the item. -->
<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_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<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="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="3" max="1" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="1" max="1" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items>
</item>
<item id="47173" name="Intermediate Supply Box" additionalName="Blackbird Clan" type="EtcItem">
<!-- An intermediate supply box received in exchange for helping the Blackbird Clan with their mission in the Beleth's Magic Circle area. Double click to view the item. -->
<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_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<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="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="3" max="6" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="2" max="1" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items>
</item>
<item id="47174" name="Advanced Supply Box" additionalName="Blackbird Clan" type="EtcItem">
<!-- An advanced supply box received in exchange for helping the Blackbird Clan with their mission in the Beleth's Magic Circle area. Double click to view the item. -->
<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_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<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="1" max="1" chance="100" /> <!-- Bloodied Demonic Tome -->
<item id="47256" min="9" max="6" chance="100" /> <!-- Demon Crystal -->
<item id="37791" min="4" max="1" chance="100" /> <!-- Sealed Demonic Tome -->
</capsuled_items>
</item>
<item id="47175" name="Basic Supply Box" additionalName="Kingdom's Royal Guard" type="EtcItem">
<!-- A basic supply box received in exchange for helping the Kingdom's Royal Guard with their mission at Atelia Fortress. Double click to view the item. -->
@ -801,12 +834,37 @@
<item id="47184" name="Basic Supply Box" additionalName="Giant Trackers" type="EtcItem">
<!-- A basic supply box received in exchange for helping the Giant Trackers with their mission at the upper level of the Giant's Cave. Double click to view the item. -->
<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_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<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="47260" min="1" max="1" chance="100" /> <!-- Giant Crystal -->
<item id="35330" min="1" max="1" chance="100" /> <!-- Helios Avenger Fragment -->
<item id="35335" min="1" max="1" chance="100" /> <!-- Helios Buster Fragment -->
<item id="35336" min="1" max="1" chance="100" /> <!-- Helios Caster Fragment -->
<item id="35328" min="1" max="1" chance="100" /> <!-- Helios Cutter Fragment -->
<item id="35331" min="1" max="1" chance="100" /> <!-- Helios Fighter Fragment -->
<item id="35337" min="1" max="1" chance="100" /> <!-- Helios Retributer Fragment -->
<item id="35327" min="1" max="1" chance="100" /> <!-- Helios Shaper Fragment -->
<item id="35334" min="1" max="1" chance="100" /> <!-- Helios Shooter Fragment -->
<item id="35329" min="1" max="1" chance="100" /> <!-- Helios Slasher Fragment -->
<item id="35332" min="1" max="1" chance="100" /> <!-- Helios Stormer Fragment -->
<item id="35333" min="1" max="1" chance="100" /> <!-- Helios Thrower Fragment -->
<item id="30297" min="1" max="1" chance="100" /> <!-- Superior Giant's Codex -->
<item id="30299" min="1" max="1" chance="100" /> <!-- Superior Giant's Codex - Discipline -->
<item id="30298" min="1" max="1" chance="100" /> <!-- Superior Giant's Codex - Mastery -->
<item id="36549" min="1" max="1" chance="100" /> <!-- Weapon Fragment (High-grade) -->
<item id="36548" min="1" max="1" chance="100" /> <!-- Weapon Fragment (Mid-grade) -->
</capsuled_items>
</item>
<item id="47185" name="Intermediate Supply Box" additionalName="Giant Trackers" type="EtcItem">
<!-- An intermediate supply box received in exchange for helping the Giant Trackers with their mission in the upper level of the Giant's Cave. Double click to view the item. -->