Merged with released L2J-Unity files.
This commit is contained in:
3
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/31292-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/31292-01.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Captain Andrei:<br>
|
||||
Good work soldier! I'm sure as you slaughtered the beasts you could see through their ruse of being simple field creatures. Yes, the residents can sleep safely tonight<68> but tomorrow<6F> I don't know. They are out there... grazing... and plotting. Well enough is enough and here is your pay. If you wish to save us again, please talk to the Adventurer Helper tomorrow.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/31292-02.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/31292-02.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Captain Andrei:<br>
|
||||
I'm busy, so unless it's a pressing issue just take care of it yourself.<br>
|
||||
(This quest may only be done three times a day. It resets each day at 6:30am.)
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/31292-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/31292-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Captain Andrei:<br>
|
||||
Soldier! What are you doing here? I don't see any <font color="LEVEL">Antelopes, Bandersnatches, Buffaloes, and Grendels</font> in town. I see plenty of them outside of town about to storm our city. Kill <font color="LEVEL">45</font> of each of them and then report back.
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
The town of Goddard is in desperate need of an adventurer!<br>
|
||||
<font color="LEVEL">Captain Andrei</font> of <font color="LEVEL">Goddard</font> is in need of someone willing to defend the town from the destructive forces that surround them.<br1>
|
||||
Are you willing to throw caution to the wind and save the town?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00476_PlainMission 32327-02.htm">"I'll throw more than caution!"</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
Please kill <font color="LEVEL">Antelopes, Bandersnatches, Buffalos and Grendels</font> in the Garden of Beasts.<br>
|
||||
<font color="LEVEL">45 creatures</font> each should be fine. Simple, huh?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00476_PlainMission 32327-03.htm">Continue to listen</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
Of course! They may look harmless... but Captain Andrei is quite certain that it is all a clever ploy to lull the town into a false sense of security. And then, when they least suspect it... the beasts will attack! Yes, very clever indeed. Just be sure not to look them in their cuddly eyes when you put them down. After you are finished placing those beasts on the endangered species list, speak to <font color="LEVEL">Captain Andrei</font> in <font color="LEVEL">Goddard</font> to collect your reward.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00476_PlainMission 32327-04.htm">"No really... seriously?"</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-04.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-04.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
Alright, just to recap:<br>
|
||||
Kill <font color="LEVEL">45</font> each of <font color="LEVEL">Antelopes, Bandersnatches, Buffaloes, and Grendels</font>, then return to <font color="LEVEL">Captain Andrei in the Town of Goddard</font>. Please hurry, the peaceful sounds of contented chewing are clearly a prelude to an attack!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
One more time.<br>
|
||||
Kill <font color="LEVEL">45</font> each of <font color="LEVEL">Antelopes, Bandersnatches, Buffaloes, and Grendels</font>, then return to <font color="LEVEL">Captain Andrei in the Town of Goddard</font>. Please hurry, the peaceful sounds of contented chewing are clearly a prelude to an attack!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/32327-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
Excellent, the slaughterer of the innoc... foul beasts threatening us all has returned!<br>
|
||||
If you've defeated <font color="LEVEL">45</font> <font color="LEVEL">Antelopes, Bandersnatches, Buffaloes, and Grendels</font> each, just take the proof to <font color="LEVEL">Captain Andrei in Goddard</font>.
|
||||
</body></html>
|
247
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/Q00476_PlainMission.java
vendored
Normal file
247
trunk/dist/game/data/scripts/quests/Q00476_PlainMission/Q00476_PlainMission.java
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
/*
|
||||
* 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.Q00476_PlainMission;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
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.holders.NpcLogListHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Plain Mission (476)
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Q00476_PlainMission extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ADVENTURER = 32327;
|
||||
private static final int ANDREI = 31292;
|
||||
private static final int[] GRENDEL =
|
||||
{
|
||||
21290,
|
||||
21291,
|
||||
21292,
|
||||
};
|
||||
private static final int[] BUFFALO =
|
||||
{
|
||||
21286,
|
||||
21287,
|
||||
21288,
|
||||
};
|
||||
private static final int[] ANTELOPE =
|
||||
{
|
||||
21278,
|
||||
21279,
|
||||
21280,
|
||||
};
|
||||
private static final int[] BANDERSNATCH =
|
||||
{
|
||||
21282,
|
||||
21283,
|
||||
21284,
|
||||
};
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 65;
|
||||
private static final int MAX_LEVEL = 69;
|
||||
|
||||
public Q00476_PlainMission()
|
||||
{
|
||||
super(476);
|
||||
addStartNpc(ADVENTURER);
|
||||
addTalkId(ADVENTURER, ANDREI);
|
||||
addKillId(BANDERSNATCH);
|
||||
addKillId(ANTELOPE);
|
||||
addKillId(BUFFALO);
|
||||
addKillId(GRENDEL);
|
||||
addCondLevel(MIN_LEVEL, MAX_LEVEL, "");
|
||||
}
|
||||
|
||||
@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 "32327-02.htm":
|
||||
case "32327-03.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32327-04.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (npc.getId() == ADVENTURER)
|
||||
{
|
||||
htmltext = "32327-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
htmltext = npc.getId() == ADVENTURER ? "32327-05.html" : "31292-03.html";
|
||||
}
|
||||
else if (st.isCond(2))
|
||||
{
|
||||
if (npc.getId() == ADVENTURER)
|
||||
{
|
||||
htmltext = "32327-06.html";
|
||||
}
|
||||
else if (npc.getId() == ANDREI)
|
||||
{
|
||||
if (!isSimulated)
|
||||
{
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
giveAdena(player, 142_200, true);
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
addExpAndSp(player, 4_685_175, 1_124);
|
||||
}
|
||||
}
|
||||
htmltext = "31292-01.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if ((npc.getId() == ADVENTURER) && st.isNowAvailable())
|
||||
{
|
||||
if (!isSimulated)
|
||||
{
|
||||
st.setState(State.CREATED);
|
||||
}
|
||||
htmltext = "32327-01.htm";
|
||||
}
|
||||
else if ((npc.getId() == ANDREI) && st.isCompleted() && !st.isNowAvailable())
|
||||
{
|
||||
htmltext = "31292-02.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(killer, false);
|
||||
|
||||
if ((st != null) && st.isCond(1))
|
||||
{
|
||||
int killedAntelope = st.getInt("killed_" + ANTELOPE[0]);
|
||||
int killedBandersnatch = st.getInt("killed_" + BANDERSNATCH[0]);
|
||||
int killedBuffalo = st.getInt("killed_" + BUFFALO[0]);
|
||||
int killedGrendel = st.getInt("killed_" + GRENDEL[0]);
|
||||
|
||||
if (CommonUtil.contains(ANTELOPE, npc.getId()))
|
||||
{
|
||||
if (killedAntelope < 45)
|
||||
{
|
||||
killedAntelope++;
|
||||
st.set("killed_" + ANTELOPE[0], killedAntelope);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
else if (CommonUtil.contains(BANDERSNATCH, npc.getId()))
|
||||
{
|
||||
if (killedBandersnatch < 45)
|
||||
{
|
||||
killedBandersnatch++;
|
||||
st.set("killed_" + BANDERSNATCH[0], killedBandersnatch);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
else if (CommonUtil.contains(BUFFALO, npc.getId()))
|
||||
{
|
||||
if (killedBuffalo < 45)
|
||||
{
|
||||
killedBuffalo++;
|
||||
st.set("killed_" + BUFFALO[0], killedBuffalo);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (killedGrendel < 45)
|
||||
{
|
||||
killedGrendel++;
|
||||
st.set("killed_" + GRENDEL[0], killedGrendel);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
|
||||
if ((killedAntelope == 45) && (killedBandersnatch == 45) && (killedBuffalo == 45) && (killedGrendel == 45))
|
||||
{
|
||||
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<>(4);
|
||||
npcLogList.add(new NpcLogListHolder(ANTELOPE[0], false, st.getInt("killed_" + ANTELOPE[0])));
|
||||
npcLogList.add(new NpcLogListHolder(BANDERSNATCH[0], false, st.getInt("killed_" + BANDERSNATCH[0])));
|
||||
npcLogList.add(new NpcLogListHolder(BUFFALO[0], false, st.getInt("killed_" + BUFFALO[0])));
|
||||
npcLogList.add(new NpcLogListHolder(GRENDEL[0], false, st.getInt("killed_" + GRENDEL[0])));
|
||||
return npcLogList;
|
||||
}
|
||||
return super.getNpcLogList(activeChar);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user