This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-00.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-00.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
I applaud you for your determination, but I fear you don't have all the necessary skills to undertake this task. Come back and see me once you have a bit more experience under your belt.<br>
|
||||
(You must be level 82 or above and have completed the Winds of Change quest in order to take this quest.)
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
If you think that by completing some menial task for Iason Heine makes us lifelong pals, then you are sadly mistaken.<br>
|
||||
If you are to help us, then we must be assured of your dedication to our cause. If you are willing to prove your trustworthiness to us, then I shall give you a test.<br>
|
||||
<a action="bypass -h Quest Q00239_WontYouJoinUs 32643-02.htm">"What's the test?"</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
Forgive me for being so harsh. Its just that I don't care for mercenaries who are out to make a quick buck. This cause requires your passion and desire to make a difference in the world around you.<br>
|
||||
<a action="bypass -h Quest Q00239_WontYouJoinUs 32643-03.html">Say that you understand.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-03.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-03.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
To the north of us lies the Helvetica Development Base. Surrounding this you'll find <font color="LEVEL">Waste Landfill Machines</font>.<br>
|
||||
Besides being detrimental to the environment, these machines also have something to do with the Mucrokians. However, at this point, we are unsure about the correlation between the two. All we know is that these machines stand in the way or our purpose. We can't possibly hope to restore this wonderous land until they have been destroyed.<br>
|
||||
Please do your part and destroy <font color="LEVEL">10 Waste Landfill Machines</font>. Bring back 10 pieces from these contraptions as proof of the deed.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-04.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-04.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
Have you already forgotten what it is I asked of you?!<br>
|
||||
Seek out the <font color="LEVEL">Waste Landfill Machines</font> in the north and bring back 10 pieces to prove your worth. Now hurry!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
There aren't even 10 <font color="LEVEL">Landfill Machine Parts</font>. It's a mistake for you to think that you can get the trust with this.<br>
|
||||
In order to earn our trust, finish destroying <font color="LEVEL">Waste Landfill Machines</font> near Reed Field Development Base.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
Well done. But I wonder if this task was too easy.<br>
|
||||
<a action="bypass -h Quest Q00239_WontYouJoinUs 32643-07.html">"So?"</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
Hmm.... you've done better than I thought you would. But I'm not sure if I trust you yet. Do one more thing for me, and my confidence in you will never be in question again.<br>
|
||||
Return to the Fields of Silence and defeat the <font color="LEVEL">Suppressors</font> and <font color="LEVEL">Exterminators</font> that you encounter there. Bring me back <font color="LEVEL">20 Enchanted Golem Fragments</font> and your place amongst us will be secured.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-08.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-08.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
Didn't we explain about the purpose of this test?<br>
|
||||
If you really want our trust, destroy <font color="LEVEL">Charging Enchanted Golem</font> and <font color="LEVEL">Destroying Enchanted Golem</font> near Reed Field Development Base, and retrieve <font color="LEVEL">20 Enchanted Golem Part</font>.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-09.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-09.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
There aren't even 20<font color="LEVEL">Enchanted Golem Part</font>. We can't trust you with this amount.<br>
|
||||
Please destroy <font color="LEVEL">Charging Enchanted Golem</font> or <font color="LEVEL">Destroying Enchanted Golem</font> near Reed Field Development Base, and retrieve <font color="LEVEL">20 Enchanted Golem Part</font> as evidence.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-10.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-10.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
I am impressed. You have faithfully accomplished the tasks I set before you without complaint. You have convinced me of your dedication to this cause.<br>
|
||||
We are now comrades. Let us fight side-by-side for the preservation of this land!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-11.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-11.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
We can now trust you. We will be counting on you from now on.<br>
|
||||
(This quest has been already completed.)
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-12.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/32643-12.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Priestess Athenia:<br>
|
||||
You must have a <font color="LEVEL">Certificate of Support</font> in order to take this quest. If you don't have the certificate, then you don't have the right to take this mission.
|
||||
</body></html>
|
201
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/Q00239_WontYouJoinUs.java
vendored
Normal file
201
trunk/dist/game/data/scripts/quests/Q00239_WontYouJoinUs/Q00239_WontYouJoinUs.java
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.Q00239_WontYouJoinUs;
|
||||
|
||||
import quests.Q00237_WindsOfChange.Q00237_WindsOfChange;
|
||||
import quests.Q00238_SuccessFailureOfBusiness.Q00238_SuccessFailureOfBusiness;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Won't You Join Us (239)<br>
|
||||
* Original Jython script by Bloodshed.
|
||||
* @author Joxit
|
||||
*/
|
||||
public class Q00239_WontYouJoinUs extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int ATHENIA = 32643;
|
||||
// Mobs
|
||||
private static final int WASTE_LANDFILL_MACHINE = 18805;
|
||||
private static final int SUPPRESSOR = 22656;
|
||||
private static final int EXTERMINATOR = 22657;
|
||||
// Items
|
||||
private static final int SUPPORT_CERTIFICATE = 14866;
|
||||
private static final int DESTROYED_MACHINE_PIECE = 14869;
|
||||
private static final int ENCHANTED_GOLEM_FRAGMENT = 14870;
|
||||
// Misc
|
||||
private static final int ENCHANTED_GOLEM_FRAGMENT_NEEDED = 20;
|
||||
private static final int DESTROYED_MACHINE_PIECE_NEEDED = 10;
|
||||
private static final int CHANCE_FOR_FRAGMENT = 80;
|
||||
private static final int MIN_LEVEL = 82;
|
||||
|
||||
public Q00239_WontYouJoinUs()
|
||||
{
|
||||
super(239, Q00239_WontYouJoinUs.class.getSimpleName(), "Won't You Join Us?");
|
||||
addStartNpc(ATHENIA);
|
||||
addTalkId(ATHENIA);
|
||||
addKillId(WASTE_LANDFILL_MACHINE, SUPPRESSOR, EXTERMINATOR);
|
||||
registerQuestItems(DESTROYED_MACHINE_PIECE, ENCHANTED_GOLEM_FRAGMENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32643-02.htm":
|
||||
htmltext = event;
|
||||
break;
|
||||
case "32643-03.html":
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
case "32643-07.html":
|
||||
if (st.isCond(2))
|
||||
{
|
||||
st.setCond(3, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
if (npc.getId() == WASTE_LANDFILL_MACHINE)
|
||||
{
|
||||
final L2PcInstance partyMember = getRandomPartyMember(killer, 1);
|
||||
if (partyMember != null)
|
||||
{
|
||||
final QuestState st = getQuestState(partyMember, false);
|
||||
if (st.getQuestItemsCount(DESTROYED_MACHINE_PIECE) < DESTROYED_MACHINE_PIECE_NEEDED)
|
||||
{
|
||||
st.giveItems(DESTROYED_MACHINE_PIECE, 1);
|
||||
}
|
||||
if (st.getQuestItemsCount(DESTROYED_MACHINE_PIECE) == DESTROYED_MACHINE_PIECE_NEEDED)
|
||||
{
|
||||
st.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final L2PcInstance partyMember = getRandomPartyMember(killer, 3);
|
||||
if ((partyMember != null) && (getRandom(100) < CHANCE_FOR_FRAGMENT))
|
||||
{
|
||||
final QuestState st = getQuestState(partyMember, false);
|
||||
if (st.getQuestItemsCount(ENCHANTED_GOLEM_FRAGMENT) < ENCHANTED_GOLEM_FRAGMENT_NEEDED)
|
||||
{
|
||||
st.giveItems(ENCHANTED_GOLEM_FRAGMENT, 1);
|
||||
}
|
||||
if (st.getQuestItemsCount(ENCHANTED_GOLEM_FRAGMENT) == ENCHANTED_GOLEM_FRAGMENT_NEEDED)
|
||||
{
|
||||
st.setCond(4, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance talker)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(talker);
|
||||
final QuestState st = getQuestState(talker, true);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.COMPLETED:
|
||||
htmltext = "32643-11.html";
|
||||
break;
|
||||
case State.CREATED:
|
||||
final QuestState q237 = st.getPlayer().getQuestState(Q00237_WindsOfChange.class.getSimpleName());
|
||||
final QuestState q238 = st.getPlayer().getQuestState(Q00238_SuccessFailureOfBusiness.class.getSimpleName());
|
||||
if ((q238 != null) && q238.isCompleted())
|
||||
{
|
||||
htmltext = "32643-12.html";
|
||||
}
|
||||
else if ((q237 != null) && q237.isCompleted() && (talker.getLevel() >= MIN_LEVEL) && st.hasQuestItems(SUPPORT_CERTIFICATE))
|
||||
{
|
||||
htmltext = "32643-01.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32643-00.html";
|
||||
}
|
||||
break;
|
||||
case State.STARTED:
|
||||
switch (st.getCond())
|
||||
{
|
||||
case 1:
|
||||
htmltext = (st.hasQuestItems(DESTROYED_MACHINE_PIECE)) ? "32643-05.html" : "32643-04.html";
|
||||
break;
|
||||
case 2:
|
||||
if (st.getQuestItemsCount(DESTROYED_MACHINE_PIECE) == DESTROYED_MACHINE_PIECE_NEEDED)
|
||||
{
|
||||
htmltext = "32643-06.html";
|
||||
st.takeItems(DESTROYED_MACHINE_PIECE, -1);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
htmltext = (st.hasQuestItems(ENCHANTED_GOLEM_FRAGMENT)) ? "32643-08.html" : "32643-09.html";
|
||||
break;
|
||||
case 4:
|
||||
if (st.getQuestItemsCount(ENCHANTED_GOLEM_FRAGMENT) == ENCHANTED_GOLEM_FRAGMENT_NEEDED)
|
||||
{
|
||||
htmltext = "32643-10.html";
|
||||
st.giveAdena(283346, true);
|
||||
st.takeItems(SUPPORT_CERTIFICATE, 1);
|
||||
st.addExpAndSp(1319736, 103553);
|
||||
st.exitQuest(false, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user