Merged with released L2J-Unity files.
This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-01.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
Okay, let me get this right. 'There are serious security issues in Oren due to an increase in the monster populations. Guards there are currently overworked and in need of assistance.'<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10394_MutualBenefit 33862-02.htm">"I'm listening."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
So, according to the message, they need people to, 'kill monsters with strange symptoms caused by Shilen's threat in the Outlaw Forest.' Sounds pretty straightforward, I guess.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10394_MutualBenefit 33862-03.htm">"Which monsters should I kill?"</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
I used to ask that a lot too. Hmm... oh, here it is! 'Depending on the skill level of the adventurer, it might be dangerous to approach Oel Mahum, unless the adventurer is skilled enough...' What do you think they're trying to say here? Sometimes, these orders are so hard to understand...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10394_MutualBenefit 33862-04.htm">"... Just tell me what I need to do."</Button>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-04.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
My best guess? For now, kill <font color="LEVEL">Hunter Gargoyles, Tarlk Basilisks and Elder Tarlk Basilisks</font>.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-05.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-05.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
It definitely says to kill <font color="LEVEL">Hunter Gargoyles, Tarlk Basilisks and Elder Tarlk Basilisks</font>. Pretty sure, anyway.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
Great job, you've killed them all! Usually I see people come back half a dozen times with various amounts of blood on their clothes. Sorry about earlier. I don't have much field experience... so I'm trying to prepare people as best I can.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10394_MutualBenefit 33862-07.html">"Uh."</Button>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-07.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-07.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
I've got some money here for you, but don't leave just yet. Something came up while you were out, could be important. If you're interested, go talk to <font color="LEVEL">Refugee Leo</font> over there.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-08.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-08.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
This one is too dangerous for you right now. Come back when you've got more experience.<br>
|
||||
(This quest is for characters level 46 or above.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-09.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/33862-09.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kelios:<br>
|
||||
Hey, this place is dangerous! You shouldn't be here.<br>
|
||||
(Ertheia is excluded from this quest.)
|
||||
</body></html>
|
203
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/Q10394_MutualBenefit.java
vendored
Normal file
203
trunk/dist/game/data/scripts/quests/Q10394_MutualBenefit/Q10394_MutualBenefit.java
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
/*
|
||||
* 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.Q10394_MutualBenefit;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.NpcLogListHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Mutual Benefit (10394)
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Q10394_MutualBenefit extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int KELIOS = 33862;
|
||||
private static final int GARGOYLE = 20241; // Hunter Gargoyle
|
||||
private static final int BASILISK = 20573; // Tarlk Basilisk
|
||||
private static final int ELDER_BASILISK = 20574; // Elder Tarlk Basilisk
|
||||
// Items
|
||||
private static final int EAC = 952; // Scroll: Enchant Armor (C-grade)
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 46;
|
||||
private static final int MAX_LEVEL = 52;
|
||||
|
||||
public Q10394_MutualBenefit()
|
||||
{
|
||||
super(10394);
|
||||
addStartNpc(KELIOS);
|
||||
addTalkId(KELIOS);
|
||||
addKillId(GARGOYLE, BASILISK, ELDER_BASILISK);
|
||||
addCondNotRace(Race.ERTHEIA, "33862-09.html");
|
||||
addCondLevel(MIN_LEVEL, MAX_LEVEL, "33862-08.htm");
|
||||
}
|
||||
|
||||
@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 "33862-02.htm":
|
||||
case "33862-03.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33862-04.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33862-07.html":
|
||||
{
|
||||
if (st.isCond(2))
|
||||
{
|
||||
st.exitQuest(false, true);
|
||||
giveItems(player, EAC, 6);
|
||||
giveStoryQuestReward(player, 26);
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
addExpAndSp(player, 3_151_312, 756);
|
||||
}
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = "33862-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
htmltext = "33862-05.html";
|
||||
}
|
||||
else if (st.isCond(2))
|
||||
{
|
||||
htmltext = "33862-06.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(killer, false);
|
||||
|
||||
if ((st != null) && st.isStarted() && st.isCond(1))
|
||||
{
|
||||
int killedGargoyle = st.getInt("killed_" + GARGOYLE);
|
||||
int killedBasilisk = st.getInt("killed_" + BASILISK);
|
||||
int killedElderBasilisk = st.getInt("killed_" + ELDER_BASILISK);
|
||||
|
||||
switch (npc.getId())
|
||||
{
|
||||
case GARGOYLE:
|
||||
{
|
||||
if (killedGargoyle < 15)
|
||||
{
|
||||
killedGargoyle++;
|
||||
st.set("killed_" + GARGOYLE, killedGargoyle);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case BASILISK:
|
||||
{
|
||||
if (killedBasilisk < 20)
|
||||
{
|
||||
killedBasilisk++;
|
||||
st.set("killed_" + BASILISK, killedBasilisk);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ELDER_BASILISK:
|
||||
{
|
||||
if (killedElderBasilisk < 20)
|
||||
{
|
||||
killedElderBasilisk++;
|
||||
st.set("killed_" + ELDER_BASILISK, killedElderBasilisk);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((killedGargoyle == 15) && (killedBasilisk == 20) && (killedElderBasilisk == 20))
|
||||
{
|
||||
st.setCond(2, true);
|
||||
}
|
||||
sendNpcLogList(killer);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
|
||||
{
|
||||
final QuestState st = getQuestState(activeChar, false);
|
||||
if ((st != null) && st.isStarted() && st.isCond(1))
|
||||
{
|
||||
final Set<NpcLogListHolder> npcLogList = new HashSet<>(3);
|
||||
npcLogList.add(new NpcLogListHolder(GARGOYLE, false, st.getInt("killed_" + GARGOYLE)));
|
||||
npcLogList.add(new NpcLogListHolder(BASILISK, false, st.getInt("killed_" + BASILISK)));
|
||||
npcLogList.add(new NpcLogListHolder(ELDER_BASILISK, false, st.getInt("killed_" + ELDER_BASILISK)));
|
||||
return npcLogList;
|
||||
}
|
||||
return super.getNpcLogList(activeChar);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user