Quest Triol's Movement (787).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-07-19 12:03:56 +00:00
parent 4799742338
commit d5ef17f953
13 changed files with 253 additions and 0 deletions

View File

@ -0,0 +1,204 @@
/*
* 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.Q00757_TriolsMovement;
import com.l2jmobius.commons.util.CommonUtil;
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.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
/**
* Triol's Movement (787)
* @URL https://l2wiki.com/Triol%27s_Movement
* @author Gigi
*/
public class Q00757_TriolsMovement extends Quest
{
// NPC
private static final int RADZEN = 33803;
// Monsters
private static final int[] MOBS =
{
22139, // Old Aristocrat's Soldier
22140, // Resurrected Worker
22141, // Forgotten Victim
22144, // Resurrected Temple Knight
22146, // Triol's Priest
22147, // Ritual Offering
22152, // Temple Guard
22153, // Temple Guard Captain
22154, // Ritual Sacrifice
22155, // Triol's High Priest
23278, // Triol's Layperson
23283 // Triol's Believer
};
// Items
private static final int PAGAN_TOTEM = 36230;
private static final int PAGAN_SOUL = 36231;
private static final int TOTEM_COUNT = 100;
private static final int SOUL_COUNT = 300;
// Reward
private static final int DIVINE_BOX = 46432;
private static final int ADENA = 57;
// Misc
private static final int MIN_LEVEL = 97;
public Q00757_TriolsMovement()
{
super(757);
addStartNpc(RADZEN);
addTalkId(RADZEN);
addKillId(MOBS);
registerQuestItems(PAGAN_TOTEM, PAGAN_SOUL);
addCondMinLevel(MIN_LEVEL, "no_level.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "start1.htm":
case "start2.htm":
case "СЃontinue.html":
case "endquest1.html":
{
htmltext = event;
break;
}
case "accepted.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "endquest.html":
{
if ((getQuestItemsCount(player, PAGAN_TOTEM) >= 100) && (getQuestItemsCount(player, PAGAN_SOUL) < 100))
{
addExpAndSp(player, 3015185490L, 7236360);
giveItems(player, DIVINE_BOX, 1);
giveItems(player, ADENA, 745929);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
}
else if ((getQuestItemsCount(player, PAGAN_TOTEM) >= 100) && ((getQuestItemsCount(player, PAGAN_SOUL) >= 100) && (getQuestItemsCount(player, PAGAN_SOUL) <= 199)))
{
addExpAndSp(player, 6030370980L, 14472720);
giveItems(player, DIVINE_BOX, 2);
giveItems(player, ADENA, 1491858);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
}
else if ((getQuestItemsCount(player, PAGAN_TOTEM) >= 100) && ((getQuestItemsCount(player, PAGAN_SOUL) >= 200) && (getQuestItemsCount(player, PAGAN_SOUL) <= 299)))
{
addExpAndSp(player, 9045556470L, 21709080);
giveItems(player, DIVINE_BOX, 3);
giveItems(player, ADENA, 2237787);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
}
else if ((getQuestItemsCount(player, PAGAN_TOTEM) >= 100) && (getQuestItemsCount(player, PAGAN_SOUL) >= 300))
{
addExpAndSp(player, 12060741960L, 28945440);
giveItems(player, DIVINE_BOX, 4);
giveItems(player, ADENA, 2983716);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
if (qs == null)
{
return htmltext;
}
if (npc.getId() == RADZEN)
{
switch (qs.getState())
{
case State.COMPLETED:
{
if (!qs.isNowAvailable())
{
htmltext = "restart.htm";
break;
}
qs.setState(State.CREATED);
}
case State.CREATED:
{
htmltext = "start.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "notcollected.html";
}
else if (qs.isCond(2))
{
htmltext = "collected.html";
}
break;
}
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isStarted())
{
if ((CommonUtil.contains(MOBS, npc.getId())) && (getQuestItemsCount(killer, PAGAN_TOTEM) < TOTEM_COUNT))
{
giveItemRandomly(killer, npc, PAGAN_TOTEM, 1, 100, 0.5, true);
}
if ((CommonUtil.contains(MOBS, npc.getId())) && (getQuestItemsCount(killer, PAGAN_SOUL) < SOUL_COUNT))
{
giveItemRandomly(killer, npc, PAGAN_SOUL, 1, 300, 0.3, true);
}
if (getQuestItemsCount(killer, PAGAN_TOTEM) >= TOTEM_COUNT)
{
qs.setCond(2, true);
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@ -0,0 +1,3 @@
<html><body>Priestess of Light Razen:<br>
Please eliminate the pagans so that Triol will have no sway over this world. You may target any and all pagans here; if you bring <font color="LEVEL">100 pagan Totems</font>, I will give you small compensation I will also give you a special reward for the number of <font color="LEVEL">Pagan Souls</font> that your bring.
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Priestess of Light Razen:<br>
You've collected all the pagan Totems. And You got some pagan Souls as well.<br>
Will you receive what reward you can and call it a day, or will you collect some more Pagan Souls?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement endquest1.html">"I'm pooped, thanks."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement сontinue.html">"Wait a sec. I'll be back with some more Pagan souls"</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Priestess of Light Razen:<br>
Here's the Divine Box. It was given by Elmore, so I don't know what's in it...but hey, it might be something nice.<br>
Thank you for your help, Adventurer. Go rest your weary body where the sun may reach.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Priestess of Light Razen:<br>
I'll give you a <font color="LEVEL">Divine Box</font> as a reward. It's a reward for adventures, so I'm sure you'll find it useful. However, if you would like to continue hunting, I won't stop you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement endquest.html">"I'll take a Divine box now."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement сontinue.html">"I think...I'll collect some more Pagan souls"</button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>You don't meet level requirements<br>
(Quest available from level 97 or above.)
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Priestess of Light Razen:<br>
You must bring <font color="LEVEL">100 pagan Totems</font>, I will give you small compensation I will also give you a special reward for the number of <font color="LEVEL">Pagan Souls</font> that your bring.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Priestess of Light Razen:<br>
Hmm ... For you, as long as there is no work.<br>
(This quest is available once a day. Updating quest takes place daily at 6:30 am.)
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Priestess of Light Razen:<br>
We must stop pagans before they gain more power. If they manage to awaken <font color="LEVEL">Triol</font>, there will be disaster not only for Rune Castle or Elmore, but for the entire Aden continent<br>
...wich is why you are here, Adventurer. Their forces must be...reduced. Do you understand my meaning?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement start1.htm">"So...you want me to kill the pagans to reduce their numbers."</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Priestess of Light Razen:<br>
That is correct. Please eliminate the pagans in the <font color="LEVEL">Pagan Temple</font>, and bring back the <font color="LEVEL">Pagan Totems</font> as evidence. Almost all pagans here carry them.<br>
And.. there is one more thing.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement start2.htm">"So...you want me to kill the pagans to reduce their numbers."</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Priestess of Light Razen:<br>
And if you get the chance, can you bring back <font color="LEVEL">Pagan Souls</font> as well? can get them from all pagans here, just like the totems.<br>
It won't be as easy because you can't get them if the pagans' souls had been taken by the devil. But when you spend enough time <font color="LEVEL">collecting all the Pagan Totems</font>, collecting the Pagan Souls will come naturally. Just bring them to me and I'll give you a special little something.<br>
Did you get everything I said?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement accepted.htm">"I think so."</button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Priestess of Light Razen:<br>
You really will? Great. Fell all the <font color="LEVEL">Pagan monster's</font> in <font color="LEVEL">Pagan Temple</font> and collect Pagan Soul. You'll get a reward for meeting different quotas.
</body></html>

View File

@ -155,6 +155,7 @@ import quests.Q00650_ABrokenDream.Q00650_ABrokenDream;
import quests.Q00652_AnAgedExAdventurer.Q00652_AnAgedExAdventurer;
import quests.Q00662_AGameOfCards.Q00662_AGameOfCards;
import quests.Q00688_DefeatTheElrokianRaiders.Q00688_DefeatTheElrokianRaiders;
import quests.Q00757_TriolsMovement.Q00757_TriolsMovement;
import quests.Q00760_BlockTheExit.Q00760_BlockTheExit;
import quests.Q00761_AssistingTheGoldenRamArmy.Q00761_AssistingTheGoldenRamArmy;
import quests.Q00762_AnOminousRequest.Q00762_AnOminousRequest;
@ -474,6 +475,7 @@ public class QuestMasterHandler
Q00652_AnAgedExAdventurer.class,
Q00662_AGameOfCards.class,
Q00688_DefeatTheElrokianRaiders.class,
Q00757_TriolsMovement.class,
Q00760_BlockTheExit.class,
Q00761_AssistingTheGoldenRamArmy.class,
Q00762_AnOminousRequest.class,