This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-01.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
I carefully inspected the Training Log and Schedule of the Sel Mahums, which you brought it last time. It looks like they are getting trained more systematically than I expected. I guess just finding out the information isn't enough...<br>If their power gets stronger through this training, it will be a huge threat to this village. Wouldn't you want to help me to stop their training?<br>
|
||||
<a action="bypass -h Quest Q00290_ThreatRemoval 30201-02.html">Say you would.</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-02.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-02.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
The mission is simple: Kill them. The recruits, the instructors, every Sel Mahum you find in the Sel Mahum Training Grounds. They cannot be allowed to continue their training. Gather <font color="LEVEL">over 400 Sel Mahum tags</font> and bring them to me. I will reward you.., I know you fight for more than honor.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
Look recruit, I can't assign this mission to anyone who hasn't survived enough storms, you get me?<br>
|
||||
(Only character with level 82 or above and who has performed the No Secret quest can take on this quest).
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
I'm not paying you by the hour! Let's go! You're not getting anything until I get my 400 Sel Mahum ID Tags.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
You've done my job, the Town of Orean is safe. Thank you, defender... Please accept this gift for your help.<br>
|
||||
<a action="bypass -h Quest Q00290_ThreatRemoval 30201-06.html">Take the reward.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-06.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-06.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
Like it or not, this is the best I can get right now. I may be able to do better next time. What do you think? Still game?<br>
|
||||
<a action="bypass -h Quest Q00290_ThreatRemoval 30201-07.html">Say you will continue to help.</a><br>
|
||||
<a action="bypass -h Quest Q00290_ThreatRemoval exit">Say you will stop helping.</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-07.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-07.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
Thanks. I was really hoping you'd say that. When this is over we may share a pint. For now, we carry out the mission. Get rid of those Sel Mahums at the Sel Mahum Training Grounds, and bring <font color="LEVEL">more than 400 Sel Mahum tags</font> as evidence. You will be rewarded.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-08.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-08.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
I need your help. But unlike me, you are not duty bound, mercenary. Stay or leave. I will not grovel.<br>
|
||||
<a action="bypass -h Quest Q00290_ThreatRemoval 30201-07.html">Say you will continue.</a><br>
|
||||
<a action="bypass -h Quest Q00290_ThreatRemoval 30201-10.html">Say you will quit.</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-09.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-09.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
Oh, it is. So be it. I respect your skills. May we serve together again someday.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-10.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/30201-10.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Pinaps:<br>
|
||||
You're sharp and determined. I think we make a great team. I hope we can work together again.
|
||||
</body></html>
|
226
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/Q00290_ThreatRemoval.java
vendored
Normal file
226
trunk/dist/game/data/scripts/quests/Q00290_ThreatRemoval/Q00290_ThreatRemoval.java
vendored
Normal file
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* 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.Q00290_ThreatRemoval;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import quests.Q00251_NoSecrets.Q00251_NoSecrets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
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;
|
||||
|
||||
/**
|
||||
* Threat Removal (290)
|
||||
* @author Adry_85
|
||||
*/
|
||||
public class Q00290_ThreatRemoval extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int PINAPS = 30201;
|
||||
// Items
|
||||
private static final int ENCHANT_WEAPON_S = 959;
|
||||
private static final int ENCHANT_ARMOR_S = 960;
|
||||
private static final int FIRE_CRYSTAL = 9552;
|
||||
private static final int SEL_MAHUM_ID_TAG = 15714;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 82;
|
||||
|
||||
private static final Map<Integer, Integer> MOBS_TAG = new HashMap<>();
|
||||
|
||||
static
|
||||
{
|
||||
MOBS_TAG.put(22775, 932); // Sel Mahum Drill Sergeant
|
||||
MOBS_TAG.put(22776, 397); // Sel Mahum Training Officer
|
||||
MOBS_TAG.put(22777, 932); // Sel Mahum Drill Sergeant
|
||||
MOBS_TAG.put(22778, 932); // Sel Mahum Drill Sergeant
|
||||
MOBS_TAG.put(22780, 363); // Sel Mahum Recruit
|
||||
MOBS_TAG.put(22781, 483); // Sel Mahum Soldier
|
||||
MOBS_TAG.put(22782, 363); // Sel Mahum Recruit
|
||||
MOBS_TAG.put(22783, 352); // Sel Mahum Soldier
|
||||
MOBS_TAG.put(22784, 363); // Sel Mahum Recruit
|
||||
MOBS_TAG.put(22785, 169); // Sel Mahum Soldier
|
||||
}
|
||||
|
||||
public Q00290_ThreatRemoval()
|
||||
{
|
||||
super(290, Q00290_ThreatRemoval.class.getSimpleName(), "Threat Removal");
|
||||
addStartNpc(PINAPS);
|
||||
addTalkId(PINAPS);
|
||||
addKillId(MOBS_TAG.keySet());
|
||||
registerQuestItems(SEL_MAHUM_ID_TAG);
|
||||
}
|
||||
|
||||
@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 "30201-02.html":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30201-06.html":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
st.takeItems(SEL_MAHUM_ID_TAG, 400);
|
||||
switch (getRandom(10))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
st.rewardItems(ENCHANT_WEAPON_S, 1);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
st.rewardItems(ENCHANT_ARMOR_S, 1);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
case 5:
|
||||
{
|
||||
st.rewardItems(ENCHANT_ARMOR_S, 2);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
st.rewardItems(ENCHANT_ARMOR_S, 3);
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
case 8:
|
||||
{
|
||||
st.rewardItems(FIRE_CRYSTAL, 1);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
case 10:
|
||||
{
|
||||
st.rewardItems(FIRE_CRYSTAL, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30201-07.html":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "exit":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
if (st.hasQuestItems(SEL_MAHUM_ID_TAG))
|
||||
{
|
||||
htmltext = "30201-08.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.exitQuest(true, true);
|
||||
htmltext = "30201-09.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30201-10.html":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
st.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final L2PcInstance partyMember = getRandomPartyMember(player, 1);
|
||||
if (partyMember == null)
|
||||
{
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
final QuestState st = getQuestState(partyMember, false);
|
||||
int npcId = npc.getId();
|
||||
float chance = (MOBS_TAG.get(npcId) * Config.RATE_QUEST_DROP);
|
||||
if (getRandom(1000) < chance)
|
||||
{
|
||||
st.rewardItems(SEL_MAHUM_ID_TAG, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
QuestState st = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
st = player.getQuestState(Q00251_NoSecrets.class.getSimpleName());
|
||||
htmltext = ((player.getLevel() >= MIN_LEVEL) && (st != null) && (st.isCompleted())) ? "30201-01.htm" : "30201-03.html";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
htmltext = (st.getQuestItemsCount(SEL_MAHUM_ID_TAG) < 400) ? "30201-04.html" : "30201-05.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user