Addition of quest Brothers Bound in Chains (500).
This commit is contained in:
parent
e68e64b041
commit
217033f77e
@ -1,4 +1,3 @@
|
||||
500 Brothers Bound in Chains
|
||||
630 Pirate Treasure Hunt
|
||||
657 Monster Arena: Trial for Warriors
|
||||
658 Monster Arena: Trial for Elite Warriors
|
||||
|
@ -0,0 +1,5 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
I may look like this now, but I was once an angel of light. But the light was put to sleep, and darkness filled the lands... we fought, all of us angels, but it was a losing battle. Then, when I was growing weary, the god of chaos beckoned. "Chaos is the ultimate peace and silence," he whispered, and I did not have the strength to resist him.<br>
|
||||
But I ended up regretting my decision in the end. So I made another deal with the god of chaos; I would bring him enough "sins" to cancel out my own. So here's my offer to you: I will buy your sin. After all, penitence is the only path to light. Will you accept?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-02.htm">"Yes, I want penitence."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Do you wish to return to the light? Then you, too, must bring back enough sens to cancel out your own. To that end, you need tangible evidence for your penitence.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-03.htm">"How do I get this tangible eidence?"</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
The evidence is called <font color="LEVEL">Crumbs of Penitence</font>, and you can get them through Sin Eater summoned with Penitent's Menacles. I can make Penitent's Manacles for you if you bring <font color="LEVEL">30 Gemstones (B-Grade)</font> from the village merchant.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-04.htm">"Here are the Gemstones (B-Grade)."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
I will give you <font color="LEVEL">Penitent's Manacles</font> so that you can summon the Sin Eater. Summoning the Sin Eater begins the <font color="LEVEL">Hour of Penitence</font>, during which you can obtain <font color="LEVEL">Crumbs of Penitence</font> by defeating as many monsters as possible. Bring me <font color="LEVEL">35 Crumbs of Penitence</font>, and I will free you of your sin.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-06.htm">"I will be back with Crumbs of Penitence."</Button>
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
It seems you don't have enough <font color="LEVEL">Gemstone (B-Grade)</font>. You can get them from a village grocer. Remember, you need <font color="LEVEL">30</font> of them.
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Do not tarry; bring me 35 <font color="LEVEL">Crumbs of Penitence</font> so that I can free you from your sin. But remember, bringing more than 35 will do no good, for not all sins can be cleared in one day.
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
It seems you don't have enough <font color="LEVEL">Crumbs of Penitence</font> yet. Did you forget how to obtain them Equip the <font color="LEVEL">Penitent's Manacles</font> I have given you, summon Sin Eater, and defeat as many monsters as you can during the <font color="LEVEL">Hour of Penitence</font>. You need 35 <font color="LEVEL">Crumbs of Penitence</font> obtained from the battle.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
What did you learn while gathering <font color="LEVEL">Crumbs of Penitence</font>? Committing sin is easy, but reversing it is much less so. Never forget that every choice has consequence. Now, give me what you have gathered, and the Penitent's Manacles. I will clear away your sin.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-09.html">"Here are the Crumbs of Penitence and the Penitent's Manacles."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Now, your sins are forgiven. But not all sins can be forgiven in a day; there is only so much I can forgive today.<br>
|
||||
Never forget the regret and suffering you went through for your mistakes.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Black Judge:<br>
|
||||
Everyone commits sin, whether great or small. And when the sin becomes great, you move away from the light until you become darkness. Sin is close to your nature, and can only be eliminated when your soul is string. Come again sometime, and I will help you step closer to the light.<br>
|
||||
(This quest is available only to main class characters who have a PK count above 0.)
|
||||
</body></html>
|
@ -0,0 +1,216 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package quests.Q00500_BrothersBoundInChains;
|
||||
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.QuestType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius (Based on GoD quest.)
|
||||
* @URL https://l2wiki.com/classic/Brothers_Bound_in_Chains
|
||||
*/
|
||||
public class Q00500_BrothersBoundInChains extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int DARK_JUDGE = 30981;
|
||||
// Items
|
||||
private static final int GEMSTONE_B = 2132;
|
||||
private static final int PENITENT_MANACLES = 70806;
|
||||
private static final int CRUMBS_OF_PENITENCE = 70807;
|
||||
// Skill
|
||||
private static final int HOUR_OF_PENITENCE = 55702;
|
||||
// Agathion
|
||||
private static final int SIN_EATER = 9021;
|
||||
// Other
|
||||
private static final String KILL_COUNT_VAR = "killCount";
|
||||
|
||||
public Q00500_BrothersBoundInChains()
|
||||
{
|
||||
super(500);
|
||||
addStartNpc(DARK_JUDGE);
|
||||
addTalkId(DARK_JUDGE);
|
||||
addSummonAgathion();
|
||||
registerQuestItems(PENITENT_MANACLES, CRUMBS_OF_PENITENCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "buff":
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(15325, 1); // Hour of Penitence
|
||||
skill.activateSkill(player, player);
|
||||
startQuestTimer("buff", 270000, null, player); // Rebuff every 4min30 (retail like)
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "30981-02.htm":
|
||||
case "30981-03.htm":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "30981-04.htm":
|
||||
{
|
||||
if (getQuestItemsCount(player, GEMSTONE_B) >= 30)
|
||||
{
|
||||
takeItems(player, GEMSTONE_B, 30);
|
||||
giveItems(player, PENITENT_MANACLES, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
event = "30981-05.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30981-06.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30981-09.html": // not retail html.
|
||||
{
|
||||
if (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)
|
||||
{
|
||||
takeItems(player, CRUMBS_OF_PENITENCE, -1);
|
||||
player.setPkKills(Math.max(0, player.getPkKills() - Rnd.get(1, 3)));
|
||||
qs.unset(KILL_COUNT_VAR);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If player delete QuestItems: Need check how it work on retail.
|
||||
qs.setCond(1);
|
||||
event = "30981-07.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
event = getNoQuestMsg(player);
|
||||
}
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance talker)
|
||||
{
|
||||
final QuestState qs = getQuestState(talker, true);
|
||||
String htmltext = getNoQuestMsg(talker);
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (talker.getPkKills() > 0) && (talker.getReputation() >= 0) ? "30981-01.htm" : "30981-nopk.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "30981-07.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
htmltext = "30981-08.html"; // not retail html.
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (qs.isNowAvailable())
|
||||
{
|
||||
qs.setState(State.CREATED);
|
||||
htmltext = "30981-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSummonAgathion(L2PcInstance player, int agathionId)
|
||||
{
|
||||
if (SIN_EATER == agathionId)
|
||||
{
|
||||
startQuestTimer("buff", 2500, null, player);
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_MONSTERS)
|
||||
public void onAttackableKill(OnAttackableKill event)
|
||||
{
|
||||
final QuestState qs = getQuestState(event.getAttacker(), false);
|
||||
if (qs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getAttacker().getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE))
|
||||
{
|
||||
// The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs.
|
||||
final int killCount = qs.getInt(KILL_COUNT_VAR);
|
||||
if (killCount >= 20)
|
||||
{
|
||||
// Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail)
|
||||
giveItems(event.getAttacker(), CRUMBS_OF_PENITENCE, 1);
|
||||
qs.set(KILL_COUNT_VAR, 0);
|
||||
|
||||
if (!qs.isCond(2) && (getQuestItemsCount(event.getAttacker(), CRUMBS_OF_PENITENCE) >= 35))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.set(KILL_COUNT_VAR, killCount + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -144,6 +144,7 @@ import quests.Q00415_PathOfTheOrcMonk.Q00415_PathOfTheOrcMonk;
|
||||
import quests.Q00416_PathOfTheOrcShaman.Q00416_PathOfTheOrcShaman;
|
||||
import quests.Q00417_PathOfTheScavenger.Q00417_PathOfTheScavenger;
|
||||
import quests.Q00418_PathOfTheArtisan.Q00418_PathOfTheArtisan;
|
||||
import quests.Q00500_BrothersBoundInChains.Q00500_BrothersBoundInChains;
|
||||
import quests.Q00662_AGameOfCards.Q00662_AGameOfCards;
|
||||
import quests.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss;
|
||||
import quests.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss;
|
||||
@ -314,6 +315,7 @@ public class QuestMasterHandler
|
||||
Q00416_PathOfTheOrcShaman.class,
|
||||
Q00417_PathOfTheScavenger.class,
|
||||
Q00418_PathOfTheArtisan.class,
|
||||
Q00500_BrothersBoundInChains.class,
|
||||
Q00662_AGameOfCards.class,
|
||||
Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.class,
|
||||
Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.class,
|
||||
|
@ -62,22 +62,37 @@
|
||||
<!-- Bracelet used to summon Sin Eater Agathion and to activate Hour of Penitence. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
|
||||
<set name="icon" val="icon.etc_leash_i00" />
|
||||
<set name="default_action" val="EQUIP" />
|
||||
<set name="bodypart" val="lbracelet" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="material" val="SILVER" />
|
||||
<set name="weight" val="100" />
|
||||
<set name="is_clan_depositable" val="false" />
|
||||
<set name="is_mailable" val="false" />
|
||||
<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_commissionable" val="false" />
|
||||
<set name="is_private_storeable" val="false" />
|
||||
<set name="bodypart" val="lbracelet" />
|
||||
<set name="is_oly_restricted" val="true" />
|
||||
<set name="useSkillDisTime" val="10" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="weight" val="100" />
|
||||
<skills>
|
||||
<skill id="55701" level="1" /> <!-- Release Agathion's Seal - Sin Eater -->
|
||||
<skill id="3267" level="1" type="ON_UNEQUIP" /> <!-- Seal Agathion -->
|
||||
</skills>
|
||||
</item>
|
||||
<item id="70807" name="Crumbs of Penitence" type="EtcItem">
|
||||
<!-- Item that drops from monster if it is killed during the Hour of Penitence. Bring it to Dark Judge and lower your PC count. -->
|
||||
<set name="icon" val="icon.etc_powder_white_i00" />
|
||||
<set name="is_depositable" val="false" />
|
||||
<set name="is_clan_depositable" val="false" />
|
||||
<set name="is_mailable" val="false" />
|
||||
<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_commissionable" val="false" />
|
||||
<set name="is_private_storeable" val="false" />
|
||||
<set name="is_questitem" val="true" />
|
||||
<set name="is_oly_restricted" val="true" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="is_stackable" val="true" />
|
||||
</item>
|
||||
<item id="70808" name="Giant's Treasure Chest" type="EtcItem">
|
||||
|
@ -399,4 +399,32 @@
|
||||
<height normal="25" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="9021" level="55" type="L2Npc" name="Sin Eater">
|
||||
<!-- AUTO GENERATED NPC TODO: FIX IT -->
|
||||
<race>DEMONIC</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
<vitals hp="1673" hpRegen="6.5" mp="889" mpRegen="2.4" />
|
||||
<speed>
|
||||
<walk ground="45" />
|
||||
<run ground="180" />
|
||||
</speed>
|
||||
<attack physical="388.11142" magical="265.02979" critical="4" attackSpeed="253" range="40" type="FIST" distance="80" width="120" random="5" accuracy="5" />
|
||||
<defence physical="223.6362" magical="163.64727" />
|
||||
<attribute>
|
||||
<defence fire="20" water="20" wind="20" earth="20" holy="20" dark="20" />
|
||||
</attribute>
|
||||
<abnormalResist physical="0" magical="0" />
|
||||
</stats>
|
||||
<status attackable="false" undying="false" />
|
||||
<skillList>
|
||||
<skill id="4416" level="9" /> <!-- Demons -->
|
||||
<skill id="4415" level="1" /> <!-- Bare Hands -->
|
||||
</skillList>
|
||||
<shots soul="2" spirit="2" />
|
||||
<collision>
|
||||
<radius normal="2" />
|
||||
<height normal="1" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
||||
|
@ -4,11 +4,39 @@
|
||||
<!-- Summon Sin Eater Agathion. -->
|
||||
<icon>icon.etc_summon_aga_agit_i00</icon>
|
||||
<operateType>A1</operateType>
|
||||
<isMagic>2</isMagic> <!-- Static Skill -->
|
||||
<hitTime>3000</hitTime>
|
||||
<magicCriticalRate>5</magicCriticalRate>
|
||||
<hitCancelTime>0</hitCancelTime>
|
||||
<magicLvl>1</magicLvl>
|
||||
<reuseDelay>5000</reuseDelay>
|
||||
<targetType>SELF</targetType>
|
||||
<affectScope>SINGLE</affectScope>
|
||||
<conditions>
|
||||
<condition name="OpMainjob" />
|
||||
</conditions>
|
||||
<effects>
|
||||
<effect name="SummonAgathion">
|
||||
<npcId>9021</npcId> <!-- Sin Eater -->
|
||||
</effect>
|
||||
</effects>
|
||||
</skill>
|
||||
<skill id="55702" toLevel="1" name="Hour of Penitence">
|
||||
<!-- Hour of Penitence - 5 hours. Within this time monsters must be defeated and Crumbs of Penitence must be collected (Monsters that are 5 lvl lower than the character are not counted). Activates when Sin Eater is summoned. <Warning!> Removing the bracelet will end the Hour of Penitence. Remains after death. -->
|
||||
<icon>icon.etc_leash_i00</icon>
|
||||
<operateType>A1</operateType>
|
||||
<operateType>A2</operateType>
|
||||
<abnormalType>EXP_BOTTLE</abnormalType>
|
||||
<basicProperty>NONE</basicProperty>
|
||||
<magicCriticalRate>-5</magicCriticalRate>
|
||||
<specialLevel>-1</specialLevel>
|
||||
<hitCancelTime>0</hitCancelTime>
|
||||
<magicLvl>1</magicLvl>
|
||||
<abnormalLvl>1</abnormalLvl>
|
||||
<abnormalTime>300</abnormalTime>
|
||||
<irreplacableBuff>true</irreplacableBuff>
|
||||
<isMagic>4</isMagic>
|
||||
<targetType>SELF</targetType>
|
||||
<affectScope>SINGLE</affectScope>
|
||||
</skill>
|
||||
<skill id="55703" toLevel="1" name="Blessed Scroll: Enchant Weapon (A-grade)">
|
||||
<operateType>A1</operateType>
|
||||
|
@ -1,4 +1,3 @@
|
||||
500 Brothers Bound in Chains
|
||||
630 Pirate Treasure Hunt
|
||||
657 Monster Arena: Trial for Warriors
|
||||
658 Monster Arena: Trial for Elite Warriors
|
||||
|
@ -0,0 +1,5 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
I may look like this now, but I was once an angel of light. But the light was put to sleep, and darkness filled the lands... we fought, all of us angels, but it was a losing battle. Then, when I was growing weary, the god of chaos beckoned. "Chaos is the ultimate peace and silence," he whispered, and I did not have the strength to resist him.<br>
|
||||
But I ended up regretting my decision in the end. So I made another deal with the god of chaos; I would bring him enough "sins" to cancel out my own. So here's my offer to you: I will buy your sin. After all, penitence is the only path to light. Will you accept?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-02.htm">"Yes, I want penitence."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Do you wish to return to the light? Then you, too, must bring back enough sens to cancel out your own. To that end, you need tangible evidence for your penitence.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-03.htm">"How do I get this tangible eidence?"</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
The evidence is called <font color="LEVEL">Crumbs of Penitence</font>, and you can get them through Sin Eater summoned with Penitent's Menacles. I can make Penitent's Manacles for you if you bring <font color="LEVEL">30 Gemstones (B-Grade)</font> from the village merchant.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-04.htm">"Here are the Gemstones (B-Grade)."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
I will give you <font color="LEVEL">Penitent's Manacles</font> so that you can summon the Sin Eater. Summoning the Sin Eater begins the <font color="LEVEL">Hour of Penitence</font>, during which you can obtain <font color="LEVEL">Crumbs of Penitence</font> by defeating as many monsters as possible. Bring me <font color="LEVEL">35 Crumbs of Penitence</font>, and I will free you of your sin.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-06.htm">"I will be back with Crumbs of Penitence."</Button>
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
It seems you don't have enough <font color="LEVEL">Gemstone (B-Grade)</font>. You can get them from a village grocer. Remember, you need <font color="LEVEL">30</font> of them.
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Do not tarry; bring me 35 <font color="LEVEL">Crumbs of Penitence</font> so that I can free you from your sin. But remember, bringing more than 35 will do no good, for not all sins can be cleared in one day.
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
It seems you don't have enough <font color="LEVEL">Crumbs of Penitence</font> yet. Did you forget how to obtain them Equip the <font color="LEVEL">Penitent's Manacles</font> I have given you, summon Sin Eater, and defeat as many monsters as you can during the <font color="LEVEL">Hour of Penitence</font>. You need 35 <font color="LEVEL">Crumbs of Penitence</font> obtained from the battle.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
What did you learn while gathering <font color="LEVEL">Crumbs of Penitence</font>? Committing sin is easy, but reversing it is much less so. Never forget that every choice has consequence. Now, give me what you have gathered, and the Penitent's Manacles. I will clear away your sin.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-09.html">"Here are the Crumbs of Penitence and the Penitent's Manacles."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Now, your sins are forgiven. But not all sins can be forgiven in a day; there is only so much I can forgive today.<br>
|
||||
Never forget the regret and suffering you went through for your mistakes.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Black Judge:<br>
|
||||
Everyone commits sin, whether great or small. And when the sin becomes great, you move away from the light until you become darkness. Sin is close to your nature, and can only be eliminated when your soul is string. Come again sometime, and I will help you step closer to the light.<br>
|
||||
(This quest is available only to main class characters who have a PK count above 0.)
|
||||
</body></html>
|
@ -0,0 +1,216 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package quests.Q00500_BrothersBoundInChains;
|
||||
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.QuestType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius (Based on GoD quest.)
|
||||
* @URL https://l2wiki.com/classic/Brothers_Bound_in_Chains
|
||||
*/
|
||||
public class Q00500_BrothersBoundInChains extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int DARK_JUDGE = 30981;
|
||||
// Items
|
||||
private static final int GEMSTONE_B = 2132;
|
||||
private static final int PENITENT_MANACLES = 70806;
|
||||
private static final int CRUMBS_OF_PENITENCE = 70807;
|
||||
// Skill
|
||||
private static final int HOUR_OF_PENITENCE = 55702;
|
||||
// Agathion
|
||||
private static final int SIN_EATER = 9021;
|
||||
// Other
|
||||
private static final String KILL_COUNT_VAR = "killCount";
|
||||
|
||||
public Q00500_BrothersBoundInChains()
|
||||
{
|
||||
super(500);
|
||||
addStartNpc(DARK_JUDGE);
|
||||
addTalkId(DARK_JUDGE);
|
||||
addSummonAgathion();
|
||||
registerQuestItems(PENITENT_MANACLES, CRUMBS_OF_PENITENCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "buff":
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(15325, 1); // Hour of Penitence
|
||||
skill.activateSkill(player, player);
|
||||
startQuestTimer("buff", 270000, null, player); // Rebuff every 4min30 (retail like)
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "30981-02.htm":
|
||||
case "30981-03.htm":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "30981-04.htm":
|
||||
{
|
||||
if (getQuestItemsCount(player, GEMSTONE_B) >= 30)
|
||||
{
|
||||
takeItems(player, GEMSTONE_B, 30);
|
||||
giveItems(player, PENITENT_MANACLES, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
event = "30981-05.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30981-06.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30981-09.html": // not retail html.
|
||||
{
|
||||
if (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)
|
||||
{
|
||||
takeItems(player, CRUMBS_OF_PENITENCE, -1);
|
||||
player.setPkKills(Math.max(0, player.getPkKills() - Rnd.get(1, 3)));
|
||||
qs.unset(KILL_COUNT_VAR);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If player delete QuestItems: Need check how it work on retail.
|
||||
qs.setCond(1);
|
||||
event = "30981-07.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
event = getNoQuestMsg(player);
|
||||
}
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance talker)
|
||||
{
|
||||
final QuestState qs = getQuestState(talker, true);
|
||||
String htmltext = getNoQuestMsg(talker);
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (talker.getPkKills() > 0) && (talker.getReputation() >= 0) ? "30981-01.htm" : "30981-nopk.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "30981-07.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
htmltext = "30981-08.html"; // not retail html.
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (qs.isNowAvailable())
|
||||
{
|
||||
qs.setState(State.CREATED);
|
||||
htmltext = "30981-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSummonAgathion(L2PcInstance player, int agathionId)
|
||||
{
|
||||
if (SIN_EATER == agathionId)
|
||||
{
|
||||
startQuestTimer("buff", 2500, null, player);
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_MONSTERS)
|
||||
public void onAttackableKill(OnAttackableKill event)
|
||||
{
|
||||
final QuestState qs = getQuestState(event.getAttacker(), false);
|
||||
if (qs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getAttacker().getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE))
|
||||
{
|
||||
// The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs.
|
||||
final int killCount = qs.getInt(KILL_COUNT_VAR);
|
||||
if (killCount >= 20)
|
||||
{
|
||||
// Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail)
|
||||
giveItems(event.getAttacker(), CRUMBS_OF_PENITENCE, 1);
|
||||
qs.set(KILL_COUNT_VAR, 0);
|
||||
|
||||
if (!qs.isCond(2) && (getQuestItemsCount(event.getAttacker(), CRUMBS_OF_PENITENCE) >= 35))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.set(KILL_COUNT_VAR, killCount + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -144,6 +144,7 @@ import quests.Q00415_PathOfTheOrcMonk.Q00415_PathOfTheOrcMonk;
|
||||
import quests.Q00416_PathOfTheOrcShaman.Q00416_PathOfTheOrcShaman;
|
||||
import quests.Q00417_PathOfTheScavenger.Q00417_PathOfTheScavenger;
|
||||
import quests.Q00418_PathOfTheArtisan.Q00418_PathOfTheArtisan;
|
||||
import quests.Q00500_BrothersBoundInChains.Q00500_BrothersBoundInChains;
|
||||
import quests.Q00662_AGameOfCards.Q00662_AGameOfCards;
|
||||
import quests.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss;
|
||||
import quests.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss;
|
||||
@ -314,6 +315,7 @@ public class QuestMasterHandler
|
||||
Q00416_PathOfTheOrcShaman.class,
|
||||
Q00417_PathOfTheScavenger.class,
|
||||
Q00418_PathOfTheArtisan.class,
|
||||
Q00500_BrothersBoundInChains.class,
|
||||
Q00662_AGameOfCards.class,
|
||||
Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.class,
|
||||
Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.class,
|
||||
|
@ -62,22 +62,37 @@
|
||||
<!-- Bracelet used to summon Sin Eater Agathion and to activate Hour of Penitence. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
|
||||
<set name="icon" val="icon.etc_leash_i00" />
|
||||
<set name="default_action" val="EQUIP" />
|
||||
<set name="bodypart" val="lbracelet" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="material" val="SILVER" />
|
||||
<set name="weight" val="100" />
|
||||
<set name="is_clan_depositable" val="false" />
|
||||
<set name="is_mailable" val="false" />
|
||||
<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_commissionable" val="false" />
|
||||
<set name="is_private_storeable" val="false" />
|
||||
<set name="bodypart" val="lbracelet" />
|
||||
<set name="is_oly_restricted" val="true" />
|
||||
<set name="useSkillDisTime" val="10" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="weight" val="100" />
|
||||
<skills>
|
||||
<skill id="55701" level="1" /> <!-- Release Agathion's Seal - Sin Eater -->
|
||||
<skill id="3267" level="1" type="ON_UNEQUIP" /> <!-- Seal Agathion -->
|
||||
</skills>
|
||||
</item>
|
||||
<item id="70807" name="Crumbs of Penitence" type="EtcItem">
|
||||
<!-- Item that drops from monster if it is killed during the Hour of Penitence. Bring it to Dark Judge and lower your PC count. -->
|
||||
<set name="icon" val="icon.etc_powder_white_i00" />
|
||||
<set name="is_depositable" val="false" />
|
||||
<set name="is_clan_depositable" val="false" />
|
||||
<set name="is_mailable" val="false" />
|
||||
<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_commissionable" val="false" />
|
||||
<set name="is_private_storeable" val="false" />
|
||||
<set name="is_questitem" val="true" />
|
||||
<set name="is_oly_restricted" val="true" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="is_stackable" val="true" />
|
||||
</item>
|
||||
<item id="70808" name="Giant's Treasure Chest" type="EtcItem">
|
||||
|
@ -399,4 +399,32 @@
|
||||
<height normal="25" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="9021" level="55" type="L2Npc" name="Sin Eater">
|
||||
<!-- AUTO GENERATED NPC TODO: FIX IT -->
|
||||
<race>DEMONIC</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
<vitals hp="1673" hpRegen="6.5" mp="889" mpRegen="2.4" />
|
||||
<speed>
|
||||
<walk ground="45" />
|
||||
<run ground="180" />
|
||||
</speed>
|
||||
<attack physical="388.11142" magical="265.02979" critical="4" attackSpeed="253" range="40" type="FIST" distance="80" width="120" random="5" accuracy="5" />
|
||||
<defence physical="223.6362" magical="163.64727" />
|
||||
<attribute>
|
||||
<defence fire="20" water="20" wind="20" earth="20" holy="20" dark="20" />
|
||||
</attribute>
|
||||
<abnormalResist physical="0" magical="0" />
|
||||
</stats>
|
||||
<status attackable="false" undying="false" />
|
||||
<skillList>
|
||||
<skill id="4416" level="9" /> <!-- Demons -->
|
||||
<skill id="4415" level="1" /> <!-- Bare Hands -->
|
||||
</skillList>
|
||||
<shots soul="2" spirit="2" />
|
||||
<collision>
|
||||
<radius normal="2" />
|
||||
<height normal="1" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
||||
|
@ -9,11 +9,39 @@
|
||||
<!-- Summon Sin Eater Agathion. -->
|
||||
<icon>icon.etc_summon_aga_agit_i00</icon>
|
||||
<operateType>A1</operateType>
|
||||
<isMagic>2</isMagic> <!-- Static Skill -->
|
||||
<hitTime>3000</hitTime>
|
||||
<magicCriticalRate>5</magicCriticalRate>
|
||||
<hitCancelTime>0</hitCancelTime>
|
||||
<magicLvl>1</magicLvl>
|
||||
<reuseDelay>5000</reuseDelay>
|
||||
<targetType>SELF</targetType>
|
||||
<affectScope>SINGLE</affectScope>
|
||||
<conditions>
|
||||
<condition name="OpMainjob" />
|
||||
</conditions>
|
||||
<effects>
|
||||
<effect name="SummonAgathion">
|
||||
<npcId>9021</npcId> <!-- Sin Eater -->
|
||||
</effect>
|
||||
</effects>
|
||||
</skill>
|
||||
<skill id="55702" toLevel="1" name="Hour of Penitence">
|
||||
<!-- Hour of Penitence - 5 hours. Within this time monsters must be defeated and Crumbs of Penitence must be collected (Monsters that are 5 lvl lower than the character are not counted). Activates when Sin Eater is summoned. <Warning!> Removing the bracelet will end the Hour of Penitence. Crumbs of Penitence can not be obtained when belonging to the union. Remains after death. -->
|
||||
<icon>icon.etc_leash_i00</icon>
|
||||
<operateType>A1</operateType>
|
||||
<operateType>A2</operateType>
|
||||
<abnormalType>EXP_BOTTLE</abnormalType>
|
||||
<basicProperty>NONE</basicProperty>
|
||||
<magicCriticalRate>-5</magicCriticalRate>
|
||||
<specialLevel>-1</specialLevel>
|
||||
<hitCancelTime>0</hitCancelTime>
|
||||
<magicLvl>1</magicLvl>
|
||||
<abnormalLvl>1</abnormalLvl>
|
||||
<abnormalTime>300</abnormalTime>
|
||||
<irreplacableBuff>true</irreplacableBuff>
|
||||
<isMagic>4</isMagic>
|
||||
<targetType>SELF</targetType>
|
||||
<affectScope>SINGLE</affectScope>
|
||||
</skill>
|
||||
<skill id="55703" toLevel="1" name="Blessed Scroll: Enchant Weapon (A-grade)">
|
||||
<operateType>A1</operateType>
|
||||
|
@ -1,4 +1,3 @@
|
||||
500 Brothers Bound in Chains
|
||||
630 Pirate Treasure Hunt
|
||||
657 Monster Arena: Trial for Warriors
|
||||
658 Monster Arena: Trial for Elite Warriors
|
||||
|
@ -0,0 +1,5 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
I may look like this now, but I was once an angel of light. But the light was put to sleep, and darkness filled the lands... we fought, all of us angels, but it was a losing battle. Then, when I was growing weary, the god of chaos beckoned. "Chaos is the ultimate peace and silence," he whispered, and I did not have the strength to resist him.<br>
|
||||
But I ended up regretting my decision in the end. So I made another deal with the god of chaos; I would bring him enough "sins" to cancel out my own. So here's my offer to you: I will buy your sin. After all, penitence is the only path to light. Will you accept?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-02.htm">"Yes, I want penitence."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Do you wish to return to the light? Then you, too, must bring back enough sens to cancel out your own. To that end, you need tangible evidence for your penitence.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-03.htm">"How do I get this tangible eidence?"</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
The evidence is called <font color="LEVEL">Crumbs of Penitence</font>, and you can get them through Sin Eater summoned with Penitent's Menacles. I can make Penitent's Manacles for you if you bring <font color="LEVEL">30 Gemstones (B-Grade)</font> from the village merchant.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-04.htm">"Here are the Gemstones (B-Grade)."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
I will give you <font color="LEVEL">Penitent's Manacles</font> so that you can summon the Sin Eater. Summoning the Sin Eater begins the <font color="LEVEL">Hour of Penitence</font>, during which you can obtain <font color="LEVEL">Crumbs of Penitence</font> by defeating as many monsters as possible. Bring me <font color="LEVEL">35 Crumbs of Penitence</font>, and I will free you of your sin.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-06.htm">"I will be back with Crumbs of Penitence."</Button>
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
It seems you don't have enough <font color="LEVEL">Gemstone (B-Grade)</font>. You can get them from a village grocer. Remember, you need <font color="LEVEL">30</font> of them.
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Do not tarry; bring me 35 <font color="LEVEL">Crumbs of Penitence</font> so that I can free you from your sin. But remember, bringing more than 35 will do no good, for not all sins can be cleared in one day.
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
It seems you don't have enough <font color="LEVEL">Crumbs of Penitence</font> yet. Did you forget how to obtain them Equip the <font color="LEVEL">Penitent's Manacles</font> I have given you, summon Sin Eater, and defeat as many monsters as you can during the <font color="LEVEL">Hour of Penitence</font>. You need 35 <font color="LEVEL">Crumbs of Penitence</font> obtained from the battle.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
What did you learn while gathering <font color="LEVEL">Crumbs of Penitence</font>? Committing sin is easy, but reversing it is much less so. Never forget that every choice has consequence. Now, give me what you have gathered, and the Penitent's Manacles. I will clear away your sin.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00500_BrothersBoundInChains 30981-09.html">"Here are the Crumbs of Penitence and the Penitent's Manacles."</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Dark Judge:<br>
|
||||
Now, your sins are forgiven. But not all sins can be forgiven in a day; there is only so much I can forgive today.<br>
|
||||
Never forget the regret and suffering you went through for your mistakes.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Black Judge:<br>
|
||||
Everyone commits sin, whether great or small. And when the sin becomes great, you move away from the light until you become darkness. Sin is close to your nature, and can only be eliminated when your soul is string. Come again sometime, and I will help you step closer to the light.<br>
|
||||
(This quest is available only to main class characters who have a PK count above 0.)
|
||||
</body></html>
|
@ -0,0 +1,216 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package quests.Q00500_BrothersBoundInChains;
|
||||
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.QuestType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius (Based on GoD quest.)
|
||||
* @URL https://l2wiki.com/classic/Brothers_Bound_in_Chains
|
||||
*/
|
||||
public class Q00500_BrothersBoundInChains extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int DARK_JUDGE = 30981;
|
||||
// Items
|
||||
private static final int GEMSTONE_B = 2132;
|
||||
private static final int PENITENT_MANACLES = 70806;
|
||||
private static final int CRUMBS_OF_PENITENCE = 70807;
|
||||
// Skill
|
||||
private static final int HOUR_OF_PENITENCE = 55702;
|
||||
// Agathion
|
||||
private static final int SIN_EATER = 9021;
|
||||
// Other
|
||||
private static final String KILL_COUNT_VAR = "killCount";
|
||||
|
||||
public Q00500_BrothersBoundInChains()
|
||||
{
|
||||
super(500);
|
||||
addStartNpc(DARK_JUDGE);
|
||||
addTalkId(DARK_JUDGE);
|
||||
addSummonAgathion();
|
||||
registerQuestItems(PENITENT_MANACLES, CRUMBS_OF_PENITENCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "buff":
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(15325, 1); // Hour of Penitence
|
||||
skill.activateSkill(player, player);
|
||||
startQuestTimer("buff", 270000, null, player); // Rebuff every 4min30 (retail like)
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "30981-02.htm":
|
||||
case "30981-03.htm":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "30981-04.htm":
|
||||
{
|
||||
if (getQuestItemsCount(player, GEMSTONE_B) >= 30)
|
||||
{
|
||||
takeItems(player, GEMSTONE_B, 30);
|
||||
giveItems(player, PENITENT_MANACLES, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
event = "30981-05.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30981-06.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30981-09.html": // not retail html.
|
||||
{
|
||||
if (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)
|
||||
{
|
||||
takeItems(player, CRUMBS_OF_PENITENCE, -1);
|
||||
player.setPkKills(Math.max(0, player.getPkKills() - Rnd.get(1, 3)));
|
||||
qs.unset(KILL_COUNT_VAR);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If player delete QuestItems: Need check how it work on retail.
|
||||
qs.setCond(1);
|
||||
event = "30981-07.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
event = getNoQuestMsg(player);
|
||||
}
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance talker)
|
||||
{
|
||||
final QuestState qs = getQuestState(talker, true);
|
||||
String htmltext = getNoQuestMsg(talker);
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (talker.getPkKills() > 0) && (talker.getReputation() >= 0) ? "30981-01.htm" : "30981-nopk.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "30981-07.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
htmltext = "30981-08.html"; // not retail html.
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (qs.isNowAvailable())
|
||||
{
|
||||
qs.setState(State.CREATED);
|
||||
htmltext = "30981-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSummonAgathion(L2PcInstance player, int agathionId)
|
||||
{
|
||||
if (SIN_EATER == agathionId)
|
||||
{
|
||||
startQuestTimer("buff", 2500, null, player);
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_MONSTERS)
|
||||
public void onAttackableKill(OnAttackableKill event)
|
||||
{
|
||||
final QuestState qs = getQuestState(event.getAttacker(), false);
|
||||
if (qs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getAttacker().getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE))
|
||||
{
|
||||
// The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs.
|
||||
final int killCount = qs.getInt(KILL_COUNT_VAR);
|
||||
if (killCount >= 20)
|
||||
{
|
||||
// Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail)
|
||||
giveItems(event.getAttacker(), CRUMBS_OF_PENITENCE, 1);
|
||||
qs.set(KILL_COUNT_VAR, 0);
|
||||
|
||||
if (!qs.isCond(2) && (getQuestItemsCount(event.getAttacker(), CRUMBS_OF_PENITENCE) >= 35))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.set(KILL_COUNT_VAR, killCount + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -144,6 +144,7 @@ import quests.Q00415_PathOfTheOrcMonk.Q00415_PathOfTheOrcMonk;
|
||||
import quests.Q00416_PathOfTheOrcShaman.Q00416_PathOfTheOrcShaman;
|
||||
import quests.Q00417_PathOfTheScavenger.Q00417_PathOfTheScavenger;
|
||||
import quests.Q00418_PathOfTheArtisan.Q00418_PathOfTheArtisan;
|
||||
import quests.Q00500_BrothersBoundInChains.Q00500_BrothersBoundInChains;
|
||||
import quests.Q00662_AGameOfCards.Q00662_AGameOfCards;
|
||||
import quests.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss;
|
||||
import quests.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss;
|
||||
@ -314,6 +315,7 @@ public class QuestMasterHandler
|
||||
Q00416_PathOfTheOrcShaman.class,
|
||||
Q00417_PathOfTheScavenger.class,
|
||||
Q00418_PathOfTheArtisan.class,
|
||||
Q00500_BrothersBoundInChains.class,
|
||||
Q00662_AGameOfCards.class,
|
||||
Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.class,
|
||||
Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.class,
|
||||
|
@ -62,22 +62,37 @@
|
||||
<!-- Bracelet used to summon Sin Eater Agathion and to activate Hour of Penitence. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
|
||||
<set name="icon" val="icon.etc_leash_i00" />
|
||||
<set name="default_action" val="EQUIP" />
|
||||
<set name="bodypart" val="lbracelet" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="material" val="SILVER" />
|
||||
<set name="weight" val="100" />
|
||||
<set name="is_clan_depositable" val="false" />
|
||||
<set name="is_mailable" val="false" />
|
||||
<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_commissionable" val="false" />
|
||||
<set name="is_private_storeable" val="false" />
|
||||
<set name="bodypart" val="lbracelet" />
|
||||
<set name="is_oly_restricted" val="true" />
|
||||
<set name="useSkillDisTime" val="10" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="weight" val="100" />
|
||||
<skills>
|
||||
<skill id="55701" level="1" /> <!-- Release Agathion's Seal - Sin Eater -->
|
||||
<skill id="3267" level="1" type="ON_UNEQUIP" /> <!-- Seal Agathion -->
|
||||
</skills>
|
||||
</item>
|
||||
<item id="70807" name="Crumbs of Penitence" type="EtcItem">
|
||||
<!-- Item that drops from monster if it is killed during the Hour of Penitence. Bring it to Dark Judge and lower your PC count. -->
|
||||
<set name="icon" val="icon.etc_powder_white_i00" />
|
||||
<set name="is_depositable" val="false" />
|
||||
<set name="is_clan_depositable" val="false" />
|
||||
<set name="is_mailable" val="false" />
|
||||
<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_commissionable" val="false" />
|
||||
<set name="is_private_storeable" val="false" />
|
||||
<set name="is_questitem" val="true" />
|
||||
<set name="is_oly_restricted" val="true" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="is_stackable" val="true" />
|
||||
</item>
|
||||
<item id="70808" name="Giant's Treasure Chest" type="EtcItem">
|
||||
|
@ -404,20 +404,29 @@
|
||||
<height normal="43" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="9021" level="80" type="L2Npc" name="Sin Eater">
|
||||
<npc id="9021" level="55" type="L2Npc" name="Sin Eater">
|
||||
<!-- AUTO GENERATED NPC TODO: FIX IT -->
|
||||
<race>ETC</race>
|
||||
<sex>FEMALE</sex>
|
||||
<race>DEMONIC</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
|
||||
<vitals hp="8446" hpRegen="10.5" mp="889" mpRegen="3.6" />
|
||||
<vitals hp="1673" hpRegen="6.5" mp="889" mpRegen="2.4" />
|
||||
<speed>
|
||||
<walk ground="45" />
|
||||
<run ground="180" />
|
||||
</speed>
|
||||
<attack physical="1950.2231755595" magical="1331.5869440987" critical="4" attackSpeed="253" range="40" />
|
||||
<defence physical="405.85106382979" magical="297.0297029703" />
|
||||
<attack physical="388.11142" magical="265.02979" critical="4" attackSpeed="253" range="40" type="FIST" distance="80" width="120" random="5" accuracy="5" />
|
||||
<defence physical="223.6362" magical="163.64727" />
|
||||
<attribute>
|
||||
<defence fire="20" water="20" wind="20" earth="20" holy="20" dark="20" />
|
||||
</attribute>
|
||||
<abnormalResist physical="0" magical="0" />
|
||||
</stats>
|
||||
<status attackable="false" />
|
||||
<status attackable="false" undying="false" />
|
||||
<skillList>
|
||||
<skill id="4416" level="9" /> <!-- Demons -->
|
||||
<skill id="4415" level="1" /> <!-- Bare Hands -->
|
||||
</skillList>
|
||||
<shots soul="2" spirit="2" />
|
||||
<collision>
|
||||
<radius normal="2" />
|
||||
<height normal="1" />
|
||||
|
@ -9,11 +9,39 @@
|
||||
<!-- Summon Sin Eater Agathion. -->
|
||||
<icon>icon.etc_summon_aga_agit_i00</icon>
|
||||
<operateType>A1</operateType>
|
||||
<isMagic>2</isMagic> <!-- Static Skill -->
|
||||
<hitTime>3000</hitTime>
|
||||
<magicCriticalRate>5</magicCriticalRate>
|
||||
<hitCancelTime>0</hitCancelTime>
|
||||
<magicLvl>1</magicLvl>
|
||||
<reuseDelay>5000</reuseDelay>
|
||||
<targetType>SELF</targetType>
|
||||
<affectScope>SINGLE</affectScope>
|
||||
<conditions>
|
||||
<condition name="OpMainjob" />
|
||||
</conditions>
|
||||
<effects>
|
||||
<effect name="SummonAgathion">
|
||||
<npcId>9021</npcId> <!-- Sin Eater -->
|
||||
</effect>
|
||||
</effects>
|
||||
</skill>
|
||||
<skill id="55702" toLevel="1" name="Hour of Penitence">
|
||||
<!-- Hour of Penitence - 1 hr. Within this time monsters must be defeated and Crumbs of Penitence must be collected (Monsters that are 5 lvl lower than the character are not counted). Activates when Sin Eater is summoned. <Warning!> Removing the bracelet will end the Hour of Penitence. Crumbs of Penitence can not be obtained when belonging to the union. Remains after death. -->
|
||||
<icon>icon.etc_leash_i00</icon>
|
||||
<operateType>A1</operateType>
|
||||
<operateType>A2</operateType>
|
||||
<abnormalType>EXP_BOTTLE</abnormalType>
|
||||
<basicProperty>NONE</basicProperty>
|
||||
<magicCriticalRate>-5</magicCriticalRate>
|
||||
<specialLevel>-1</specialLevel>
|
||||
<hitCancelTime>0</hitCancelTime>
|
||||
<magicLvl>1</magicLvl>
|
||||
<abnormalLvl>1</abnormalLvl>
|
||||
<abnormalTime>300</abnormalTime>
|
||||
<irreplacableBuff>true</irreplacableBuff>
|
||||
<isMagic>4</isMagic>
|
||||
<targetType>SELF</targetType>
|
||||
<affectScope>SINGLE</affectScope>
|
||||
</skill>
|
||||
<skill id="55703" toLevel="1" name="Blessed Scroll: Enchant Weapon (A-grade)">
|
||||
<operateType>A1</operateType>
|
||||
|
Loading…
Reference in New Issue
Block a user