Pagan Temple rework.

Contributed by hlwrave.
This commit is contained in:
MobiusDev
2016-02-06 20:42:32 +00:00
parent dc04ad2d56
commit 4fe92f3e45
47 changed files with 903 additions and 5 deletions

View File

@@ -0,0 +1,169 @@
/*
* 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.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;
import com.l2jmobius.gameserver.util.Util;
/**
* @author hlwrave
*/
public class Q00757_TriolsMovement extends Quest
{
// NPCs
private static final int RADZEN = 33803;
// Items
private static final int SPIRIT = 36231;
private static final int TOTEM = 36230;
private static final int SPIRIT_COUNT = 100;
private static final int TOTEM_COUNT = 100;
// Mobs
private static final int[] MOBS =
{
22140,
22147,
23278,
23283,
22146,
22155,
22141,
22144,
22139,
22152,
22153,
22154,
};
public Q00757_TriolsMovement()
{
super(757, Q00757_TriolsMovement.class.getSimpleName(), "Triols Movement");
addStartNpc(RADZEN);
addTalkId(RADZEN);
registerQuestItems(SPIRIT, TOTEM);
addKillId(MOBS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "accepted.htm":
{
qs.setCond(1);
qs.startQuest();
break;
}
case "endquest.htm":
{
if (qs.isCond(2))
{
qs.takeItems(SPIRIT, -100);
qs.takeItems(TOTEM, -100);
qs.giveItems(57, 745929);
qs.giveItems(36232, 1);
qs.addExpAndSp(301518549, 7236360);
qs.exitQuest(QuestType.DAILY, true);
htmltext = "endquest.htm";
}
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;
}
switch (qs.getState())
{
case State.COMPLETED:
{
htmltext = "You have completed this quest today, come back tomorow at 6:30!";
break;
}
case State.CREATED:
{
if (player.getLevel() >= 97)
{
htmltext = "start.htm";
}
else
{
htmltext = "no_level.htm";
}
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "notcollected.htm";
}
else if (qs.isCond(2))
{
htmltext = "collected.htm";
}
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1) && qs.isStarted())
{
if (Util.contains(MOBS, npc.getId()))
{
giveItemRandomly(killer, npc, TOTEM, 1, 100, 1.0, true);
}
if (Util.contains(MOBS, npc.getId()))
{
giveItemRandomly(killer, npc, SPIRIT, 1, 100, 1.0, true);
}
if ((getQuestItemsCount(killer, SPIRIT) == SPIRIT_COUNT) && (getQuestItemsCount(killer, TOTEM) == TOTEM_COUNT))
{
qs.setCond(2);
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@@ -0,0 +1,7 @@
<html><body>Sec:<br>
This is great news for us!<br>
Here is a list of monsters which must be eliminated:<br>
Risen worker Ritual Offering, Amateur Tyrol, Tyrol believer, priest of Tyrol, the High Priest of Tyrol, The Forgotten Victim, Resurrected Temple Knight, Soldier of the old aristocracy, Guardian of the Temple, the captain of the Temple Ritual Sacrifice.<br>
In a sign of proof of the offense bring 50 "Pagan Totem", and also you can collect "Pagan Spirit" through this thing I can replenish your energy!<br>
Come see me when you've gathered 50 "Pagan Totem" and as much as possible, "the Spirit of the Gentiles."
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Sec:<br>
I can see how theirs are shining precious totems!<br>
Show that even brought?<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement endquest.htm">"Show"</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sec:<br>
Thank you for helping us keep the balance among Rassam! So as that's your reward, I was able to fill up a bit of energy you above all.<br>
Triols all exactly is a lot out there, and the rest a come back tomorrow to continue the mission of our gods!
</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,7 @@
<html><body>Sec:<br>
This is great news for us!<br>
Here is a list of monsters which must be eliminated:<br>
Risen worker Ritual Offering, Amateur Tyrol, Tyrol believer, priest of Tyrol, the High Priest of Tyrol, The Forgotten Victim, Resurrected Temple Knight, Soldier of the old aristocracy, Guardian of the Temple, the captain of the Temple Ritual Sacrifice.<br>
In a sign of proof of the offense bring 50 "Pagan Totem", and also you can collect "Pagan Spirit" through this thing I can replenish your energy!<br>
Come see me when you've gathered 50 "Pagan Totem" and as much as possible, "the Spirit of the Gentiles."
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Sec:<br>
We would never have thought that the triplets can multiply so fast, according to our research theirs number exceeds the norm by 389 percent!<br>
You are here that would stop this growth?<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00757_TriolsMovement accepted.htm">"Yes, I'm the one who need it!"</button>
</body></html>