This commit is contained in:
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Ah, so my eyes do not deceive me! You are real, aren't you? And you don't look like one of those bloody monks, thank goodness. I've got a story to tell, if you'd listen. Thing is... I'm in disguise. I snuck into this Monastery because I heard there was a great treasure here but I'm so lost I was starting to fear I'd end up hunkered down in a corner and eventually end up a bag of bones for all time.<br>
|
||||
You look like you still have your wits about you, you might be able to help me out. Could you show me the way? Please?!<br>
|
||||
<a action="bypass -h Quest Q00457_LostAndFound 32759-04.html">"Okay. I will do that."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-01a.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-01a.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Treasure hunter Gumiel:<br>
|
||||
Well this is a strange problem to have. Someone is actually helping me out of this labyrinth right now. And I don't know if they'll like me talking to anyone, so please don't.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-02.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-02.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Hm... could it be over here? I think I saw that column before. In fact I'm sure of it. Blast, how do I tell the difference between a real wall and a fake wall!<br>
|
||||
Oh, sorry, you have that look of someone who needs help but I really can't. I mean, don't I look pretty busy right now? Sheez.<br>
|
||||
(This is a quest that can be taken once a day. It resets at 6:30am.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Guh, OK, I know I've been in this room before, because I've seen that ugly painting and smelled that stinky monk. Seriously, that one monk stinks so bad, he's become a landmark in this place for a treasure hunter like me. They say to follow your nose, but I never really took that saying seriously...<br>
|
||||
(Only characters level 82 and above can take this quest.)
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-04.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-04.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Oh thank you so much! I don't care which exit, west or east, just as long as I get out of here.<br>
|
||||
<a action="bypass -h Quest Q00457_LostAndFound 32759-06.html">"Follow me then, and don't get lost."</a><br>
|
||||
<a action="bypass -h Quest Q00457_LostAndFound 32759-05.html">"OK but wait a moment while I prepare."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-05.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-05.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Seriously, I don't care which exit, I just want out of here. I NEED out of here. PLEASE.<br>
|
||||
<a action="bypass -h Quest Q00457_LostAndFound 32759-06.html">"Then, follow me."</a><br>
|
||||
<a action="bypass -h Quest Q00457_LostAndFound 32759-07.html">"OK but wait a moment while I prepare."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-06.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-06.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Phew alright! Let's get going!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-07.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-07.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Alright alright, I'll wait. But just for you!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-08.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-08.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Oh man... how much longer 'til we get there? I'm getting seriously thirsty. Maybe we should ask for directions? Ugh, I hope there's a bathroom around here somewhere.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-09.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759-09.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Treasure Hunter Gumiel:<br>
|
||||
Wow, great! We finally got out of that place! If I never see a monk again, it'll be too soon. Following rumors can be dangerous, eh? Well anyway, I did find SOMETHING that seems valuable, but since you helped me out of there, I think you deserve it.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/32759.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Treasure Hunter Gumiel<br>
|
||||
Oh crap... I think I took a wrong turn back there... ugh, no treasure's worth this! And these monks, they're all so terribly weird. I'm sure you've had problems here too. Without food and rest, you're liable to pass out.<br>
|
||||
Maybe, I should leave this place... anyway, what brought you here?<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest Q00457_LostAndFound">Quest</a>
|
||||
</body></html>
|
251
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/Q00457_LostAndFound.java
vendored
Normal file
251
trunk/dist/game/data/scripts/quests/Q00457_LostAndFound/Q00457_LostAndFound.java
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
/*
|
||||
* 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.Q00457_LostAndFound;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.datatables.SpawnTable;
|
||||
import com.l2jserver.gameserver.enums.QuestType;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
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;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
* Lost and Found (457)
|
||||
* @author nonom
|
||||
*/
|
||||
public final class Q00457_LostAndFound extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int GUMIEL = 32759;
|
||||
private static final int ESCORT_CHECKER = 32764;
|
||||
private static final int[] SOLINA_CLAN =
|
||||
{
|
||||
22789, // Guide Solina
|
||||
22790, // Seeker Solina
|
||||
22791, // Savior Solina
|
||||
22793, // Ascetic Solina
|
||||
};
|
||||
// Misc
|
||||
private static final int PACKAGED_BOOK = 15716;
|
||||
private static final int CHANCE_SPAWN = 1; // 1%
|
||||
private static final int MIN_LV = 82;
|
||||
private static Set<L2Spawn> _escortCheckers;
|
||||
|
||||
public Q00457_LostAndFound()
|
||||
{
|
||||
super(457, Q00457_LostAndFound.class.getSimpleName(), "Lost and Found");
|
||||
addStartNpc(GUMIEL);
|
||||
addSpawnId(ESCORT_CHECKER);
|
||||
addFirstTalkId(GUMIEL);
|
||||
addTalkId(GUMIEL);
|
||||
addKillId(SOLINA_CLAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32759-06.html":
|
||||
{
|
||||
npc.setScriptValue(0);
|
||||
st.startQuest();
|
||||
npc.setTarget(player);
|
||||
npc.setWalking();
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||
startQuestTimer("CHECK", 1000, npc, player, true);
|
||||
startQuestTimer("TIME_LIMIT", 600000, npc, player);
|
||||
startQuestTimer("TALK_TIME", 120000, npc, player);
|
||||
startQuestTimer("TALK_TIME2", 30000, npc, player);
|
||||
break;
|
||||
}
|
||||
case "TALK_TIME":
|
||||
{
|
||||
broadcastNpcSay(npc, player, NpcStringId.AH_I_THINK_I_REMEMBER_THIS_PLACE, false);
|
||||
break;
|
||||
}
|
||||
case "TALK_TIME2":
|
||||
{
|
||||
broadcastNpcSay(npc, player, NpcStringId.WHAT_WERE_YOU_DOING_HERE, false);
|
||||
startQuestTimer("TALK_TIME3", 10 * 1000, npc, player);
|
||||
break;
|
||||
}
|
||||
case "TALK_TIME3":
|
||||
{
|
||||
broadcastNpcSay(npc, player, NpcStringId.I_GUESS_YOU_RE_THE_SILENT_TYPE_THEN_ARE_YOU_LOOKING_FOR_TREASURE_LIKE_ME, false);
|
||||
break;
|
||||
}
|
||||
case "TIME_LIMIT":
|
||||
{
|
||||
startQuestTimer("STOP", 2000, npc, player);
|
||||
st.exitQuest(QuestType.DAILY);
|
||||
break;
|
||||
}
|
||||
case "CHECK":
|
||||
{
|
||||
final double distance = npc.calculateDistance(player, true, false);
|
||||
if (distance > 1000)
|
||||
{
|
||||
if (distance > 5000)
|
||||
{
|
||||
startQuestTimer("STOP", 2000, npc, player);
|
||||
st.exitQuest(QuestType.DAILY);
|
||||
}
|
||||
else if (npc.isScriptValue(0))
|
||||
{
|
||||
broadcastNpcSay(npc, player, NpcStringId.HEY_DON_T_GO_SO_FAST, true);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
else if (npc.isScriptValue(1))
|
||||
{
|
||||
broadcastNpcSay(npc, player, NpcStringId.IT_S_HARD_TO_FOLLOW, true);
|
||||
npc.setScriptValue(2);
|
||||
}
|
||||
else if (npc.isScriptValue(2))
|
||||
{
|
||||
startQuestTimer("STOP", 2000, npc, player);
|
||||
st.exitQuest(QuestType.DAILY);
|
||||
}
|
||||
}
|
||||
for (L2Spawn escortSpawn : _escortCheckers)
|
||||
{
|
||||
final L2Npc escort = escortSpawn.getLastSpawn();
|
||||
if ((escort != null) && npc.isInsideRadius(escort, 1000, false, false))
|
||||
{
|
||||
startQuestTimer("STOP", 1000, npc, player);
|
||||
startQuestTimer("BYE", 3000, npc, player);
|
||||
cancelQuestTimer("CHECK", npc, player);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), Say2.NPC_ALL, npc.getName(), NpcStringId.AH_FRESH_AIR));
|
||||
broadcastNpcSay(npc, player, NpcStringId.AH_FRESH_AIR, false);
|
||||
st.giveItems(PACKAGED_BOOK, 1);
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "STOP":
|
||||
{
|
||||
npc.setTarget(null);
|
||||
npc.getAI().stopFollow();
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
cancelQuestTimer("CHECK", npc, player);
|
||||
cancelQuestTimer("TIME_LIMIT", npc, player);
|
||||
cancelQuestTimer("TALK_TIME", npc, player);
|
||||
cancelQuestTimer("TALK_TIME2", npc, player);
|
||||
break;
|
||||
}
|
||||
case "BYE":
|
||||
{
|
||||
npc.deleteMe();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (npc.getTarget() != null)
|
||||
{
|
||||
return npc.getTarget().equals(player) ? "32759-08.html" : "32759-01a.html";
|
||||
}
|
||||
return "32759.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
|
||||
if ((getRandom(100) < CHANCE_SPAWN) && st.isNowAvailable() && (player.getLevel() >= MIN_LV))
|
||||
{
|
||||
addSpawn(GUMIEL, npc);
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
QuestState st = getQuestState(player, true);
|
||||
if (st == null)
|
||||
{
|
||||
st = newQuestState(player);
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LV) ? "32759-01.htm" : "32759-03.html";
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (st.isNowAvailable())
|
||||
{
|
||||
st.setState(State.CREATED);
|
||||
htmltext = (player.getLevel() >= MIN_LV) ? "32759-01.htm" : "32759-03.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32759-02.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
_escortCheckers = SpawnTable.getInstance().getSpawns(ESCORT_CHECKER);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public void broadcastNpcSay(L2Npc npc, L2PcInstance player, NpcStringId stringId, boolean whisper)
|
||||
{
|
||||
((whisper) ? player : npc).sendPacket(new NpcSay(npc.getObjectId(), ((whisper) ? Say2.TELL : Say2.ALL), npc.getId(), stringId));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user