Quests 10327 to 10330.
Contributed by Neanrakyr.
This commit is contained in:
parent
ebfe860e5a
commit
ed7940cda0
21
trunk/dist/game/data/instances/MuseumDungeon.xml
vendored
Normal file
21
trunk/dist/game/data/instances/MuseumDungeon.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<instance name="Museum Dungeon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<activityTime val="20" />
|
||||
<allowSummon val="false" />
|
||||
<emptyDestroyTime val="60" />
|
||||
<spawnPoint spawnX="-114359" spawnY="260120" spawnZ="-1192" />
|
||||
<spawnlist>
|
||||
<group name="desks">
|
||||
<!-- Desk -->
|
||||
<spawn npcId="33126" x="-113744" y="244686" z="-7952" heading="0" respawn="0" />
|
||||
<spawn npcId="33126" x="-114713" y="245760" z="-7952" heading="0" respawn="0" />
|
||||
<spawn npcId="33126" x="-115684" y="244677" z="-7952" heading="0" respawn="0" />
|
||||
<spawn npcId="33126" x="-114717" y="243602" z="-7952" heading="0" respawn="0" />
|
||||
</group>
|
||||
<group name="thiefs">
|
||||
<!-- Thief -->
|
||||
<spawn npcId="23121" x="-114865" y="244942" z="-7984" heading="0" respawn="0" />
|
||||
<spawn npcId="23121" x="-114576" y="244952" z="-7976" heading="0" respawn="0" />
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
2
trunk/dist/game/data/scripts.cfg
vendored
2
trunk/dist/game/data/scripts.cfg
vendored
@ -85,6 +85,8 @@ ai/npc/Teleports/TeleportToUndergroundColiseum/TeleportToUndergroundColiseum.jav
|
||||
ai/npc/Teleports/TeleportWithCharm/TeleportWithCharm.java
|
||||
ai/npc/Teleports/ToIVortex/ToIVortex.java
|
||||
ai/npc/Teleports/Warpgate/Warpgate.java
|
||||
ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java
|
||||
ai/npc/Toyron/Toyron.java
|
||||
ai/npc/Trainers/HealerTrainer/HealerTrainer.java
|
||||
ai/npc/Trandon/Trandon.java
|
||||
ai/npc/Tunatun/Tunatun.java
|
||||
|
3
trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/33180.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/33180.html
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Ye Sagira Teleport Device:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest YeSagiraTeleporter teleport">Enter the Ruins of Ye Sagira</Button>
|
||||
</body></html>
|
86
trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java
vendored
Normal file
86
trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 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 ai.npc.Teleports.YeSagiraTeleporter;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.events.EventType;
|
||||
import com.l2jserver.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jserver.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jserver.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerCreate;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public final class YeSagiraTeleporter extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int YE_SAGIRA_TELEPORTER = 33180;
|
||||
// Location
|
||||
private static final Location TELEPORT = new Location(-114675, 230171, -1648);
|
||||
// Misc
|
||||
private static final int MAX_LEVEL = 20;
|
||||
// Variables names
|
||||
private static final String MOVIE_VAR = "TI_YeSagira_movie";
|
||||
// Movies
|
||||
public static final int YE_SAGIRA = 103;
|
||||
|
||||
private YeSagiraTeleporter()
|
||||
{
|
||||
super(YeSagiraTeleporter.class.getSimpleName(), "ai/npc/Teleports");
|
||||
addStartNpc(YE_SAGIRA_TELEPORTER);
|
||||
addFirstTalkId(YE_SAGIRA_TELEPORTER);
|
||||
addTalkId(YE_SAGIRA_TELEPORTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("teleport"))
|
||||
{
|
||||
if (player.getVariables().getBoolean(MOVIE_VAR, false))
|
||||
{
|
||||
if (player.getLevel() <= MAX_LEVEL)
|
||||
{
|
||||
player.showQuestMovie(YE_SAGIRA);
|
||||
}
|
||||
player.getVariables().remove(MOVIE_VAR);
|
||||
}
|
||||
player.teleToLocation(TELEPORT);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_PLAYER_CREATE)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void OnPlayerCreate(OnPlayerCreate event)
|
||||
{
|
||||
final L2PcInstance player = event.getActiveChar();
|
||||
player.getVariables().set(MOVIE_VAR, true);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new YeSagiraTeleporter();
|
||||
}
|
||||
}
|
3
trunk/dist/game/data/scripts/ai/npc/Toyron/33004-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/ai/npc/Toyron/33004-01.html
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Toyron:<br>
|
||||
You! Aren't you here to find the <font color="LEVEL">book</font>?
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/ai/npc/Toyron/33004-02.html
vendored
Normal file
4
trunk/dist/game/data/scripts/ai/npc/Toyron/33004-02.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Toyron:<br>
|
||||
They're destroying the holy museum!<br>
|
||||
Defeat them!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/ai/npc/Toyron/33004.html
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/npc/Toyron/33004.html
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Toyron:<br>
|
||||
This museum displays the Giants' relics. Unfortunately, it's sometimes plagued by thieves.<br>
|
||||
There are always more. We still uncover treasures in their ruins.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Toyron museum_teleport">"I'll return to the Museum Lobby now."</Button>
|
||||
</body></html>
|
114
trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java
vendored
Normal file
114
trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 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 ai.npc.Toyron;
|
||||
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public final class Toyron extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int TOYRON = 33004;
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 182;
|
||||
// Location
|
||||
private static final Location MUSEUM_OUT = new Location(-114359, 260120, -1192);
|
||||
|
||||
private Toyron()
|
||||
{
|
||||
super(Toyron.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(TOYRON);
|
||||
addFirstTalkId(TOYRON);
|
||||
addTalkId(TOYRON);
|
||||
addSpawnId(TOYRON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
|
||||
if (event.equals("museum_teleport"))
|
||||
{
|
||||
if ((world != null) && (world.getTemplateId() == TEMPLATE_ID))
|
||||
{
|
||||
world.removeAllowed(player.getObjectId());
|
||||
teleportPlayer(player, MUSEUM_OUT, 0);
|
||||
}
|
||||
player.teleToLocation(MUSEUM_OUT);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
npc.setIsInvul(true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
|
||||
if ((world != null) && (world.getTemplateId() == TEMPLATE_ID))
|
||||
{
|
||||
if (qs != null)
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
return "33004-01.html";
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
return "33004-02.html";
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
return "33004.html";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "33004.html";
|
||||
}
|
||||
}
|
||||
return "33004.html";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Toyron();
|
||||
}
|
||||
}
|
@ -47,6 +47,7 @@ import instances.LibraryOfSages.LibraryOfSages;
|
||||
import instances.MithrilMine.MithrilMine;
|
||||
import instances.MonasteryOfSilence1.MonasteryOfSilence1;
|
||||
import instances.MonasteryOfSilence2.MonasteryOfSilence2;
|
||||
import instances.MuseumDungeon.MuseumDungeon;
|
||||
import instances.NornilsGarden.NornilsGarden;
|
||||
import instances.PailakaDevilsLegacy.PailakaDevilsLegacy;
|
||||
import instances.PailakaSongOfIceAndFire.PailakaSongOfIceAndFire;
|
||||
@ -94,6 +95,7 @@ public final class InstanceLoader
|
||||
MithrilMine.class,
|
||||
MonasteryOfSilence1.class,
|
||||
MonasteryOfSilence2.class,
|
||||
MuseumDungeon.class,
|
||||
NornilsGarden.class,
|
||||
PailakaDevilsLegacy.class,
|
||||
PailakaSongOfIceAndFire.class,
|
||||
|
3
trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html
vendored
Normal file
3
trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>[Desk]:<br>
|
||||
You've found <font color="LEVEL">The War of Gods and Giants</font>. Take it back to Pantheon.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html
vendored
Normal file
4
trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>[Desk]:<br>
|
||||
After searching, you are unable to find <font color="LEVEL">The War of Gods and Giants</font> on this desk.<br>
|
||||
Try another desk.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/instances/MuseumDungeon/33126.html
vendored
Normal file
4
trunk/dist/game/data/scripts/instances/MuseumDungeon/33126.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>[Desk]<br>
|
||||
A desk normally used by Pantheon.<br>
|
||||
It's so disorganized, it'll take a while to search it.
|
||||
</body></html>
|
308
trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java
vendored
Normal file
308
trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java
vendored
Normal file
@ -0,0 +1,308 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 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 instances.MuseumDungeon;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2QuestGuardInstance;
|
||||
import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public final class MuseumDungeon extends AbstractInstance
|
||||
{
|
||||
// Npcs
|
||||
private static final int PANTHEON = 32972;
|
||||
private static final int TOYRON = 33004;
|
||||
private static final int DESK = 33126;
|
||||
private static final int THIEF = 23121;
|
||||
// Items
|
||||
private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575;
|
||||
// Locations
|
||||
private static final Location START_LOC = new Location(-114711, 243911, -7968);
|
||||
private static final Location TOYRON_SPAWN = new Location(-114707, 245428, -7968);
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 182;
|
||||
private static final NpcStringId[] TOYRON_SHOUT =
|
||||
{
|
||||
NpcStringId.YOUR_NORMAL_ATTACKS_AREN_T_WORKING,
|
||||
NpcStringId.LOOKS_LIKE_ONLY_SKILL_BASED_ATTACKS_DAMAGE_THEM
|
||||
};
|
||||
private static final NpcStringId[] THIEF_SHOUT =
|
||||
{
|
||||
NpcStringId.YOU_LL_NEVER_LEAVE_WITH_THAT_BOOK,
|
||||
NpcStringId.FINALLY_I_THOUGHT_I_WAS_GOING_TO_DIE_WAITING
|
||||
};
|
||||
|
||||
protected class MDWorld extends InstanceWorld
|
||||
{
|
||||
protected L2QuestGuardInstance toyron = null;
|
||||
protected L2MonsterInstance thief = null;
|
||||
protected List<L2Npc> desks;
|
||||
protected Set<L2Npc> spawnedThiefs = Collections.newSetFromMap(new ConcurrentHashMap<L2Npc, Boolean>());
|
||||
protected int bookDesk = 0;
|
||||
protected int killedThiefs = 0;
|
||||
}
|
||||
|
||||
public MuseumDungeon()
|
||||
{
|
||||
super(MuseumDungeon.class.getSimpleName());
|
||||
addStartNpc(PANTHEON);
|
||||
addTalkId(PANTHEON);
|
||||
addTalkId(TOYRON);
|
||||
addFirstTalkId(DESK);
|
||||
addAttackId(THIEF);
|
||||
addKillId(THIEF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("enter_instance"))
|
||||
{
|
||||
enterInstance(player, new MDWorld(), "MuseumDungeon.xml", TEMPLATE_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof MDWorld))
|
||||
{
|
||||
final MDWorld world = (MDWorld) tmpworld;
|
||||
switch (event)
|
||||
{
|
||||
case "toyron_follow":
|
||||
{
|
||||
world.toyron.getAI().startFollow(player);
|
||||
break;
|
||||
}
|
||||
case "toyron_shout":
|
||||
{
|
||||
if (!world.toyron.canTarget(player))
|
||||
{
|
||||
cancelQuestTimer("toyron_shout", world.toyron, player);
|
||||
}
|
||||
broadcastNpcSay(world.toyron, ChatType.NPC_GENERAL, TOYRON_SHOUT[getRandom(2)]);
|
||||
break;
|
||||
}
|
||||
case "spawn_thiefs_stage_1":
|
||||
{
|
||||
final List<L2Npc> thiefs = spawnGroup("thiefs", world.getInstanceId());
|
||||
world.spawnedThiefs.addAll(thiefs);
|
||||
for (L2Npc thief : world.spawnedThiefs)
|
||||
{
|
||||
thief.setIsRunning(true);
|
||||
addAttackPlayerDesire(thief, player);
|
||||
broadcastNpcSay(thief, ChatType.NPC_GENERAL, THIEF_SHOUT[getRandom(2)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "spawn_thiefs_stage_2":
|
||||
{
|
||||
final List<L2Npc> thiefs = spawnGroup("thiefs", world.getInstanceId());
|
||||
world.spawnedThiefs.addAll(thiefs);
|
||||
for (L2Npc thief : world.spawnedThiefs)
|
||||
{
|
||||
thief.setIsRunning(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "check_follow":
|
||||
{
|
||||
if (world.toyron.canTarget(player))
|
||||
{
|
||||
startQuestTimer("toyron_follow", 500, world.toyron, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "kill_thief":
|
||||
{
|
||||
npc.doDie(player);
|
||||
startQuestTimer("toyron_follow", 500, world.toyron, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
final MDWorld world = (MDWorld) tmpworld;
|
||||
|
||||
if ((qs != null) && qs.isCond(2))
|
||||
{
|
||||
if (world.killedThiefs >= 1)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
}
|
||||
else
|
||||
{
|
||||
world.killedThiefs++;
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
final MDWorld world = (MDWorld) tmpworld;
|
||||
|
||||
if (skill != null)
|
||||
{
|
||||
broadcastNpcSay(world.toyron, ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME);
|
||||
world.toyron.reduceCurrentHp(1, npc, null);
|
||||
npc.reduceCurrentHp(1, world.toyron, null);
|
||||
startQuestTimer("kill_thief", 2500, npc, attacker);
|
||||
}
|
||||
else
|
||||
{
|
||||
showOnScreenMsg(attacker, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
final MDWorld world = (MDWorld) tmpworld;
|
||||
String htmltext = null;
|
||||
|
||||
if (qs == null)
|
||||
{
|
||||
htmltext = "33126.html";
|
||||
}
|
||||
else if (qs.isCond(1))
|
||||
{
|
||||
if (((npc.getObjectId() == world.bookDesk) && !qs.hasQuestItems(THE_WAR_OF_GODS_AND_GIANTS)))
|
||||
{
|
||||
qs.setCond(2);
|
||||
giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1);
|
||||
showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
startQuestTimer("spawn_thiefs_stage_1", 500, world.thief, player);
|
||||
startQuestTimer("toyron_follow", 500, world.toyron, player);
|
||||
htmltext = "33126-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "33126-02.html";
|
||||
}
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "33126.html";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
protected void spawnToyron(L2PcInstance player, MDWorld world)
|
||||
{
|
||||
if (world.toyron != null)
|
||||
{
|
||||
world.toyron.deleteMe();
|
||||
}
|
||||
world.toyron = (L2QuestGuardInstance) addSpawn(TOYRON, TOYRON_SPAWN, false, 0, true, world.getInstanceId());
|
||||
world.toyron.setIsRunning(true);
|
||||
world.toyron.setCanReturnToSpawnPoint(false);
|
||||
}
|
||||
|
||||
protected void checkStage(L2PcInstance player, MDWorld world)
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
|
||||
if (qs != null)
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
if (world.spawnedThiefs.isEmpty())
|
||||
{
|
||||
startQuestTimer("spawn_thiefs_stage_2", 500, world.thief, player);
|
||||
startQuestTimer("toyron_follow", 500, world.toyron, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
startQuestTimer("check_follow", 1000, world.toyron, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void spawnDesks(L2PcInstance player, MDWorld world)
|
||||
{
|
||||
final List<L2Npc> desks = spawnGroup("desks", world.getInstanceId());
|
||||
for (L2Npc desk : desks)
|
||||
{
|
||||
double point = Math.random();
|
||||
int counter = 0;
|
||||
if (((point <= 0.25) && (counter == 0)) || ((point > 0.25) && (point <= 0.5) && (counter == 1)) || ((point > 0.5) && (point <= 0.75) && (counter == 2)) || ((point > 0.75) && (counter == 3)))
|
||||
{
|
||||
world.bookDesk = desk.getObjectId();
|
||||
}
|
||||
++counter;
|
||||
}
|
||||
if ((world.bookDesk == 0) && (desks.size() > 0))
|
||||
{
|
||||
world.bookDesk = desks.get(0).getObjectId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
|
||||
{
|
||||
if (firstEntrance)
|
||||
{
|
||||
world.addAllowed(player.getObjectId());
|
||||
spawnToyron(player, (MDWorld) world);
|
||||
spawnDesks(player, (MDWorld) world);
|
||||
}
|
||||
teleportPlayer(player, START_LOC, world.getInstanceId());
|
||||
checkStage(player, (MDWorld) world);
|
||||
}
|
||||
}
|
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Gallint is hurt and cannot move, but we must do something about the books before they get stolen.<br>
|
||||
They're looking for <font color="LEVEL">The War of Gods and Giants</font> mostly, but there are a couple of others they'd probably find useful too.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10327_IntruderWhoWantsTheBookOfGiants 32972-02.htm">"The War of Gods and Giants?"</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Pantheon:<br>
|
||||
We think they were looking for anything related to the Giants,and tried to steal The War of Gods and Giants, an ancient book that was discovered in Ye Sagira.<br>
|
||||
It has many stories about the powers of the Giants, how that power can be learned, and about others species from their time. Now that the island has crashed, perhaps we should think about safeguarding the book...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10327_IntruderWhoWantsTheBookOfGiants 32972-03.htm">"I'd like to help."</Button>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.htm
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Thank you!<br1>
|
||||
When you get to the museum, you should see a number of desks - <font color="LEVEL">one of them</font> has <font color="LEVEL">The War of Giants and Gods</font> on it. Find it, and bring it to me.<br>
|
||||
Would you like to go to the museum?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest MuseumDungeon enter_instance">"Yes."</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Pantheon:<br>
|
||||
You're still here<br1>
|
||||
Go into the museum!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest MuseumDungeon enter_instance">"On my way!"</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pantheon:<br>
|
||||
I just saw suspicious intruders entering the Museum! I fear for the rare valuable articles inside the Museum. Please hurry into the Museum and deal with the intruders!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest MuseumDungeon enter_instance">"Sure. I am going in."</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><head><body>Pantheon:<br>
|
||||
You've brought the book? Good! It must have been difficult to find it amongst all those others!<br>
|
||||
I hope you didn't get hurt either - Gallint may be a fool, but plenty have hurt themselves moving books around before him.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10327_IntruderWhoWantsTheBookOfGiants 32972-07.htm">"I had to fight someone!"</Button>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<html><body>Pantheon:<br>
|
||||
What? The thieves are getting more brash by the day!<br>
|
||||
Hmm... So, I wonder if the books related to Giants... are also related to Embryo. It's just speculation, but something worth considering.<br>
|
||||
Now, I must apologize for placing you in harm's way. Please accept these Earrings - accessories such as these help protect you against magic!<br>
|
||||
Remember: you can wear up to two <font color="LEVEL">earrings</font> at a time. Purchase more from the <font color="LEVEL">General Merchant</font> if you wish.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pantheon:<br>
|
||||
I'm still looking into things, friend. I'll let you know when I find anything<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pantheon:<br>
|
||||
This mission can't be give to just anyone!<br>
|
||||
(Only characters below 20, who've completed the "Let's Respect Elders" quest, may start this quest.)
|
||||
</body></html>
|
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 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.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
|
||||
import quests.Q10326_RespectYourElders.Q10326_RespectYourElders;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
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.serverpackets.ExShowScreenMessage;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest
|
||||
{
|
||||
// Npcs
|
||||
private static final int PANTHEON = 32972;
|
||||
// Items
|
||||
private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575;
|
||||
private static final ItemHolder APPRENTICE_EARRING = new ItemHolder(112, 2);
|
||||
// Level Condition
|
||||
private static final int MAX_LEVEL = 20;
|
||||
|
||||
public Q10327_IntruderWhoWantsTheBookOfGiants()
|
||||
{
|
||||
super(10327, Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName(), "Intruder Who Wants the Book of Giants ");
|
||||
addStartNpc(PANTHEON);
|
||||
addTalkId(PANTHEON);
|
||||
registerQuestItems(THE_WAR_OF_GODS_AND_GIANTS);
|
||||
addCondMaxLevel(MAX_LEVEL, "32972-09.htm");
|
||||
addCondCompletedQuest(Q10326_RespectYourElders.class.getSimpleName(), "32972-09.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32972-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32972-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32972-07.htm":
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
giveAdena(player, 160, true);
|
||||
giveItems(player, APPRENTICE_EARRING);
|
||||
addExpAndSp(player, 7800, 5);
|
||||
qs.exitQuest(false, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = "32972-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
htmltext = "32972-04.htm";
|
||||
break;
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "32972-05.htm";
|
||||
break;
|
||||
}
|
||||
else if (qs.isCond(3))
|
||||
{
|
||||
htmltext = "32972-06.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = "32972-08.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-01.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
What... what do you have there in your hand? Whatever it is, it's giving me a killer headache... Oh, you've got yourself a nasty little Evil Fragment, huh. You've seen Pantheon, have you? Hand that thing over and let me quench it before we both get migraines.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10328_RequestToSealTheEvilFragment 30565-02.htm">"Here is the Evil Fragment."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-02.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><head><body>Pa'agrio Lord Kakai:<br>
|
||||
Whoa! Step back a bit, that's one potent and nasty Evil Fragment you've got there. From Pantheon, huh? What does he want me to do with it?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10328_RequestToSealTheEvilFragment 30565-03.htm">"He wants you to seal this."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-03.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
Hmm, good idea. Sealing it is probably safer than destroying it. This stuff tends to cause quite the explosion if you mess up when trying to destroy it. I can weave the power of Pa'agrio around it. That should make a sufficient seal. Nasty piece of work.<br>
|
||||
Did you know that these things were parasitic? Yah. There's been an influx of Evil Fragments in Ruins of Ye Sagira. When anyone dies out there, the pieces latch on to the corpse. Gross. But it's even worse when they latch on to living bodies! We've had a few outbreaks in the village lately. The damage those things inflict is incredible and down right disturbing!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-04.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-04.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
If you're wondering about that Evil Fragment, no worries, It's been nullified.<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-01.htm
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<html><body>Pantheon:<br>
|
||||
I have a favor to ask of you.<br1>
|
||||
As I mentioned, the people who attacked you in the museum have broken in before, and we want to find out who they are. As luck would have it, they dropped this little beauty. I want you to take it to a friend of mine...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10328_RequestToSealTheEvilFragment 32972-02.htm">"Take what?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10328_RequestToSealTheEvilFragment 32972-03.htm">"What should I do?"</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-02.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><head><body>Pantheon:<br>
|
||||
It's an Evil Fragment. Our research has shown that by itself it is completely harmless.<br>
|
||||
However, when they incubate in the corpses buried under Ye Sagira they create horrible creatures.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10328_RequestToSealTheEvilFragment 32972-03.htm">"Well that's disgusting. What do you want me to do with it?"</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-03.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-03.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Well, we don't know when the monster will hatch, so we want you to destroy it as soon as possible! Asterios, the head of the elves, is away, so the only one that can seal the seed is Kakai, leader of the Orcs.<br>
|
||||
We want you to take the seed to <font color="LEVEL">Pa'agrio Lord Kakai</font>, he's in the Administration Office.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10328_RequestToSealTheEvilFragment 32972-04.htm">"Sounds easy. I'll do it."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-04.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-04.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Thank you!<br1>
|
||||
Here it is, now hurry to <font color="LEVEL">Pa'agrio Lord Kakai</font> before the fragment hatches!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-05.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-05.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Pantheon:<br>
|
||||
If the fragment hatches in the museum, it'ill be a complete disaster! Go to <font color="LEVEL">Pa'agrio Lord Kakai</font> in the <font color="LEVEL">Administration Office</font> and have him destroy it!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-06.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-06.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pantheon:<br>
|
||||
I'm sorry. The time hasn't come for you.<br>
|
||||
(Only characters under level 20, who have completed the "Looking for New Power" quest, may start this quest.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-07.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-07.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Evil Fragment is a walking corpse! It's horriable, don't you think?<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 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.Q10328_RequestToSealTheEvilFragment;
|
||||
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public final class Q10328_RequestToSealTheEvilFragment extends Quest
|
||||
{
|
||||
// Npcs
|
||||
private static final int PANTHEON = 32972;
|
||||
private static final int KAKAI = 30565;
|
||||
|
||||
// Items
|
||||
private static final int EVIL_FRAGMENT = 17577;
|
||||
|
||||
// Level Condition
|
||||
private static final int MAX_LEVEL = 20;
|
||||
|
||||
public Q10328_RequestToSealTheEvilFragment()
|
||||
{
|
||||
super(10328, Q10328_RequestToSealTheEvilFragment.class.getSimpleName(), "Request to Seal the Evil Fragment");
|
||||
addStartNpc(PANTHEON);
|
||||
addTalkId(PANTHEON, KAKAI);
|
||||
addCondMaxLevel(MAX_LEVEL, "32972-06.htm");
|
||||
registerQuestItems(EVIL_FRAGMENT);
|
||||
addCondCompletedQuest(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName(), "32972-06.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32972-04.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
qs.giveItems(EVIL_FRAGMENT, 1);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32972-02.htm":
|
||||
case "32972-03.htm":
|
||||
case "30565-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30565-03.htm":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
giveAdena(player, 20000, true);
|
||||
addExpAndSp(player, 13000, 5);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (npc.getId() == PANTHEON)
|
||||
{
|
||||
htmltext = "32972-01.htm";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = npc.getId() == PANTHEON ? "32972-05.htm" : "30565-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = npc.getId() == PANTHEON ? "32972-07.htm" : "30565-04.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-01.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
Young one, I've been watching you for some time. You are powerful and good, yes, you've got a true Heart of Flame! Would you like to apply that flame and your enthusiasm to aid the village?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10329_BackupSeekers 30565-02.htm">"What should I do?"</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-02.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
The Evil Fragments continue to spread. It's beginning to be a toss up whether we're doing archaeology or parasite control over in the ruins. I'd love to send over some reinforcements, but we've had a rash of monster attacks in the village, so I can't just reassign troops.<br>
|
||||
Could you head on over to Ye Sagira and help out?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10329_BackupSeekers 30565-03.htm">"No problem."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-03.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
You can find <font color="LEVEL">Atran</font> at the <font color="LEVEL">crossroads, on the way from the village to Ye Sagira</font>. Don't let his gruff exterior fool you, he talks like an ogre, but he's sweet as spun candy at the core.<br>
|
||||
If you tell him I sent you, he'll tell you how to get to Ye Sagira. May the luck of Pa'agrio always find you.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-04.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
Have you met <font color="LEVEL">Atran</font> before? He's at the <font color="LEVEL">crossroads, between the village and Esaria</font>.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-05.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
I taught Pantheon's son, Saril, swordmanship when he was a young lad. Nice kid. Has a mean. sixte parry.<br>
|
||||
(Only characters who have completed the Level 20 or below quest, Request to Seal Pieces of Evil, can take this quest.).
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-06.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-06.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Pa'agrio Lord Kakai:<br>
|
||||
I will pray that the flame of Pa'agrio always support you in your journeys.<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-01.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Atran:<br>
|
||||
Why are you looking at me like that? It makes me feel terrible! Who are you? Huh?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10329_BackupSeekers 33448-02.htm">"Kakai sent me."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-02.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Atran:<br>
|
||||
What? Kakai sent you? You should've told me - I almost hit you! Identify yourself next time!<br>
|
||||
Well, to be honest, you're useless to me. There's no reason for you to be here.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-03.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Atran:<br>
|
||||
So, so, so, so, so bored.<br>
|
||||
(The quest has already been completed)
|
||||
</body></html>
|
293
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/Q10329_BackupSeekers.java
vendored
Normal file
293
trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/Q10329_BackupSeekers.java
vendored
Normal file
@ -0,0 +1,293 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Mobius 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.Q10329_BackupSeekers;
|
||||
|
||||
import quests.Q10328_RequestToSealTheEvilFragment.Q10328_RequestToSealTheEvilFragment;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.events.EventType;
|
||||
import com.l2jserver.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jserver.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jserver.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerTransform;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
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.serverpackets.ExRotation;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public class Q10329_BackupSeekers extends Quest
|
||||
{
|
||||
// Npcs
|
||||
private static final int KAKAI = 30565;
|
||||
private static final int ATRAN = 33448;
|
||||
private static final int BART = 33204;
|
||||
|
||||
// Items
|
||||
private static final ItemHolder RING_OF_KNOWLEDGE = new ItemHolder(875, 2);
|
||||
private static final ItemHolder NECKLACE_OF_KNOWLEDGE = new ItemHolder(906, 1);
|
||||
|
||||
// Misc
|
||||
private static final int MAX_LEVEL = 20;
|
||||
private static final Location BART_SPAWN_1 = new Location(-117955, 255832, -1320);
|
||||
private static final Location BART_SPAWN_2 = new Location(-114121, 252445, -1560);
|
||||
private final static Location[] BART_LOC_1 =
|
||||
{
|
||||
new Location(-117063, 255528, -1296),
|
||||
new Location(-115766, 254791, -1504),
|
||||
new Location(-114753, 254755, -1528),
|
||||
new Location(-114606, 253534, -1528),
|
||||
new Location(-114375, 252807, -1536),
|
||||
};
|
||||
private final static Location[] BART_LOC_2 =
|
||||
{
|
||||
new Location(-114410, 252220, -1591),
|
||||
new Location(-114416, 250812, -1760),
|
||||
new Location(-113217, 250445, -1912),
|
||||
new Location(-112721, 250479, -1984),
|
||||
new Location(-112093, 249769, -2248),
|
||||
new Location(-110988, 249191, -2512),
|
||||
new Location(-110110, 248374, -2688),
|
||||
new Location(-109831, 247993, -2760),
|
||||
new Location(-109702, 247037, -2960),
|
||||
new Location(-109180, 247015, -3088),
|
||||
new Location(-107839, 248766, -3216),
|
||||
};
|
||||
|
||||
public Q10329_BackupSeekers()
|
||||
{
|
||||
super(10329, Q10329_BackupSeekers.class.getSimpleName(), "Backup Seekers");
|
||||
addStartNpc(KAKAI);
|
||||
addTalkId(KAKAI, ATRAN);
|
||||
addSpawnId(BART);
|
||||
addMoveFinishedId(BART);
|
||||
addCondMaxLevel(MAX_LEVEL, "30565-05.htm");
|
||||
addCondCompletedQuest(Q10328_RequestToSealTheEvilFragment.class.getSimpleName(), "30565-05.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "30565-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30565-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
qs.setMemoState(1);
|
||||
final L2Npc bart = addSpawn(BART, BART_SPAWN_1, false, 300000);
|
||||
bart.broadcastPacket(new NpcSay(bart.getObjectId(), ChatType.NPC_GENERAL, bart.getTemplate().getDisplayId(), NpcStringId.I_WILL_GUIDE_YOU_FOLLOW_ME));
|
||||
startQuestTimer("MOVE_DELAY", 500, bart, player);
|
||||
break;
|
||||
}
|
||||
case "33448-02.htm":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
giveAdena(player, 25000, true);
|
||||
giveItems(player, RING_OF_KNOWLEDGE);
|
||||
giveItems(player, NECKLACE_OF_KNOWLEDGE);
|
||||
addExpAndSp(player, 16900, 5);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "CHECK_PLAYER":
|
||||
{
|
||||
final L2PcInstance owner = npc.getVariables().getObject("OWNER", L2PcInstance.class);
|
||||
if (owner != null)
|
||||
{
|
||||
if (npc.calculateDistance(owner, false, false) < 150)
|
||||
{
|
||||
npc.getVariables().set("FAIL_COUNT", 0);
|
||||
final int loc_index = npc.getVariables().getInt("MOVE_INDEX", -1) + 1;
|
||||
if (loc_index > 0)
|
||||
{
|
||||
if (qs.isMemoState(1))
|
||||
{
|
||||
if (loc_index == 5)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.TALK_TO_THAT_APPRENTICE_AND_GET_ON_KUKURI));
|
||||
startQuestTimer("DELETE_NPC", 2000, npc, owner);
|
||||
break;
|
||||
}
|
||||
npc.getVariables().set("MOVE_INDEX", loc_index);
|
||||
addMoveToDesire(npc, BART_LOC_1[loc_index], 0);
|
||||
}
|
||||
else if (qs.isMemoState(2))
|
||||
{
|
||||
if (loc_index == 11)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.THIS_IS_IT_FOR_ME));
|
||||
startQuestTimer("DELETE_NPC", 2000, npc, owner);
|
||||
break;
|
||||
}
|
||||
npc.getVariables().set("MOVE_INDEX", loc_index);
|
||||
addMoveToDesire(npc, BART_LOC_2[loc_index], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final int failCount = npc.getVariables().getInt("FAIL_COUNT", 0);
|
||||
npc.getVariables().set("FAIL_COUNT", failCount + 1);
|
||||
|
||||
if (failCount >= 30)
|
||||
{
|
||||
npc.deleteMe();
|
||||
break;
|
||||
}
|
||||
|
||||
startQuestTimer("CHECK_PLAYER", 1200, npc, owner);
|
||||
|
||||
if (getRandom(100) < 10)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.HEY_KID_HURRY_UP_AND_FOLLOW_ME));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "MOVE_DELAY":
|
||||
{
|
||||
if (qs.isMemoState(1))
|
||||
{
|
||||
npc.getVariables().set("OWNER", player);
|
||||
npc.setIsRunning(true);
|
||||
npc.broadcastInfo();
|
||||
addMoveToDesire(npc, BART_LOC_1[0], 0);
|
||||
npc.getVariables().set("MOVE_INDEX", 0);
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.YOU_MUST_BE_THE_ONE_KAKAI_TALKED_ABOUT));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.YOU_SHOULD_RIDE_KUKURI_TO_GO_TO_YE_SAGIRA));
|
||||
break;
|
||||
}
|
||||
else if (qs.isMemoState(2))
|
||||
{
|
||||
npc.getVariables().set("OWNER", player);
|
||||
npc.setIsRunning(true);
|
||||
npc.broadcastInfo();
|
||||
addMoveToDesire(npc, BART_LOC_2[0], 0);
|
||||
npc.getVariables().set("MOVE_INDEX", 0);
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.OPEN_YOUR_MAP_WHEN_YOU_ARRIVE_AT_YE_SAGIRA));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.IT_S_HARD_TO_TELL_WHERE_YOU_ARE_AT_WITHOUT_A_MAP_IN_YE_SAGIRA));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "DELETE_NPC":
|
||||
{
|
||||
npc.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "RESPAWN_BART":
|
||||
{
|
||||
qs.setMemoState(2);
|
||||
final L2Npc bart = addSpawn(BART, BART_SPAWN_2, false, 300000);
|
||||
bart.broadcastPacket(new NpcSay(bart.getObjectId(), ChatType.NPC_GENERAL, bart.getTemplate().getDisplayId(), NpcStringId.I_WILL_GUIDE_YOU_FOLLOW_ME));
|
||||
startQuestTimer("MOVE_DELAY", 500, bart, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_PLAYER_TRANSFORM)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerTransform(OnPlayerTransform event)
|
||||
{
|
||||
if (event.getTransformId() == 137)
|
||||
{
|
||||
startQuestTimer("RESPAWN_BART", 500, null, event.getActiveChar());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMoveFinished(L2Npc npc)
|
||||
{
|
||||
final L2PcInstance owner = npc.getVariables().getObject("OWNER", L2PcInstance.class);
|
||||
|
||||
if (owner != null)
|
||||
{
|
||||
npc.setHeading(Util.calculateHeadingFrom(npc, owner));
|
||||
npc.broadcastPacket(new ExRotation(npc.getObjectId(), npc.getHeading()));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.HEY_KID_HURRY_UP_AND_FOLLOW_ME));
|
||||
startQuestTimer("CHECK_PLAYER", 1200, npc, owner);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (npc.getId() == KAKAI)
|
||||
{
|
||||
htmltext = "30565-01.htm";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = npc.getId() == KAKAI ? "30565-04.htm" : "33448-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = npc.getId() == KAKAI ? "30565-06.htm" : "33448-03.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-01.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Lakcis:<br>
|
||||
Why are you here? It's not safe here - you should go back to town now! Hell, even I'm thinking of leaving if this many monsters keep showing up!<br>
|
||||
It's embarrassing to say this but I don't even know how to use magic because I am just a scholar.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10330_ToTheRuinsOfYeSagira 32977-02.htm">"Really? Atran sent me."</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-02.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Lakcis:<br>
|
||||
What? Atran did? That kid was badly hurt last time he was here, I hope he's okay these days.<br>
|
||||
Did you have a message or anything? I doubt Atran wanted you to have the same thing that happened to him happen to you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10330_ToTheRuinsOfYeSagira 32977-03.htm">"He told me to tell you to stop being an idiot Seeker."</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-03.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Lakcis:<br>
|
||||
Hahaha! Yeah, that sounds like Atran alright - He always looks out for me in his own special way.<br>
|
||||
Thanks for the message - it's good to hear he's doing well, and that his injury didn't eviscerate his sense of humor.<br>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-04.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-04.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Lakcis:<br>
|
||||
I wouln't advise sight-seeing in a place like this, friend. Unless you enjoy being eaten alive, that is.<br>
|
||||
This quest can only be started by characters working on the quest "To the Esagria Ruins".)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-05.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Lakcis:<br>
|
||||
If there were no monsters, the investigations would be so much easier...<br>
|
||||
(You've already completed this quest.)
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-01.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Atran:<br>
|
||||
You're still here?<br>
|
||||
Why?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10330_ToTheRuinsOfYeSagira 33448-02.htm">"I need to know how to get to the Ruins of Ye Sagira."</Button>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-02.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-02.htm
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<html><body>Atran:<br>
|
||||
You want to go to Ye Sagira? For what reason?<br1>
|
||||
There are not many rangers left at the <font color="LEVEL">Ruins of Ye Sagira</font>... maybe one or two per exploration zone, but they're not fighters, and can't help you if you find yourself in danger.<br>
|
||||
Idiots go there without a plan, and idiots get hurt. That's how I broke my...<br>
|
||||
No, no... That's not why I got hurt. Anyway. Are you really going there?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10330_ToTheRuinsOfYeSagira 33448-03.htm">"Yes."</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-03.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-03.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><head><body>Atran:<br>
|
||||
Well then, it is my duty to help you as much as I can.<br>
|
||||
To get to the ruins, follow the path you came, only in the opposite direction. Walk until you meet <font color="LEVEL">Lakcis</font> - he stands at the <font color="LEVEL">Ruins of Ye Sagira Entrance</font> . <br1>
|
||||
He's a scholar, so can't go into Ruins of Ye Sagira. Go help him.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-04.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Atran:<br>
|
||||
Why are you still here? Hurry and meet <font color="LEVEL">Lakcis</font> at the <font color="LEVEL">Ruins of Ye Sagira Entrance</font>.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-05.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Atran:<br>
|
||||
You're still free? If you have time to play around here, you have time to go somewhere else and hunt.<br>
|
||||
(Only characters level 10 or higher, who have completed the 'Backup Seekers' quest, can start this quest.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-06.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-06.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><head><body>Atran:<br>
|
||||
You're still free?<br>
|
||||
(You've already completed this quest.)
|
||||
</body></html>
|
128
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/Q10330_ToTheRuinsOfYeSagira.java
vendored
Normal file
128
trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/Q10330_ToTheRuinsOfYeSagira.java
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 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.Q10330_ToTheRuinsOfYeSagira;
|
||||
|
||||
import quests.Q10329_BackupSeekers.Q10329_BackupSeekers;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
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.serverpackets.ExShowScreenMessage;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public class Q10330_ToTheRuinsOfYeSagira extends Quest
|
||||
{
|
||||
// Npcs
|
||||
private static final int ATRAN = 33448;
|
||||
private static final int LAKCIS = 32977;
|
||||
|
||||
// Items
|
||||
private static final ItemHolder LEATHER_SHIRT = new ItemHolder(22, 1);
|
||||
private static final ItemHolder LEATHER_PANTS = new ItemHolder(29, 1);
|
||||
|
||||
// Level Condition
|
||||
private static final int MIN_LEVEL = 8;
|
||||
private static final int MAX_LEVEL = 20;
|
||||
|
||||
public Q10330_ToTheRuinsOfYeSagira()
|
||||
{
|
||||
super(10330, Q10330_ToTheRuinsOfYeSagira.class.getSimpleName(), "To the Ruins of Ye Sagira");
|
||||
addStartNpc(ATRAN);
|
||||
addTalkId(ATRAN, LAKCIS);
|
||||
addCondMinLevel(MIN_LEVEL, "33448-05.htm");
|
||||
addCondMaxLevel(MAX_LEVEL, "33448-05.htm");
|
||||
addCondCompletedQuest(Q10329_BackupSeekers.class.getSimpleName(), "33448-05.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "33448-02.htm":
|
||||
case "32977-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33448-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32977-03.htm":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ARMOR_HAS_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
giveAdena(player, 620, true);
|
||||
giveItems(player, LEATHER_SHIRT);
|
||||
giveItems(player, LEATHER_PANTS);
|
||||
addExpAndSp(player, 23000, 5);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = npc.getId() == ATRAN ? "33448-01.htm" : "32977-04.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = npc.getId() == ATRAN ? "33448-04.htm" : "32977-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = npc.getId() == ATRAN ? "33448-06.htm" : "32977-05.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
@ -189,6 +189,10 @@ import quests.Q10323_TrainLikeItsReal.Q10323_TrainLikeItsReal;
|
||||
import quests.Q10324_FindingMagisterGallint.Q10324_FindingMagisterGallint;
|
||||
import quests.Q10325_SearchingForNewPower.Q10325_SearchingForNewPower;
|
||||
import quests.Q10326_RespectYourElders.Q10326_RespectYourElders;
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
import quests.Q10328_RequestToSealTheEvilFragment.Q10328_RequestToSealTheEvilFragment;
|
||||
import quests.Q10329_BackupSeekers.Q10329_BackupSeekers;
|
||||
import quests.Q10330_ToTheRuinsOfYeSagira.Q10330_ToTheRuinsOfYeSagira;
|
||||
import quests.Q10331_StartOfFate.Q10331_StartOfFate;
|
||||
import quests.Q10338_SeizeYourDestiny.Q10338_SeizeYourDestiny;
|
||||
import quests.Q10390_KekropusLetter.Q10390_KekropusLetter;
|
||||
@ -398,6 +402,10 @@ public class QuestMasterHandler
|
||||
Q10324_FindingMagisterGallint.class,
|
||||
Q10325_SearchingForNewPower.class,
|
||||
Q10326_RespectYourElders.class,
|
||||
Q10327_IntruderWhoWantsTheBookOfGiants.class,
|
||||
Q10328_RequestToSealTheEvilFragment.class,
|
||||
Q10329_BackupSeekers.class,
|
||||
Q10330_ToTheRuinsOfYeSagira.class,
|
||||
Q10331_StartOfFate.class,
|
||||
Q10338_SeizeYourDestiny.class,
|
||||
Q10390_KekropusLetter.class,
|
||||
|
@ -91,7 +91,7 @@
|
||||
<height normal="24" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="33004" level="85" type="L2Npc" name="Toyron" title="Museum Keeper">
|
||||
<npc id="33004" level="85" type="L2QuestGuard" name="Toyron" title="Museum Keeper">
|
||||
<!-- Source http://l2i-god.gaikotsu.ru/ (Lindvior) -->
|
||||
<race>HUMAN</race>
|
||||
<stats> <!-- str="88" int="79" dex="55" wit="78" con="82" men="78" -->
|
||||
|
@ -104,7 +104,7 @@
|
||||
</speed>
|
||||
<hit_time>398</hit_time>
|
||||
</stats>
|
||||
<status attackable="false" />
|
||||
<status attackable="false" talkable="false" targetable="false" />
|
||||
<collision>
|
||||
<radius normal="9.5" />
|
||||
<height normal="23" />
|
||||
|
Loading…
Reference in New Issue
Block a user