Addition of Story of Tauti.

Contributed by gigilo1968.
This commit is contained in:
MobiusDevelopment 2019-10-30 13:03:52 +00:00
parent 362d5852a3
commit d4a7221852
107 changed files with 10092 additions and 240 deletions

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -20,7 +20,6 @@
789 Waiting for Pa'agrio
816 Plans to Repair the Stronghold
824 Attack the Command Post
833 Devil's Treasure, Tauti
834 Against Dragonclaw
10352 Legacy of Cruma Tower
10357 Altar of Blood that Awakens Destruction

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -222,6 +222,7 @@ import quests.Q00828_EvasBlessing.Q00828_EvasBlessing;
import quests.Q00829_MaphrsSalvation.Q00829_MaphrsSalvation;
import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn;
import quests.Q00831_SayhasScheme.Q00831_SayhasScheme;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade;
import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra;
@ -762,6 +763,7 @@ public class QuestMasterHandler
Q00829_MaphrsSalvation.class,
Q00830_TheWayOfTheGiantsPawn.class,
Q00831_SayhasScheme.class,
Q00833_DevilsTreasureTauti.class,
Q00835_PitiableMelisa.class,
Q00901_HowLavasaurusesAreMade.class,
Q00902_ReclaimOurEra.class,

View File

@ -119,7 +119,7 @@
<height normal="25" />
</collision>
</npc>
<npc id="19606" level="85" type="Npc" name="Flame Flower">
<npc id="19606" level="99" type="FriendlyNpc" name="Flame Flower">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
@ -130,24 +130,24 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" talkable="false" />
<collision>
<radius normal="12" />
<height normal="10" />
</collision>
</npc>
<npc id="19607" level="85" type="Npc" name="Seal Tombstone">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
<npc id="19607" level="100" type="Monster" name="Seal Tombstone">
<race>ETC</race>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="1613128" hpRegen="7.5" mp="23928" mpRegen="2.7" />
<vitals hp="17131280.0" hpRegen="7.5" mp="23928.0" mpRegen="2.7" />
<attack physical="1280.9" magical="1001.1" critical="4" attackSpeed="253" range="40" />
<defence physical="16389.1" magical="13989.5" />
<speed>
<walk ground="1" />
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" canMove="false" randomAnimation="false" />
<collision>
<radius normal="30" />
<height normal="60.8" />
@ -164,7 +164,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" targetable="false" showName="false" />
<collision>
<radius normal="160" />
<height normal="40" />

View File

@ -99,7 +99,6 @@
<icon>icon.skill0096</icon>
<operateType>A2</operateType>
<mpConsume>10</mpConsume>
<castRange>40</castRange>
<hitTime>3000</hitTime>
<reuseDelay>30000</reuseDelay>
<effectPoint>-100</effectPoint>
@ -134,7 +133,7 @@
<operateType>A2</operateType>
<mpConsume>10</mpConsume>
<castRange>500</castRange>
<hitTime>2000</hitTime>
<hitTime>3000</hitTime>
<reuseDelay>30000</reuseDelay>
<effectPoint>1</effectPoint>
<isDebuff>true</isDebuff>
@ -144,8 +143,7 @@
<icon>icon.skill11066</icon>
<operateType>A2</operateType>
<mpConsume>10</mpConsume>
<castRange>350</castRange>
<hitTime>2500</hitTime>
<hitTime>3700</hitTime>
<coolTime>800</coolTime>
<isDebuff>true</isDebuff>
<reuseDelay>15000</reuseDelay>
@ -694,20 +692,39 @@
<skill id="16571" toLevel="1" name="Decrease P. Def.">
<!-- P. Def. is decreased. -->
<icon>icon.skill11276</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>1</abnormalTime>
<operateType>A2</operateType>
<castRange>900</castRange>
<hitTime>600000</hitTime>
<reuseDelay>300000</reuseDelay>
<effectPoint>-707</effectPoint>
<isMagic>2</isMagic>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="16572" toLevel="1" name="Seal Archangel's Wrath">
<!-- Unable to move due to Seal Archangel's wrath. -->
<icon>icon.skill4111</icon>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>3</abnormalTime>
<abnormalType>STUN</abnormalType>
<abnormalVisualEffect>STUN</abnormalVisualEffect>
<operateType>A2</operateType>
<castRange>400</castRange>
<effectPoint>-100</effectPoint>
<affectLimit>10-10</affectLimit>
<isDebuff>true</isDebuff>
<fanRange>0;0;80;300</fanRange>
<targetType>SELF</targetType>
<affectScope>FAN_PB</affectScope>
<affectObject>NOT_FRIEND</affectObject>
<effects>
<effect name="BlockActions">
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
</effects>
</skill>
<skill id="16573" toLevel="1" name="Kelbim Petrify">
<!-- Petrified and unable to move temporarily. -->

View File

@ -123,9 +123,16 @@
<coolTime>500</coolTime>
</skill>
<skill id="18513" toLevel="1" name="Summon Flame Flower">
<icon>icon.skill0000</icon>
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>46554</itemConsumeId> <!-- Flame Flower -->
<operateType>A1</operateType>
<hitTime>1500</hitTime>
<reuseDelay>3000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="18514" toLevel="1" name="Seal Altar of Earth">
<!-- Engraves the Seal of Ruler on the holy artifact which guards the castle. -->
@ -137,12 +144,41 @@
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18515" toLevel="3" name="Decrease P. Def.">
<!-- P./M. Def. is decreased by 10%. -->
<!-- P./M. Def. is decreased by Lvl 1 - 10%. -->
<!-- P./M. Def. is decreased by Lvl 2 - 30%. -->
<!-- P./M. Def. is decreased by Lvl 3 - 50%. -->
<icon>icon.skill1042</icon>
<abnormalLvl>5</abnormalLvl>
<abnormalTime>60</abnormalTime>
<abnormalType>PD_DOWN</abnormalType>
<operateType>A2</operateType>
<castRange>500</castRange>
<castRange>600</castRange>
<effectPoint>-692</effectPoint>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="2">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="3">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="CallSkill">
<skillId>16571</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>
<skill id="18516" toLevel="1" name="Seal Altar of Wind">
<!-- Engraves the Seal of Ruler on the holy artifact which guards the castle. -->

View File

@ -1131,4 +1131,31 @@
<zone name="Mystic_Tavern_Globe5" id="80023" type="ScriptZone" shape="Cylinder" minZ="-14250" maxZ="-14100" rad="110">
<node X="-49355" Y="-148215" />
</zone>
<!-- Mystic Tavern Tauti -->
<zone name="Flame_Flower_Zone" id="80027" type="ScriptZone" shape="Cylinder" minZ="-8120" maxZ="-8040" rad="750">
<node X="143990" Y="-148845" />
</zone>
<zone name="Tauti_Start_Zone" id="80028" type="ScriptZone" shape="Cylinder" minZ="-7650" maxZ="-7550" rad="300">
<node X="142644" Y="-151100" />
</zone>
<zone name="Tauti_Scorpion_Zone" id="80029" type="ScriptZone" shape="Cylinder" minZ="-8850" maxZ="-8700" rad="650">
<node X="146900" Y="-148800" />
</zone>
<zone name="Tauti_Golem_Zone" id="80030" type="ScriptZone" shape="Cylinder" minZ="-9100" maxZ="-9000" rad="400">
<node X="150660" Y="-148760" />
</zone>
<zone name="Tauti_Tombstone_Zone" id="80031" type="ScriptZone" shape="NPoly" minZ="-9100" maxZ="-8900">
<node X="150744" Y="-150872" />
<node X="151087" Y="-150872" />
<node X="151173" Y="-151291" />
<node X="150400" Y="-152900" />
<node X="149945" Y="-152920" />
<node X="149837" Y="-152680" />
</zone>
<zone name="Tauti_Angel_Zone" id="80032" type="ScriptZone" shape="Cylinder" minZ="-11200" maxZ="-11000" rad="200">
<node X="152620" Y="-151338" />
</zone>
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
</list>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -31,7 +31,6 @@
824 Attack the Command Post
825 Hunter Guild Request - Valley of Saints
832 Hunter Guild Request - Southern Region, Isle of Prayer
833 Devil's Treasure, Tauti
834 Against Dragonclaw
836 Request from the Blackbird Clan
837 Request from the Giant Trackers

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -193,6 +193,7 @@ import quests.Q00828_EvasBlessing.Q00828_EvasBlessing;
import quests.Q00829_MaphrsSalvation.Q00829_MaphrsSalvation;
import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn;
import quests.Q00831_SayhasScheme.Q00831_SayhasScheme;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade;
import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra;
@ -731,6 +732,7 @@ public class QuestMasterHandler
Q00829_MaphrsSalvation.class,
Q00830_TheWayOfTheGiantsPawn.class,
Q00831_SayhasScheme.class,
Q00833_DevilsTreasureTauti.class,
Q00835_PitiableMelisa.class,
Q00836_RequestFromTheBlackbirdClan.class, // TODO: Not done.
Q00837_RequestFromTheGiantTrackers.class, // TODO: Not done.

View File

@ -119,7 +119,7 @@
<height normal="25.0" />
</collision>
</npc>
<npc id="19606" level="85" type="Npc" name="Flame Flower">
<npc id="19606" level="99" type="FriendlyNpc" name="Flame Flower">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
@ -130,24 +130,24 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" talkable="false" />
<collision>
<radius normal="12" />
<height normal="10" />
</collision>
</npc>
<npc id="19607" level="85" type="Npc" name="Seal Tombstone">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
<npc id="19607" level="100" type="Monster" name="Seal Tombstone">
<race>ETC</race>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="1613128" hpRegen="7.5" mp="23928" mpRegen="2.7" />
<vitals hp="17131280.0" hpRegen="7.5" mp="23928.0" mpRegen="2.7" />
<attack physical="1280.9" magical="1001.1" critical="4" attackSpeed="253" range="40" />
<defence physical="16389.1" magical="13989.5" />
<speed>
<walk ground="1" />
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" canMove="false" randomAnimation="false" />
<collision>
<radius normal="30" />
<height normal="60.8" />
@ -164,7 +164,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" targetable="false" showName="false" />
<collision>
<radius normal="160" />
<height normal="40" />

View File

@ -692,20 +692,39 @@
<skill id="16571" toLevel="1" name="Weakened Defense">
<!-- P. Def. is decreased -->
<icon>icon.skill11276</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>1</abnormalTime>
<operateType>A2</operateType>
<castRange>900</castRange>
<hitTime>600000</hitTime>
<reuseDelay>300000</reuseDelay>
<effectPoint>-707</effectPoint>
<isMagic>2</isMagic>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="16572" toLevel="1" name="Seal Archangel's Wrath">
<!-- Seal Archangel's Wrath causes Action Prohibit state -->
<icon>icon.skill4111</icon>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>3</abnormalTime>
<abnormalType>STUN</abnormalType>
<abnormalVisualEffect>STUN</abnormalVisualEffect>
<operateType>A2</operateType>
<castRange>400</castRange>
<effectPoint>-100</effectPoint>
<affectLimit>10-10</affectLimit>
<isDebuff>true</isDebuff>
<fanRange>0;0;80;300</fanRange>
<targetType>SELF</targetType>
<affectScope>FAN_PB</affectScope>
<affectObject>NOT_FRIEND</affectObject>
<effects>
<effect name="BlockActions">
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
</effects>
</skill>
<skill id="16573" toLevel="1" name="Kelbim Petrify">
<!-- A Petrify spell causes the body to temporarily turn to rock. -->

View File

@ -123,9 +123,16 @@
<coolTime>500</coolTime>
</skill>
<skill id="18513" toLevel="1" name="Summon Flame Flower">
<icon>icon.skill0000</icon>
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>46554</itemConsumeId> <!-- Flame Flower -->
<operateType>A1</operateType>
<hitTime>1500</hitTime>
<reuseDelay>3000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="18514" toLevel="1" name="Seal Altar of Earth">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
@ -137,12 +144,41 @@
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18515" toLevel="3" name="Weakened Defense">
<!-- P./M. Def. -10% -->
<!-- P./M. Def. is decreased by Lvl 1 - 10%. -->
<!-- P./M. Def. is decreased by Lvl 2 - 30%. -->
<!-- P./M. Def. is decreased by Lvl 3 - 50%. -->
<icon>icon.skill1042</icon>
<abnormalLvl>5</abnormalLvl>
<abnormalTime>60</abnormalTime>
<abnormalType>PD_DOWN</abnormalType>
<operateType>A2</operateType>
<castRange>500</castRange>
<castRange>600</castRange>
<effectPoint>-692</effectPoint>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="2">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="3">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="CallSkill">
<skillId>16571</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>
<skill id="18516" toLevel="1" name="Seal Altar of Wind">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->

View File

@ -1131,4 +1131,31 @@
<zone name="Mystic_Tavern_Globe5" id="80023" type="ScriptZone" shape="Cylinder" minZ="-14250" maxZ="-14100" rad="110">
<node X="-49355" Y="-148215" />
</zone>
<!-- Mystic Tavern Tauti -->
<zone name="Flame_Flower_Zone" id="80027" type="ScriptZone" shape="Cylinder" minZ="-8120" maxZ="-8040" rad="750">
<node X="143990" Y="-148845" />
</zone>
<zone name="Tauti_Start_Zone" id="80028" type="ScriptZone" shape="Cylinder" minZ="-7650" maxZ="-7550" rad="300">
<node X="142644" Y="-151100" />
</zone>
<zone name="Tauti_Scorpion_Zone" id="80029" type="ScriptZone" shape="Cylinder" minZ="-8850" maxZ="-8700" rad="650">
<node X="146900" Y="-148800" />
</zone>
<zone name="Tauti_Golem_Zone" id="80030" type="ScriptZone" shape="Cylinder" minZ="-9100" maxZ="-9000" rad="400">
<node X="150660" Y="-148760" />
</zone>
<zone name="Tauti_Tombstone_Zone" id="80031" type="ScriptZone" shape="NPoly" minZ="-9100" maxZ="-8900">
<node X="150744" Y="-150872" />
<node X="151087" Y="-150872" />
<node X="151173" Y="-151291" />
<node X="150400" Y="-152900" />
<node X="149945" Y="-152920" />
<node X="149837" Y="-152680" />
</zone>
<zone name="Tauti_Angel_Zone" id="80032" type="ScriptZone" shape="Cylinder" minZ="-11200" maxZ="-11000" rad="200">
<node X="152620" Y="-151338" />
</zone>
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
</list>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -85,7 +85,6 @@
824 Attack the Command Post
825 Hunter Guild Request - Valley of Saints
832 Hunter Guild Request - Southern Region, Isle of Prayer
833 Devil's Treasure, Tauti
834 Against Dragonclaw
836 Request from the Blackbird Clan
837 Request from the Giant Trackers

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -194,6 +194,7 @@ import quests.Q00828_EvasBlessing.Q00828_EvasBlessing;
import quests.Q00829_MaphrsSalvation.Q00829_MaphrsSalvation;
import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn;
import quests.Q00831_SayhasScheme.Q00831_SayhasScheme;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade;
import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra;
@ -759,6 +760,7 @@ public class QuestMasterHandler
Q00829_MaphrsSalvation.class,
Q00830_TheWayOfTheGiantsPawn.class,
Q00831_SayhasScheme.class,
Q00833_DevilsTreasureTauti.class,
Q00835_PitiableMelisa.class,
Q00836_RequestFromTheBlackbirdClan.class, // TODO: Not done.
Q00837_RequestFromTheGiantTrackers.class, // TODO: Not done.

View File

@ -102,7 +102,7 @@
<height normal="0.1" />
</collision>
</npc>
<npc id="19606" level="85" type="Npc" name="Flame Flower">
<npc id="19606" level="99" type="FriendlyNpc" name="Flame Flower">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
@ -113,24 +113,24 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" talkable="false" />
<collision>
<radius normal="12" />
<height normal="10" />
</collision>
</npc>
<npc id="19607" level="85" type="Npc" name="Seal Tombstone">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
<npc id="19607" level="100" type="Monster" name="Seal Tombstone">
<race>ETC</race>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="1613128" hpRegen="7.5" mp="23928" mpRegen="2.7" />
<vitals hp="17131280.0" hpRegen="7.5" mp="23928.0" mpRegen="2.7" />
<attack physical="1280.9" magical="1001.1" critical="4" attackSpeed="253" range="40" />
<defence physical="16389.1" magical="13989.5" />
<speed>
<walk ground="1" />
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" canMove="false" randomAnimation="false" />
<collision>
<radius normal="30" />
<height normal="60.8" />
@ -147,7 +147,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" targetable="false" showName="false" />
<collision>
<radius normal="160" />
<height normal="40" />

View File

@ -691,20 +691,39 @@
<skill id="16571" toLevel="1" name="Weakened Defense">
<!-- P. Def. is decreased -->
<icon>icon.skill11276</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>1</abnormalTime>
<operateType>A2</operateType>
<castRange>900</castRange>
<hitTime>600000</hitTime>
<reuseDelay>300000</reuseDelay>
<effectPoint>-707</effectPoint>
<isMagic>2</isMagic>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="16572" toLevel="1" name="Seal Archangel's Wrath">
<!-- Seal Archangel's Wrath causes Action Prohibit state -->
<icon>icon.skill4111</icon>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>3</abnormalTime>
<abnormalType>STUN</abnormalType>
<abnormalVisualEffect>STUN</abnormalVisualEffect>
<operateType>A2</operateType>
<castRange>400</castRange>
<effectPoint>-100</effectPoint>
<affectLimit>10-10</affectLimit>
<isDebuff>true</isDebuff>
<fanRange>0;0;80;300</fanRange>
<targetType>SELF</targetType>
<affectScope>FAN_PB</affectScope>
<affectObject>NOT_FRIEND</affectObject>
<effects>
<effect name="BlockActions">
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
</effects>
</skill>
<skill id="16573" toLevel="1" name="Kelbim Petrify">
<!-- A Petrify spell causes the body to temporarily turn to rock. -->

View File

@ -123,9 +123,16 @@
<coolTime>500</coolTime>
</skill>
<skill id="18513" toLevel="1" name="Summon Flame Flower">
<icon>icon.skill0000</icon>
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>46554</itemConsumeId> <!-- Flame Flower -->
<operateType>A1</operateType>
<hitTime>1500</hitTime>
<reuseDelay>3000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="18514" toLevel="1" name="Seal Altar of Earth">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
@ -137,12 +144,41 @@
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18515" toLevel="3" name="Weakened Defense">
<!-- P./M. Def. -10% -->
<!-- P./M. Def. is decreased by Lvl 1 - 10%. -->
<!-- P./M. Def. is decreased by Lvl 2 - 30%. -->
<!-- P./M. Def. is decreased by Lvl 3 - 50%. -->
<icon>icon.skill1042</icon>
<abnormalLvl>5</abnormalLvl>
<abnormalTime>60</abnormalTime>
<abnormalType>PD_DOWN</abnormalType>
<operateType>A2</operateType>
<castRange>500</castRange>
<castRange>600</castRange>
<effectPoint>-692</effectPoint>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="2">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="3">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="CallSkill">
<skillId>16571</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>
<skill id="18516" toLevel="1" name="Seal Altar of Wind">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->

View File

@ -1131,4 +1131,31 @@
<zone name="Mystic_Tavern_Globe5" id="80023" type="ScriptZone" shape="Cylinder" minZ="-14250" maxZ="-14100" rad="110">
<node X="-49355" Y="-148215" />
</zone>
<!-- Mystic Tavern Tauti -->
<zone name="Flame_Flower_Zone" id="80027" type="ScriptZone" shape="Cylinder" minZ="-8120" maxZ="-8040" rad="750">
<node X="143990" Y="-148845" />
</zone>
<zone name="Tauti_Start_Zone" id="80028" type="ScriptZone" shape="Cylinder" minZ="-7650" maxZ="-7550" rad="300">
<node X="142644" Y="-151100" />
</zone>
<zone name="Tauti_Scorpion_Zone" id="80029" type="ScriptZone" shape="Cylinder" minZ="-8850" maxZ="-8700" rad="650">
<node X="146900" Y="-148800" />
</zone>
<zone name="Tauti_Golem_Zone" id="80030" type="ScriptZone" shape="Cylinder" minZ="-9100" maxZ="-9000" rad="400">
<node X="150660" Y="-148760" />
</zone>
<zone name="Tauti_Tombstone_Zone" id="80031" type="ScriptZone" shape="NPoly" minZ="-9100" maxZ="-8900">
<node X="150744" Y="-150872" />
<node X="151087" Y="-150872" />
<node X="151173" Y="-151291" />
<node X="150400" Y="-152900" />
<node X="149945" Y="-152920" />
<node X="149837" Y="-152680" />
</zone>
<zone name="Tauti_Angel_Zone" id="80032" type="ScriptZone" shape="Cylinder" minZ="-11200" maxZ="-11000" rad="200">
<node X="152620" Y="-151338" />
</zone>
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
</list>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -109,7 +109,6 @@
824 Attack the Command Post
825 Hunter Guild Request - Valley of Saints
832 Hunter Guild Request - Southern Region, Isle of Prayer
833 Devil's Treasure, Tauti
834 Against Dragonclaw
836 Request from the Blackbird Clan
837 Request from the Giant Trackers

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -197,6 +197,7 @@ import quests.Q00828_EvasBlessing.Q00828_EvasBlessing;
import quests.Q00829_MaphrsSalvation.Q00829_MaphrsSalvation;
import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn;
import quests.Q00831_SayhasScheme.Q00831_SayhasScheme;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade;
import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra;
@ -701,6 +702,7 @@ public class QuestMasterHandler
Q00829_MaphrsSalvation.class,
Q00830_TheWayOfTheGiantsPawn.class,
Q00831_SayhasScheme.class,
Q00833_DevilsTreasureTauti.class,
Q00835_PitiableMelisa.class,
Q00836_RequestFromTheBlackbirdClan.class, // TODO: Not done.
Q00837_RequestFromTheGiantTrackers.class, // TODO: Not done.

View File

@ -102,7 +102,7 @@
<height normal="0.1" />
</collision>
</npc>
<npc id="19606" level="85" type="Npc" name="Flame Flower">
<npc id="19606" level="99" type="FriendlyNpc" name="Flame Flower">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
@ -113,24 +113,24 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" talkable="false" />
<collision>
<radius normal="12" />
<height normal="10" />
</collision>
</npc>
<npc id="19607" level="85" type="Npc" name="Seal Tombstone">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
<npc id="19607" level="100" type="Monster" name="Seal Tombstone">
<race>ETC</race>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="1613128" hpRegen="7.5" mp="23928" mpRegen="2.7" />
<vitals hp="17131280.0" hpRegen="7.5" mp="23928.0" mpRegen="2.7" />
<attack physical="1280.9" magical="1001.1" critical="4" attackSpeed="253" range="40" />
<defence physical="16389.1" magical="13989.5" />
<speed>
<walk ground="1" />
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" canMove="false" randomAnimation="false" />
<collision>
<radius normal="30" />
<height normal="60.8" />
@ -147,7 +147,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" targetable="false" showName="false" />
<collision>
<radius normal="160" />
<height normal="40" />

View File

@ -691,20 +691,39 @@
<skill id="16571" toLevel="1" name="Weakened Defense">
<!-- P. Def. is decreased -->
<icon>icon.skill11276</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>1</abnormalTime>
<operateType>A2</operateType>
<castRange>900</castRange>
<hitTime>600000</hitTime>
<reuseDelay>300000</reuseDelay>
<effectPoint>-707</effectPoint>
<isMagic>2</isMagic>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="16572" toLevel="1" name="Seal Archangel's Wrath">
<!-- Seal Archangel's Wrath causes Action Prohibit state -->
<icon>icon.skill4111</icon>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>3</abnormalTime>
<abnormalType>STUN</abnormalType>
<abnormalVisualEffect>STUN</abnormalVisualEffect>
<operateType>A2</operateType>
<castRange>400</castRange>
<effectPoint>-100</effectPoint>
<affectLimit>10-10</affectLimit>
<isDebuff>true</isDebuff>
<fanRange>0;0;80;300</fanRange>
<targetType>SELF</targetType>
<affectScope>FAN_PB</affectScope>
<affectObject>NOT_FRIEND</affectObject>
<effects>
<effect name="BlockActions">
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
</effects>
</skill>
<skill id="16573" toLevel="1" name="Kelbim Petrify">
<!-- A Petrify spell causes the body to temporarily turn to rock. -->

View File

@ -123,36 +123,70 @@
<coolTime>500</coolTime>
</skill>
<skill id="18513" toLevel="1" name="Summon Flame Flower">
<icon>icon.skill0000</icon>
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>46554</itemConsumeId> <!-- Flame Flower -->
<operateType>A1</operateType>
<hitTime>1500</hitTime>
<reuseDelay>3000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="18514" toLevel="1" name="Seal Altar of Earth">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
<icon>icon.skill0246</icon>
<operateType>A1</operateType>
<coolTime>500</coolTime>
<mpConsume>10</mpConsume>
<castRange>100</castRange>
<hitTime>60000</hitTime>
<hitTime>120000</hitTime>
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18515" toLevel="3" name="Weakened Defense">
<!-- P./ M. Def. -10% -->
<!-- P./M. Def. is decreased by Lvl 1 - 10%. -->
<!-- P./M. Def. is decreased by Lvl 2 - 30%. -->
<!-- P./M. Def. is decreased by Lvl 3 - 50%. -->
<icon>icon.skill1042</icon>
<abnormalLvl>5</abnormalLvl>
<abnormalTime>60</abnormalTime>
<abnormalType>PD_DOWN</abnormalType>
<operateType>A2</operateType>
<castRange>500</castRange>
<castRange>600</castRange>
<effectPoint>-692</effectPoint>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="2">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="3">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="CallSkill">
<skillId>16571</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>
<skill id="18516" toLevel="1" name="Seal Altar of Wind">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
<icon>icon.skill0246</icon>
<operateType>A1</operateType>
<coolTime>500</coolTime>
<mpConsume>10</mpConsume>
<castRange>100</castRange>
<hitTime>60000</hitTime>
<hitTime>120000</hitTime>
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18517" toLevel="1" name="Top-grade Love Potion - Party">

View File

@ -1131,4 +1131,31 @@
<zone name="Mystic_Tavern_Globe5" id="80023" type="ScriptZone" shape="Cylinder" minZ="-14250" maxZ="-14100" rad="110">
<node X="-49355" Y="-148215" />
</zone>
<!-- Mystic Tavern Tauti -->
<zone name="Flame_Flower_Zone" id="80027" type="ScriptZone" shape="Cylinder" minZ="-8120" maxZ="-8040" rad="750">
<node X="143990" Y="-148845" />
</zone>
<zone name="Tauti_Start_Zone" id="80028" type="ScriptZone" shape="Cylinder" minZ="-7650" maxZ="-7550" rad="300">
<node X="142644" Y="-151100" />
</zone>
<zone name="Tauti_Scorpion_Zone" id="80029" type="ScriptZone" shape="Cylinder" minZ="-8850" maxZ="-8700" rad="650">
<node X="146900" Y="-148800" />
</zone>
<zone name="Tauti_Golem_Zone" id="80030" type="ScriptZone" shape="Cylinder" minZ="-9100" maxZ="-9000" rad="400">
<node X="150660" Y="-148760" />
</zone>
<zone name="Tauti_Tombstone_Zone" id="80031" type="ScriptZone" shape="NPoly" minZ="-9100" maxZ="-8900">
<node X="150744" Y="-150872" />
<node X="151087" Y="-150872" />
<node X="151173" Y="-151291" />
<node X="150400" Y="-152900" />
<node X="149945" Y="-152920" />
<node X="149837" Y="-152680" />
</zone>
<zone name="Tauti_Angel_Zone" id="80032" type="ScriptZone" shape="Cylinder" minZ="-11200" maxZ="-11000" rad="200">
<node X="152620" Y="-151338" />
</zone>
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
</list>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -119,7 +119,6 @@
824 Attack the Command Post
825 Hunter Guild Request - Valley of Saints
832 Hunter Guild Request - Southern Region, Isle of Prayer
833 Devil's Treasure, Tauti
834 Against Dragonclaw
836 Request from the Blackbird Clan
837 Request from the Giant Trackers

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -168,6 +168,7 @@ import quests.Q00828_EvasBlessing.Q00828_EvasBlessing;
import quests.Q00829_MaphrsSalvation.Q00829_MaphrsSalvation;
import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn;
import quests.Q00831_SayhasScheme.Q00831_SayhasScheme;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade;
import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra;
@ -630,6 +631,7 @@ public class QuestMasterHandler
Q00829_MaphrsSalvation.class,
Q00830_TheWayOfTheGiantsPawn.class,
Q00831_SayhasScheme.class,
Q00833_DevilsTreasureTauti.class,
Q00835_PitiableMelisa.class,
Q00836_RequestFromTheBlackbirdClan.class, // TODO: Not done.
Q00837_RequestFromTheGiantTrackers.class, // TODO: Not done.

View File

@ -102,7 +102,7 @@
<height normal="0.1" />
</collision>
</npc>
<npc id="19606" level="85" type="Npc" name="Flame Flower">
<npc id="19606" level="99" type="FriendlyNpc" name="Flame Flower">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
@ -113,24 +113,24 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" talkable="false" />
<collision>
<radius normal="12" />
<height normal="10" />
</collision>
</npc>
<npc id="19607" level="85" type="Npc" name="Seal Tombstone">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
<npc id="19607" level="100" type="Monster" name="Seal Tombstone">
<race>ETC</race>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="1613128" hpRegen="7.5" mp="23928" mpRegen="2.7" />
<vitals hp="17131280.0" hpRegen="7.5" mp="23928.0" mpRegen="2.7" />
<attack physical="1280.9" magical="1001.1" critical="4" attackSpeed="253" range="40" />
<defence physical="16389.1" magical="13989.5" />
<speed>
<walk ground="1" />
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" canMove="false" randomAnimation="false" />
<collision>
<radius normal="30" />
<height normal="60.8" />
@ -147,7 +147,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" targetable="false" showName="false" />
<collision>
<radius normal="160" />
<height normal="40" />

View File

@ -691,20 +691,39 @@
<skill id="16571" toLevel="1" name="Weakened Defense">
<!-- P. Def. is decreased -->
<icon>icon.skill11276</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>1</abnormalTime>
<operateType>A2</operateType>
<castRange>900</castRange>
<hitTime>600000</hitTime>
<reuseDelay>300000</reuseDelay>
<effectPoint>-707</effectPoint>
<isMagic>2</isMagic>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="16572" toLevel="1" name="Seal Archangel's Wrath">
<!-- Seal Archangel's Wrath causes Action Prohibit state -->
<icon>icon.skill4111</icon>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>3</abnormalTime>
<abnormalType>STUN</abnormalType>
<abnormalVisualEffect>STUN</abnormalVisualEffect>
<operateType>A2</operateType>
<castRange>400</castRange>
<effectPoint>-100</effectPoint>
<affectLimit>10-10</affectLimit>
<isDebuff>true</isDebuff>
<fanRange>0;0;80;300</fanRange>
<targetType>SELF</targetType>
<affectScope>FAN_PB</affectScope>
<affectObject>NOT_FRIEND</affectObject>
<effects>
<effect name="BlockActions">
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
</effects>
</skill>
<skill id="16573" toLevel="1" name="Kelbim Petrify">
<!-- A Petrify spell causes the body to temporarily turn to rock. -->

View File

@ -123,36 +123,70 @@
<coolTime>500</coolTime>
</skill>
<skill id="18513" toLevel="1" name="Summon Flame Flower">
<icon>icon.skill0000</icon>
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>46554</itemConsumeId> <!-- Flame Flower -->
<operateType>A1</operateType>
<hitTime>1500</hitTime>
<reuseDelay>3000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="18514" toLevel="1" name="Seal Altar of Earth">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
<icon>icon.skill0246</icon>
<operateType>A1</operateType>
<coolTime>500</coolTime>
<mpConsume>10</mpConsume>
<castRange>100</castRange>
<hitTime>60000</hitTime>
<hitTime>120000</hitTime>
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18515" toLevel="3" name="Weakened Defense">
<!-- P./ M. Def. -10% -->
<!-- P./M. Def. is decreased by Lvl 1 - 10%. -->
<!-- P./M. Def. is decreased by Lvl 2 - 30%. -->
<!-- P./M. Def. is decreased by Lvl 3 - 50%. -->
<icon>icon.skill1042</icon>
<abnormalLvl>5</abnormalLvl>
<abnormalTime>60</abnormalTime>
<abnormalType>PD_DOWN</abnormalType>
<operateType>A2</operateType>
<castRange>500</castRange>
<castRange>600</castRange>
<effectPoint>-692</effectPoint>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="2">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="3">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="CallSkill">
<skillId>16571</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>
<skill id="18516" toLevel="1" name="Seal Altar of Wind">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
<icon>icon.skill0246</icon>
<operateType>A1</operateType>
<coolTime>500</coolTime>
<mpConsume>10</mpConsume>
<castRange>100</castRange>
<hitTime>60000</hitTime>
<hitTime>120000</hitTime>
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18517" toLevel="1" name="Top-grade Love Potion - Party">

View File

@ -1131,4 +1131,31 @@
<zone name="Mystic_Tavern_Globe5" id="80023" type="ScriptZone" shape="Cylinder" minZ="-14250" maxZ="-14100" rad="110">
<node X="-49355" Y="-148215" />
</zone>
<!-- Mystic Tavern Tauti -->
<zone name="Flame_Flower_Zone" id="80027" type="ScriptZone" shape="Cylinder" minZ="-8120" maxZ="-8040" rad="750">
<node X="143990" Y="-148845" />
</zone>
<zone name="Tauti_Start_Zone" id="80028" type="ScriptZone" shape="Cylinder" minZ="-7650" maxZ="-7550" rad="300">
<node X="142644" Y="-151100" />
</zone>
<zone name="Tauti_Scorpion_Zone" id="80029" type="ScriptZone" shape="Cylinder" minZ="-8850" maxZ="-8700" rad="650">
<node X="146900" Y="-148800" />
</zone>
<zone name="Tauti_Golem_Zone" id="80030" type="ScriptZone" shape="Cylinder" minZ="-9100" maxZ="-9000" rad="400">
<node X="150660" Y="-148760" />
</zone>
<zone name="Tauti_Tombstone_Zone" id="80031" type="ScriptZone" shape="NPoly" minZ="-9100" maxZ="-8900">
<node X="150744" Y="-150872" />
<node X="151087" Y="-150872" />
<node X="151173" Y="-151291" />
<node X="150400" Y="-152900" />
<node X="149945" Y="-152920" />
<node X="149837" Y="-152680" />
</zone>
<zone name="Tauti_Angel_Zone" id="80032" type="ScriptZone" shape="Cylinder" minZ="-11200" maxZ="-11000" rad="200">
<node X="152620" Y="-151338" />
</zone>
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
</list>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -128,7 +128,6 @@
824 Attack the Command Post
825 Hunter Guild Request - Valley of Saints
832 Hunter Guild Request - Southern Region, Isle of Prayer
833 Devil's Treasure, Tauti
834 Against Dragonclaw
836 Request from the Blackbird Clan
837 Request from the Giant Trackers

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -168,6 +168,7 @@ import quests.Q00828_EvasBlessing.Q00828_EvasBlessing;
import quests.Q00829_MaphrsSalvation.Q00829_MaphrsSalvation;
import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn;
import quests.Q00831_SayhasScheme.Q00831_SayhasScheme;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa;
import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade;
import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra;
@ -649,6 +650,7 @@ public class QuestMasterHandler
Q00829_MaphrsSalvation.class,
Q00830_TheWayOfTheGiantsPawn.class,
Q00831_SayhasScheme.class,
Q00833_DevilsTreasureTauti.class,
Q00835_PitiableMelisa.class,
Q00836_RequestFromTheBlackbirdClan.class, // TODO: Not done.
Q00837_RequestFromTheGiantTrackers.class, // TODO: Not done.

View File

@ -102,7 +102,7 @@
<height normal="0.1" />
</collision>
</npc>
<npc id="19606" level="85" type="Npc" name="Flame Flower">
<npc id="19606" level="99" type="FriendlyNpc" name="Flame Flower">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
@ -113,24 +113,24 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" talkable="false" />
<collision>
<radius normal="12" />
<height normal="10" />
</collision>
</npc>
<npc id="19607" level="85" type="Npc" name="Seal Tombstone">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>HUMAN</race>
<sex>FEMALE</sex>
<npc id="19607" level="100" type="Monster" name="Seal Tombstone">
<race>ETC</race>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="1613128" hpRegen="7.5" mp="23928" mpRegen="2.7" />
<vitals hp="17131280.0" hpRegen="7.5" mp="23928.0" mpRegen="2.7" />
<attack physical="1280.9" magical="1001.1" critical="4" attackSpeed="253" range="40" />
<defence physical="16389.1" magical="13989.5" />
<speed>
<walk ground="1" />
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" randomWalk="false" canMove="false" randomAnimation="false" />
<collision>
<radius normal="30" />
<height normal="60.8" />
@ -147,7 +147,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" targetable="false" showName="false" />
<collision>
<radius normal="160" />
<height normal="40" />

View File

@ -691,20 +691,39 @@
<skill id="16571" toLevel="1" name="Weakened Defense">
<!-- P. Def. is decreased -->
<icon>icon.skill11276</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>1</abnormalTime>
<operateType>A2</operateType>
<castRange>900</castRange>
<hitTime>600000</hitTime>
<reuseDelay>300000</reuseDelay>
<effectPoint>-707</effectPoint>
<isMagic>2</isMagic>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="16572" toLevel="1" name="Seal Archangel's Wrath">
<!-- Seal Archangel's Wrath causes Action Prohibit state -->
<icon>icon.skill4111</icon>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>3</abnormalTime>
<abnormalType>STUN</abnormalType>
<abnormalVisualEffect>STUN</abnormalVisualEffect>
<operateType>A2</operateType>
<castRange>400</castRange>
<effectPoint>-100</effectPoint>
<affectLimit>10-10</affectLimit>
<isDebuff>true</isDebuff>
<fanRange>0;0;80;300</fanRange>
<targetType>SELF</targetType>
<affectScope>FAN_PB</affectScope>
<affectObject>NOT_FRIEND</affectObject>
<effects>
<effect name="BlockActions">
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
</effects>
</skill>
<skill id="16573" toLevel="1" name="Kelbim Petrify">
<!-- A Petrify spell causes the body to temporarily turn to rock. -->

View File

@ -123,36 +123,70 @@
<coolTime>500</coolTime>
</skill>
<skill id="18513" toLevel="1" name="Summon Flame Flower">
<icon>icon.skill0000</icon>
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>46554</itemConsumeId> <!-- Flame Flower -->
<operateType>A1</operateType>
<hitTime>1500</hitTime>
<reuseDelay>3000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
</skill>
<skill id="18514" toLevel="1" name="Seal Altar of Earth">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
<icon>icon.skill0246</icon>
<operateType>A1</operateType>
<coolTime>500</coolTime>
<mpConsume>10</mpConsume>
<castRange>100</castRange>
<hitTime>60000</hitTime>
<hitTime>120000</hitTime>
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18515" toLevel="3" name="Weakened Defense">
<!-- P./ M. Def. -10% -->
<!-- P./M. Def. is decreased by Lvl 1 - 10%. -->
<!-- P./M. Def. is decreased by Lvl 2 - 30%. -->
<!-- P./M. Def. is decreased by Lvl 3 - 50%. -->
<icon>icon.skill1042</icon>
<abnormalLvl>5</abnormalLvl>
<abnormalTime>60</abnormalTime>
<abnormalType>PD_DOWN</abnormalType>
<operateType>A2</operateType>
<castRange>500</castRange>
<castRange>600</castRange>
<effectPoint>-692</effectPoint>
<isDebuff>true</isDebuff>
<targetType>TARGET</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="PhysicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="2">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>
<value level="1">-10</value>
<value level="2">-30</value>
<value level="3">-50</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="CallSkill">
<skillId>16571</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>
<skill id="18516" toLevel="1" name="Seal Altar of Wind">
<!-- The seal of the ruler is engraved on the ancient relic protecting the fort. -->
<icon>icon.skill0246</icon>
<operateType>A1</operateType>
<coolTime>500</coolTime>
<mpConsume>10</mpConsume>
<castRange>100</castRange>
<hitTime>60000</hitTime>
<hitTime>120000</hitTime>
<reuseDelay>5000</reuseDelay>
</skill>
<skill id="18517" toLevel="1" name="Top-grade Love Potion - Party">

View File

@ -1131,4 +1131,31 @@
<zone name="Mystic_Tavern_Globe5" id="80023" type="ScriptZone" shape="Cylinder" minZ="-14250" maxZ="-14100" rad="110">
<node X="-49355" Y="-148215" />
</zone>
<!-- Mystic Tavern Tauti -->
<zone name="Flame_Flower_Zone" id="80027" type="ScriptZone" shape="Cylinder" minZ="-8120" maxZ="-8040" rad="750">
<node X="143990" Y="-148845" />
</zone>
<zone name="Tauti_Start_Zone" id="80028" type="ScriptZone" shape="Cylinder" minZ="-7650" maxZ="-7550" rad="300">
<node X="142644" Y="-151100" />
</zone>
<zone name="Tauti_Scorpion_Zone" id="80029" type="ScriptZone" shape="Cylinder" minZ="-8850" maxZ="-8700" rad="650">
<node X="146900" Y="-148800" />
</zone>
<zone name="Tauti_Golem_Zone" id="80030" type="ScriptZone" shape="Cylinder" minZ="-9100" maxZ="-9000" rad="400">
<node X="150660" Y="-148760" />
</zone>
<zone name="Tauti_Tombstone_Zone" id="80031" type="ScriptZone" shape="NPoly" minZ="-9100" maxZ="-8900">
<node X="150744" Y="-150872" />
<node X="151087" Y="-150872" />
<node X="151173" Y="-151291" />
<node X="150400" Y="-152900" />
<node X="149945" Y="-152920" />
<node X="149837" Y="-152680" />
</zone>
<zone name="Tauti_Angel_Zone" id="80032" type="ScriptZone" shape="Cylinder" minZ="-11200" maxZ="-11000" rad="200">
<node X="152620" Y="-151338" />
</zone>
<zone name="Tauti_Scarab_Zone" id="80033" type="ScriptZone" shape="Cylinder" minZ="-9150" maxZ="-9000" rad="550">
<node X="148800" Y="-153125" />
</zone>
</list>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="261" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="5" />
<removeBuffs type="ALL" />
<locations>
<enter type="FIXED">
<location x="142598" y="-151085" z="-7598" />
</enter>
<exit type="FIXED" >
<location x="-50152" y="-148232" z="-14181" />
</exit>
</locations>
<parameters>
<param name="1_door" value="24130002" />
</parameters>
<reenter apply="ON_ENTER">
<reset day="WEDNESDAY" hour="6" minute="30" />
<reset day="SATURDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="24130002" />
</doorlist>
<spawnlist>
<group name="general" spawnByDefault="true">
<npc id="34170" x="142682" y="-151069" z="-7598" heading="33881" /> <!-- Deton -->
<npc id="19606" x="143711" y="-148520" z="-8080" heading="46170" /> <!-- Flame Flower -->
<npc id="19606" x="143874" y="-148607" z="-8072" heading="5270" /> <!-- Flame Flower -->
<npc id="19606" x="144340" y="-148826" z="-8088" heading="32630" /> <!-- Flame Flower -->
<npc id="19606" x="143733" y="-149179" z="-8080" heading="63803" /> <!-- Flame Flower -->
<npc id="19606" x="143763" y="-149362" z="-8080" heading="6830" /> <!-- Flame Flower -->
<npc id="19606" x="144053" y="-149299" z="-8072" heading="17817" /> <!-- Flame Flower -->
<npc id="19606" x="143534" y="-148580" z="-8080" heading="56838" /> <!-- Flame Flower -->
<npc id="19606" x="144250" y="-149119" z="-8088" heading="25862" /> <!-- Flame Flower -->
<npc id="19606" x="143897" y="-149480" z="-8080" heading="30822" /> <!-- Flame Flower -->
</group>
<group name="seal_device" spawnByDefault="true">
<npc id="19608" x="151700" y="-153000" z="-9064" heading="9000" /> <!-- Seal Device -->
</group>
<group name="flame_stacato" spawnByDefault="false">
<npc id="23681" x="144441" y="-148455" z="-8128" heading="40794" /> <!-- Flame Stakato -->
<npc id="23681" x="144397" y="-148420" z="-8128" heading="40479" /> <!-- Flame Stakato -->
<npc id="23681" x="144357" y="-148379" z="-8128" heading="41407" /> <!-- Flame Stakato -->
<npc id="23681" x="144379" y="-148523" z="-8104" heading="41405" /> <!-- Flame Stakato -->
<npc id="23681" x="144347" y="-148483" z="-8104" heading="41662" /> <!-- Flame Stakato -->
<npc id="23681" x="144306" y="-148449" z="-8096" heading="40690" /> <!-- Flame Stakato -->
<npc id="23681" x="144334" y="-148574" z="-8088" heading="42453" /> <!-- Flame Stakato -->
<npc id="23681" x="144297" y="-148537" z="-8088" heading="38531" /> <!-- Flame Stakato -->
<npc id="23681" x="144258" y="-148493" z="-8088" heading="41300" /> <!-- Flame Stakato -->
</group>
<group name="flame_scorpion" spawnByDefault="false">
<npc id="23682" x="146270" y="-148865" z="-8768" heading="11468" /> <!-- Flame Scorpion -->
<npc id="23682" x="146441" y="-149132" z="-8776" heading="16320" /> <!-- Flame Scorpion -->
<npc id="23682" x="146753" y="-149179" z="-8784" heading="526" /> <!-- Flame Scorpion -->
<npc id="23682" x="146799" y="-149154" z="-8784" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147191" y="-148926" z="-8768" heading="26226" /> <!-- Flame Scorpion -->
<npc id="23682" x="147410" y="-148739" z="-8784" heading="29781" /> <!-- Flame Scorpion -->
<npc id="23682" x="147347" y="-148522" z="-8768" heading="11138" /> <!-- Flame Scorpion -->
<npc id="23682" x="147160" y="-148332" z="-8776" heading="37321" /> <!-- Flame Scorpion -->
<npc id="23682" x="146845" y="-148314" z="-8784" heading="39573" /> <!-- Flame Scorpion -->
<npc id="23682" x="146408" y="-148502" z="-8784" heading="62425" /> <!-- Flame Scorpion -->
</group>
<group name="ifrit" spawnByDefault="false">
<npc id="23704" x="146920" y="-148904" z="-8760" heading="28021" /> <!-- Ifrit -->
</group>
<group name="golem" spawnByDefault="false">
<npc id="23680" x="150661" y="-148758" z="-9072" heading="57203" /> <!-- Flame Golem -->
</group>
<group name="flame_scarab" spawnByDefault="false">
<npc id="23709" x="148511" y="-152739" z="-9072" heading="57240" /> <!-- Flame Scarab -->
<npc id="23709" x="148367" y="-152894" z="-9072" heading="61343" /> <!-- Flame Scarab -->
<npc id="23709" x="148304" y="-153108" z="-9072" heading="64738" /> <!-- Flame Scarab -->
<npc id="23709" x="148358" y="-153314" z="-9072" heading="4948" /> <!-- Flame Scarab -->
<npc id="23709" x="148502" y="-153486" z="-9072" heading="9136" /> <!-- Flame Scarab -->
<npc id="23709" x="148688" y="-153600" z="-9072" heading="12495" /> <!-- Flame Scarab -->
<npc id="23709" x="148882" y="-153607" z="-9072" heading="17836" /> <!-- Flame Scarab -->
<npc id="23709" x="149070" y="-153541" z="-9072" heading="23473" /> <!-- Flame Scarab -->
<npc id="23709" x="149190" y="-153395" z="-9072" heading="25933" /> <!-- Flame Scarab -->
<npc id="23709" x="149286" y="-153232" z="-9072" heading="32392" /> <!-- Flame Scarab -->
<npc id="23709" x="149285" y="-153034" z="-9072" heading="34442" /> <!-- Flame Scarab -->
<npc id="23709" x="149199" y="-152878" z="-9072" heading="37261" /> <!-- Flame Scarab -->
<npc id="23709" x="149095" y="-152737" z="-9072" heading="41838" /> <!-- Flame Scarab -->
<npc id="23709" x="148856" y="-152649" z="-9072" heading="46586" /> <!-- Flame Scarab -->
<npc id="23709" x="148685" y="-152646" z="-9072" heading="51422" /> <!-- Flame Scarab -->
</group>
<group name="seal_tmbstone" spawnByDefault="false">
<npc id="19607" x="151341" y="-152655" z="-9072" heading="31470" /> <!-- Seal Tombstone -->
<npc id="34170" x="151332" y="-152552" z="-9072" heading="49517" /> <!-- Deton -->
</group>
<group name="arimanes" spawnByDefault="false">
<npc id="23705" x="151096" y="-152446" z="-9072" heading="56646" /> <!-- Arimanes -->
</group>
<group name="seal_arngels" spawnByDefault="false">
<npc id="23683" x="153221" y="-148113" z="-11560" heading="49530" /> <!-- Seal Archangel -->
<npc id="23684" x="153404" y="-147975" z="-11560" heading="47124" /> <!-- Seal Angel -->
<npc id="23684" x="153047" y="-147942" z="-11560" heading="46465" /> <!-- Seal Angel -->
</group>
<group name="singl_angel" spawnByDefault="false">
<npc id="23685" x="153267" y="-148441" z="-11560" heading="49199" /> <!-- Seal Angel -->
</group>
<group name="clone_1" spawnByDefault="false">
<npc id="19626" x="153712" y="-148226" z="-11560" heading="34643" /> <!-- -->
</group>
<group name="clone_2" spawnByDefault="false">
<npc id="19626" x="153378" y="-147959" z="-11560" heading="45409" /> <!-- -->
</group>
<group name="clone_3" spawnByDefault="false">
<npc id="19626" x="152972" y="-148061" z="-11560" heading="59040" /> <!-- -->
</group>
<group name="clone_4" spawnByDefault="false">
<npc id="19626" x="152783" y="-148437" z="-11560" heading="544" /> <!-- -->
</group>
<group name="clone_5" spawnByDefault="false">
<npc id="19626" x="152966" y="-148816" z="-11560" heading="10447" /> <!-- -->
</group>
<group name="clone_6" spawnByDefault="false">
<npc id="19626" x="153382" y="-148915" z="-11560" heading="21643" /> <!-- -->
</group>
<group name="clone_7" spawnByDefault="false">
<npc id="19626" x="153710" y="-148649" z="-11560" heading="31159" /> <!-- -->
</group>
<group name="last_archagel" spawnByDefault="false">
<npc id="23683" x="153191" y="-145811" z="-11384" heading="49170" /> <!-- Seal Archangel -->
<npc id="19627" x="153187" y="-145186" z="-11240" heading="32285" /> <!-- Tauti -->
</group>
<group name="last_deton" spawnByDefault="false">
<npc id="34170" x="153251" y="-146350" z="-11384" heading="16359" /> <!-- Deton -->
</group>
</spawnlist>
</instance>

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
import instances.MysticTavern.StoryOfFreya.StoryOfFreya;
import instances.MysticTavern.StoryOfTauti.StoryOfTauti;
import quests.Q10297_GrandOpeningComeToOurPub.Q10297_GrandOpeningComeToOurPub;
/**
@ -57,7 +58,7 @@ public class MysticTavern extends AbstractNpcAI
private static final int LUPIA = 34185;
private static final int MEY = 34186;
// Instances
// private static final int INSTANCE_TAUTI = 261;
private static final int INSTANCE_TAUTI = 261;
// private static final int INSTANCE_KELBIM = 262;
private static final int INSTANCE_FREYA = 263;
// Zones
@ -105,7 +106,7 @@ public class MysticTavern extends AbstractNpcAI
}
final List<Integer> availableInstances = new ArrayList<>();
availableInstances.add(INSTANCE_FREYA);
// availableInstances.add(INSTANCE_TAUTI);
availableInstances.add(INSTANCE_TAUTI);
// availableInstances.add(INSTANCE_KELBIM);
for (PlayerInstance member : party.getMembers())
{
@ -132,16 +133,16 @@ public class MysticTavern extends AbstractNpcAI
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
// {
// if (availableInstances.get(i) == INSTANCE_TAUTI)
// {
// availableInstances.remove(i);
// }
// }
// }
if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_TAUTI) > 0)
{
for (int i = 0; i < availableInstances.size(); i++)
{
if (availableInstances.get(i) == INSTANCE_TAUTI)
{
availableInstances.remove(i);
}
}
}
// if (InstanceManager.getInstance().getInstanceTime(member, INSTANCE_KELBIM) > 0)
// {
// for (int i = 0; i < availableInstances.size(); i++)
@ -160,7 +161,6 @@ public class MysticTavern extends AbstractNpcAI
npc.setScriptValue(getRandom(availableInstances.size()));
startQuestTimer("npcRoute", 3000, npc, player);
}
startQuestTimer("npcRoute", 3000, npc, player); // TODO only for test
break;
}
case "npcRoute":
@ -333,11 +333,11 @@ public class MysticTavern extends AbstractNpcAI
player.processQuestEvent(StoryOfFreya.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_TAUTI:
// {
// player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
// break;
// }
case INSTANCE_TAUTI:
{
player.processQuestEvent(StoryOfTauti.class.getSimpleName(), "start_story");
break;
}
// case INSTANCE_KELBIM:
// {
// player.processQuestEvent(StoryOfKelbim.class.getSimpleName(), "start_story");

View File

@ -0,0 +1,3 @@
<html><body>Archaeologist Deton:<br>
What do you want? I'm busy right now. Come back later.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Archaeologist Deton:<br>
Hmm, where are we?<br>
I should take a look at the map again...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest StoryOfTauti give_map">"Excuse me..."</Button>
</body></html>

View File

@ -0,0 +1,943 @@
/*
* 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 instances.MysticTavern.StoryOfTauti;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.SkillCaster;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ScriptZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
import instances.AbstractInstance;
import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti;
/**
* Mystic Tavern Tauti Instance
* @VIDEO https://www.youtube.com/watch?v=uPXWZ1ZCtFk
* @author Gigi
*/
public class StoryOfTauti extends AbstractInstance
{
// NPC
private static final int DETON = 34170;
private static final int FLAME_FLOWER = 19606;
private static final int SEAL_DEVICE = 19608;
// Monsters
private static final int FLAME_STACATO = 23681;
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
private static final int SEAL_ARCHANGEL = 23683;
private static final int SEALED_ANGEL = 23685;
private static final int NPC_1 = 19626;
// Item
private static final int FLAME_FLOWER_BUD = 46554;
// Misc
private static final int TEMPLATE_ID = 261;
private static final ScriptZone FLAME_FLOWER_ZONE = ZoneManager.getInstance().getZoneById(80027, ScriptZone.class);
private static final ScriptZone START_ZONE = ZoneManager.getInstance().getZoneById(80028, ScriptZone.class);
private static final ScriptZone SCORPION_ZONE = ZoneManager.getInstance().getZoneById(80029, ScriptZone.class);
private static final ScriptZone GOLEM_ZONE = ZoneManager.getInstance().getZoneById(80030, ScriptZone.class);
private static final ScriptZone TOMBSTONE_ZONE = ZoneManager.getInstance().getZoneById(80031, ScriptZone.class);
private static final ScriptZone ANGEL_ZONE = ZoneManager.getInstance().getZoneById(80032, ScriptZone.class);
private static final ScriptZone SCARAB_ZONE = ZoneManager.getInstance().getZoneById(80033, ScriptZone.class);
private static final SkillHolder DECREASE_PDEF = new SkillHolder(18515, 1);
private static final SkillHolder SUMMON_FLAME_FLOWER = new SkillHolder(18513, 1);
private static final SkillHolder SEAL_ARCHANGEL_WRATH = new SkillHolder(16572, 1);
private static final Location DETON_MOVE = new Location(143641, -149193, -8072);
private static final Location DETON_MOVE_1 = new Location(151084, -152315, -9072);
private static final Location DETON_MOVE_2 = new Location(151618, -152823, -9064);
private static final Location DETON_MOVE_3 = new Location(153296, -145602, -11384);
private static final Location TELEPORT = new Location(153267, -148441, -11560);
private static final int ZONE_1ST_TRIGER = 24137770;
private static final int SKILL_TRIGER = 24138880;
private static Npc _deton;
private static Npc _seal_device;
protected int _count = 0;
public StoryOfTauti()
{
super(TEMPLATE_ID);
addSpawnId(DETON, SEAL_DEVICE, FLAME_FLOWER, FLAME_STACATO, FLAME_SCORPION, FLAME_SCARAB, FLAME_GOLEM, NPC_1, SEAL_ARCHANGEL);
addAttackId(SEAL_TOMBSTONE, SEAL_ARCHANGEL);
addKillId(FLAME_STACATO, FLAME_SCORPION, SEAL_TOMBSTONE, SEALED_ANGEL);
addSkillSeeId(FLAME_FLOWER, SEAL_TOMBSTONE);
addFirstTalkId(DETON);
addEnterZoneId(FLAME_FLOWER_ZONE.getId(), START_ZONE.getId(), SCORPION_ZONE.getId(), GOLEM_ZONE.getId(), TOMBSTONE_ZONE.getId(), ANGEL_ZONE.getId(), SCARAB_ZONE.getId());
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final Instance world = npc.getInstanceWorld();
switch (event)
{
case "start_story":
{
player.standUp();
enterInstance(player, null, TEMPLATE_ID);
final Party party = player.getParty();
if (party != null)
{
final Instance instance = player.getInstanceWorld();
for (PlayerInstance member : party.getMembers())
{
if (member != player)
{
member.standUp();
member.teleToLocation(player, instance);
instance.addPlayer(member);
instance.addAllowed(member);
}
}
instance.setReenterTime();
}
break;
}
case "give_map":
{
if ((player.isInParty() && player.getParty().isLeader(player)) || player.isGM())
{
if (world.isStatus(1) || world.isStatus(4))
{
_deton.setTarget(player);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
return "34170-01.html";
}
}
break;
}
case "check_status":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_THE_ONES_WHO_WILL_BE_HELPING_OUT_WELCOME_I_VE_BEEN_WAITING_FOR_YOU);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl != null) && ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM()))
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
startQuestTimer("msg_1", 7000, _deton, null);
break;
}
case "msg_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAD_A_HARD_TIME_WORKING_BY_MYSELF_I_M_GLAD_YOU_ARE_HERE_NOW);
startQuestTimer("msg_2", 10000, _deton, null);
break;
}
case "msg_2":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_WORRY_ABOUT_THE_REWARD_WE_LL_FIND_THAT_TREASURE);
startQuestTimer("msg_3", 10000, _deton, null);
break;
}
case "msg_3":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_M_GLAD_POWERFUL_PEOPLE_LIKE_YOU_GUYS_ARE_HELPING_ME);
break;
}
case "msg_4":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_I_M_SURE_I_VE_SEEN_THIS_BEFORE_YES_THAT_MEANS_THE_STAKATOS);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE);
startQuestTimer("msg_5", 7000, _deton, null);
break;
}
case "msg_5":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TO_SAVE_THE_FLAME_FLOWER_YOU_NEED_HEAL_WAIT_RADIANT_HEAL_YES_I_M_SURE);
startQuestTimer("msg_6", 10000, _deton, null);
break;
}
case "msg_6":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELL_THERE_S_NOT_MUCH_DIFFERENCE_RIGHT_OR_IS_THERE);
break;
}
case "spawn_stacato":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_1", 50000, _deton, null);
break;
}
case "spawn_stacato_1":
{
world.spawnGroup("flame_stacato");
startQuestTimer("spawn_stacato_2", 50000, _deton, null);
break;
}
case "spawn_stacato_2":
{
world.spawnGroup("flame_stacato");
world.setStatus(3);
break;
}
case "check_flower":
{
if (!npc.isDead())
{
for (final Npc nearby : World.getInstance().getVisibleObjectsInRange(npc, FriendlyNpcInstance.class, 1000))
{
if ((nearby.getId() == FLAME_FLOWER) && npc.isScriptValue(0) && nearby.isScriptValue(0))
{
_deton.setRunning();
addMoveToDesire(npc, nearby.getLocation(), 23);
if (npc.calculateDistance3D(nearby) < 100)
{
nearby.setCurrentHp(nearby.getCurrentHp() - 10000);
nearby.setScriptValue(1);
npc.setCurrentHp(npc.getCurrentHp() + 15000);
npc.setScriptValue(1);
startQuestTimer("reset_flower", 8000, nearby, null);
if (nearby.getCurrentHp() < 1)
{
nearby.doDie(npc);
}
}
}
}
}
break;
}
case "reset_flower":
{
npc.setScriptValue(0);
break;
}
case "msg_7":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_S_HAVE_SOME_FUN);
break;
}
case "spawn_scorpion":
{
world.spawnGroup("flame_scorpion");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EEK_SAVE_THIS_DWARF_I_M_JUST_AN_ARCHAEOLOGIST_I_LL_GIVE_YOU_EVERYTHING_I_HAVE);
if (getRandom(10) < 5)
{
world.spawnGroup("ifrit");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IFRIT, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
break;
}
case "attack_player":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, pl ->
{
if ((pl != null) && !pl.isDead())
{
_deton.setRunning();
addMoveToDesire(npc, new Location(pl.getX() + getRandom(-40, 40), pl.getY() + getRandom(-40, 40), pl.getZ()), 23);
addAttackPlayerDesire(npc, pl);
}
if (!npc.isDead() && !npc.isInCombat())
{
startQuestTimer("attack_player", 5000, npc, pl);
}
});
break;
}
case "msg_8":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YOU_TRULY_ARE_AMAZING_YOU_ACTUALLY_DEFEATED_THOSE_NASTY_GUYS);
startQuestTimer("msg_9", 8000, _deton, null);
break;
}
case "msg_9":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_PATH_SPLITS_NOW_WELL_LET_S_GO_WHICH_WAY);
startQuestTimer("msg_10", 10000, _deton, null);
break;
}
case "msg_10":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BOTH_LOOK_PRETTY_BAD_BUT_WE_MUST_KEEP_GOING);
break;
}
case "spawn_golem":
{
world.spawnGroup("golem");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_WHAT_ARE_THESE_MONSTERS_HOW_OLD_DO_YOU_HAVE_BE_TO_GET_THAT_BIG);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LOOK_AT_THAT_FLAME_GOLEM_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away", 10000, _deton, null);
break;
}
case "run_away":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_LEAVE_THOSE_MONSTERS_TO_YOU_I_LL_GO_CHECK_OUT_SOMETHING_OVER_THERE_IT_S_VERY_IMPORTANT);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 3500, _deton, null);
break;
}
case "delete_daton":
{
world.despawnGroup("general");
world.spawnGroup("seal_tmbstone");
break;
}
case "msg_11":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YES_THE_SEAL_IS_GONE_WELL_YOU_GO_ON_AHEAD_I_LL_MAKE_SOME_RUBBED_COPIES_FIRST);
break;
}
case "msg_12":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_T_BELIEVE_YOU_ACTUALLY_FELL_FOR_THAT_I_WAS_JUST_USING_YOU_KAHAHA);
startQuestTimer("msg_13", 9000, _deton, null);
break;
}
case "msg_13":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_SO_THIS_IS_TAUTI_GIVE_ME_YOUR_POWER_YOU_ARE_MINE_KAHAHAHA);
break;
}
case "spawn_scarab":
{
world.spawnGroup("flame_scarab");
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAHHH_THIS_WAY_WAS_DANGEROUS_TOO_SAVE_ME);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THAT_FLAME_SCARAB_IT_S_TERRIFYING, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("run_away_1", 8000, _deton, null);
break;
}
case "run_away_1":
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_SOMETHING_ABOUT_THESE_MONSTERS_SHOW_ME_YOUR_STRENGTH_I_LL_BE_WAITING_OVER_THERE);
_deton.setTarget(null);
_deton.stopMove(null);
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_1);
startQuestTimer("delete_daton", 5000, _deton, null);
break;
}
case "switch_quest":
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(6))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(7, true);
}
}
}
}
}
});
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, true));
break;
}
case "angel_msg":
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_STUPID_IGNORANCE_IS_A_SIN_I_LL_LET_YOU_GO_THIS_ONE_TIME_GO);
world.despawnGroup("seal_tmbstone");
break;
}
case "angel_teleport":
{
npc.teleToLocation(TELEPORT, world);
startQuestTimer("angel_triger", 2000, npc, player);
break;
}
case "angel_triger":
{
world.broadcastPacket(new OnEventTrigger(ZONE_1ST_TRIGER, false));
world.spawnGroup("singl_angel");
startQuestTimer("triger", 3000, npc, player);
break;
}
case "triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, true));
startQuestTimer("end_triger", 12000, npc, player);
startQuestTimer("clone_1", 1000, npc, player);
world.despawnGroup("seal_arngels");
break;
}
case "clone_1":
{
world.spawnGroup("clone_1");
startQuestTimer("clone_2", 500, npc, player);
break;
}
case "clone_2":
{
world.spawnGroup("clone_2");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_3", 500, npc, player);
}
break;
}
case "clone_3":
{
world.spawnGroup("clone_3");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_4", 500, npc, player);
}
break;
}
case "clone_4":
{
world.spawnGroup("clone_4");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_5", 500, npc, player);
}
break;
}
case "clone_5":
{
world.spawnGroup("clone_5");
if (world.getAliveNpcs(NPC_1).size() < _count)
{
startQuestTimer("clone_6", 500, npc, player);
}
break;
}
case "clone_6":
{
world.spawnGroup("clone_6");
startQuestTimer("clone_7", 500, npc, player);
break;
}
case "clone_7":
{
world.spawnGroup("clone_7");
break;
}
case "clone_player":
{
npc.setCloneObjId(player.getObjectId());
if ((npc.getCloneObjId() == player.getObjectId()) && !player.getEffectList().hasAbnormalVisualEffect(AbnormalVisualEffect.STUN))
{
player.teleToLocation(npc.getLocation(), world);
player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.STUN);
if ((player.getClan() != null) && (player.getClanCrestId() != 0))
{
npc.setClanId(player.getClanId());
}
npc.broadcastStatusUpdate();
}
npc.setScriptValue(1);
startQuestTimer("clear_player", 12000, npc, player);
break;
}
case "end_triger":
{
world.broadcastPacket(new OnEventTrigger(SKILL_TRIGER, false));
break;
}
case "clear_player":
{
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.STUN);
break;
}
case "end_instance":
{
cancelQuestTimers("check_flower");
_count = 0;
for (Npc n : world.getAliveNpcs())
{
n.deleteMe();
}
world.finishInstance(0);
break;
}
}
return null;
}
@Override
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case SEAL_TOMBSTONE:
{
if (npc.isScriptValue(0))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SEALED_TABLET_ATTACK_THE_FLAME_FLOWERS_OH_PLANT_THE_FLAME_FLOWERS_AROUND_THE_TABLET_AND_ATTACK_IT_NOW);
npc.setScriptValue(1);
break;
}
if (npc.isScriptValue(1) && (npc.getCurrentHpPercent() < 60))
{
_seal_device.setDisplayEffect(1);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OH_YES_LOOK_AT_THAT_THE_SEAL_IS_BREAKING_JUST_A_LITTLE_MORE);
npc.setScriptValue(2);
break;
}
if (npc.isScriptValue(2) && (npc.getCurrentHpPercent() < 40))
{
if (getRandom(10) < 5)
{
world.spawnGroup("arimanes");
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.ARIMANES, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
npc.setScriptValue(3);
break;
}
if (npc.isScriptValue(3) && (npc.getCurrentHpPercent() < 20))
{
_seal_device.setDisplayEffect(2);
npc.setScriptValue(4);
break;
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(9) && npc.isScriptValue(0))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DO_NOT_LUST_AFTER_WHAT_S_SEALED_HERE_IT_IS_NOT_YOURS);
startQuestTimer("angel_msg", 6000, npc, null);
startQuestTimer("switch_quest", 1000, npc, attacker);
npc.setScriptValue(1);
}
if (world.isStatus(9) && (npc.getCurrentHpPercent() < 50))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TAUTI_MUST_REMAIN_SEALED_HERE);
startQuestTimer("angel_teleport", 3000, npc, attacker);
world.setStatus(10);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
}
if (world.isStatus(10) && (npc.getCurrentHpPercent() < 30))
{
world.spawnGroup("last_deton");
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_3);
startQuestTimer("msg_12", 6000, _deton, null);
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NICE_NICE_I_SEE_THAT_EVERYONE_S_FIGHTING_HARD_FOR_ME);
world.setStatus(11);
}
if (world.isStatus(11) && (npc.getCurrentHpPercent() < 5))
{
npc.setIsInvul(true);
SEAL_ARCHANGEL_WRATH.getSkill().applyEffects(npc, attacker);
world.setStatus(12);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if (pl.isInParty())
{
final Party party = pl.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(7))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(8, true);
}
}
}
}
}
});
startQuestTimer("end_instance", 52000, _deton, null);
world.despawnGroup("last_deton");
world.despawnGroup("last_archagel");
playMovie(world.getPlayers(), Movie.EPIC_TAUTI_SCENE);
npc.deleteMe();
}
}
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_STACATO:
{
if (world.isStatus(3) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
{
cancelQuestTimers("end_instance");
cancelQuestTimers("check_flower");
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, true, true, 0, 0, NpcStringId.ELAPSED_TIME)));
world.setStatus(4);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1000, pl ->
{
if ((pl.isInParty() && pl.getParty().isLeader(pl)) || pl.isGM())
{
_deton.setTarget(pl);
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, pl);
}
});
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ANYWAY_THE_STAKATOS_WILL_NOT_COME_OUT_ANYMORE_WHY_WELL);
startQuestTimer("msg_7", 7000, _deton, null);
}
break;
}
case FLAME_SCORPION:
{
if (world.isStatus(5) && (world.getAliveNpcs(MonsterInstance.class).size() < 2))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LEFT_OR_RIGHT_WHICH_WAY, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
startQuestTimer("msg_8", 3000, _deton, null);
world.setStatus(6);
}
break;
}
case SEAL_TOMBSTONE:
{
_seal_device.setDisplayEffect(3);
_seal_device.doDie(npc);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.LET_S_GO_DOWN_THIS_WAY_I_LL_BE_RIGHT_BEHIND_YOU, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.setRunning();
_deton.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, DETON_MOVE_2);
startQuestTimer("msg_11", 3000, _deton, null);
break;
}
case SEALED_ANGEL:
{
world.spawnGroup("last_archagel");
world.openCloseDoor(world.getTemplateParameters().getInt("1_door"), true);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
final PlayerInstance player = creature.getActingPlayer();
if (isInInstance(world))
{
switch (zone.getId())
{
case 80027:
{
if (((player.isInParty() && player.getParty().isLeader(player)) || player.isGM()) && world.isStatus(1))
{
world.setStatus(2);
_deton.setTarget(null);
_deton.stopMove(null);
startQuestTimer("msg_4", 7000, _deton, null);
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.IT_S_A_FLAME_FLOWER_THESE_SHOULD_COME_IN_HANDY_LATER_ON, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.getPlayers().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 180, 0, NpcStringId.ELAPSED_TIME)));
startQuestTimer("end_instance", 190000, _deton, null);
startQuestTimer("spawn_stacato", 5000, _deton, null);
}
break;
}
case 80028:
{
if (world.isStatus(0))
{
startQuestTimer("check_status", 21000, _deton, player);
world.setStatus(1);
}
break;
}
case 80029:
{
if (world.isStatus(4))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_CROSSROADS_I_DON_T_KNOW_WHICH_WAY_WE_SHOULD_TAKE, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_WHAT_IS_THIS_I_DON_T_THINK_I_VE_BEEN_AROUND_HERE_BEFORE_THIS_EERIE_FEELING);
startQuestTimer("spawn_scorpion", 5000, _deton, player);
world.setStatus(5);
}
break;
}
case 80030:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OKAY_IT_DOES_LOOK_BETTER_THAN_THE_OTHER_WAY_THE_AIR_FEELS_BETTER_ALREADY);
startQuestTimer("spawn_golem", 7000, _deton, player);
world.setStatus(7);
}
break;
}
case 80031:
{
if (world.isStatus(7))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.A_SEALED_TABLET_HUH, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.setStatus(8);
}
break;
}
case 80032:
{
if (world.isStatus(8))
{
world.broadcastPacket(new ExShowScreenMessage(NpcStringId.THERE_S_NO_FUTURE_FOR_THOSE_WHO_CANNOT_WIN_AGAINST_THEMSELVES, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
world.spawnGroup("seal_arngels");
world.setStatus(9);
}
break;
}
case 80033:
{
if (world.isStatus(6))
{
_deton.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_WAY_FEELS_MUCH_SAFER_GOOD_CHOICE_THE_AIR_FEELS_DIFFERENT);
startQuestTimer("spawn_scarab", 7000, _deton, player);
world.setStatus(7);
}
break;
}
}
}
return super.onEnterZone(creature, zone);
}
@Override
public String onSpawn(Npc npc)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case DETON:
{
_deton = npc;
break;
}
case SEAL_DEVICE:
{
_seal_device = npc;
break;
}
case FLAME_FLOWER:
{
npc.setCurrentHp(npc.getMaxHp() * 0.20);
for (final Npc tombstone : World.getInstance().getVisibleObjectsInRange(npc, MonsterInstance.class, 500))
{
if (tombstone.getId() == SEAL_TOMBSTONE)
{
npc.setTarget(tombstone);
tryToEffect(npc, tombstone, DECREASE_PDEF.getSkillId());
}
}
break;
}
case FLAME_STACATO:
{
startQuestTimer("check_flower", 3000, npc, null, true);
break;
}
case FLAME_SCORPION:
{
startQuestTimer("attack_player", 2000, npc, null);
break;
}
case FLAME_GOLEM:
{
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(3, true);
}
}
}
}
}
});
break;
}
case FLAME_SCARAB:
{
startQuestTimer("attack_player", 2000, npc, null);
World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 1500, player ->
{
if (player.isInParty())
{
final Party party = player.getParty();
final List<PlayerInstance> members = party.getMembers();
for (PlayerInstance member : members)
{
if (member.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
final QuestState qs = member.getQuestState(Q00833_DevilsTreasureTauti.class.getSimpleName());
if ((qs != null) && qs.isCond(2))
{
final Quest qs833 = QuestManager.getInstance().getQuest(Q00833_DevilsTreasureTauti.class.getSimpleName());
if (qs833 != null)
{
qs.setCond(4, true);
}
}
}
}
}
});
break;
}
case NPC_1:
{
for (final PlayerInstance nearby : World.getInstance().getVisibleObjectsInRange(npc, PlayerInstance.class, 2000))
{
if (npc.isScriptValue(0) && (nearby != null))
{
startQuestTimer("clone_player", 500, npc, nearby);
}
}
break;
}
case SEAL_ARCHANGEL:
{
if (world.isStatus(10))
{
npc.setCurrentHp(npc.getMaxHp() * 0.5);
}
break;
}
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(Npc npc, PlayerInstance caster, Skill skill, WorldObject[] targets, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case FLAME_FLOWER:
{
if ((world.getStatus() < 5) && (npc.getCurrentHp() == npc.getMaxHp()))
{
npc.broadcastPacket(new ExShowScreenMessage(NpcStringId.S1_LOOK_INSIDE_YOUR_BAG_YOU_OBTAINED_A_FLAME_FLOWER, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false, caster.getName()));
giveItems(caster, FLAME_FLOWER_BUD, 1);
npc.doDie(npc);
npc.deleteMe();
}
break;
}
case SEAL_TOMBSTONE:
{
if (skill.getId() == SUMMON_FLAME_FLOWER.getSkillId())
{
addSpawn(FLAME_FLOWER, caster, false, 60000, false, world.getId());
}
break;
}
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return npc.getId() + ".html";
}
private void tryToEffect(Npc npc, Creature character, int diseaseId)
{
final BuffInfo info = character.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 3) ? info.getSkill().getLevel() + 1 : 3;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && SkillCaster.checkUseConditions(npc, skill))
{
npc.doCast(skill);
}
}
public static void main(String[] args)
{
new StoryOfTauti();
}
}

View File

@ -129,7 +129,6 @@
792 The Superion Giants
816 Plans to Repair the Stronghold
824 Command Post Raid
833 Devil's Treasure, Tauti
834 Against Dragonclaw
836 Request from the Blackbird Clan
837 Request from the Giant Trackers

View File

@ -0,0 +1,6 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Oh, you must have heard Tauti's story!<br>
I was so shocked when I first heard about Tauti's story. To think that Deton tried to take axe and ended up turning into that...<br>
Anyway, I told you our stories are very interesting.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q00833_DevilsTreasureTauti 34180-02.html">"Yes, thank you."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
Anyway, thank you for listening to our stories. Here's a small gift for you.<br>
Please come by often and let's all have a great time again.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mystic Tavern Owner Settlen:<br>
The most interesting still ahead, and you want to leave?<br>
Just think about our employees who are trying for you. Please listen to the story to the end
</body></html>

View File

@ -0,0 +1,224 @@
/*
* 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.Q00833_DevilsTreasureTauti;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Devil's Treasure, Tauti (833)
* @URL https://l2wiki.com/Devil%27s_Treasure,_Tauti
* @author Gigi
*/
public class Q00833_DevilsTreasureTauti extends Quest
{
// NPCs
private static final int DETON = 34170;
private static final int SETTLEN = 34180;
// Monsters
private static final int FLAME_SCORPION = 23682;
private static final int FLAME_GOLEM = 23680;
private static final int FLAME_SCARAB = 23709;
private static final int SEAL_TOMBSTONE = 19607;
// Items
private static final int FRENZED_TAUTIS_FRAGMENT = 47884;
private static final int INSANE_KELBIMS_FRAGMENT = 47885;
private static final int SOE_MISTYC_TAVERN = 46564;
private static final int MYSTIC_ARMOR_PIACE = 46587;
private static final int FLAME_FLOWER = 46554;
public Q00833_DevilsTreasureTauti()
{
super(833);
addStartNpc(DETON);
addTalkId(SETTLEN);
addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE);
addSeeCreatureId(DETON);
registerQuestItems(FLAME_FLOWER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
switch (event)
{
case "34180-02.html":
{
final int chance = getRandom(100);
if (chance <= 10)
{
giveItems(player, FRENZED_TAUTIS_FRAGMENT, 1);
}
else if ((chance > 10) && (chance <= 20))
{
giveItems(player, INSANE_KELBIMS_FRAGMENT, 1);
}
else if ((chance > 20) && (chance <= 40))
{
giveItems(player, MYSTIC_ARMOR_PIACE, 1);
}
else
{
giveItems(player, SOE_MISTYC_TAVERN, 1);
}
addExpAndSp(player, 6_362_541_900L, 15_270_101);
qs.exitQuest(QuestType.REPEATABLE, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.STARTED:
{
htmltext = (qs.isCond(8)) ? "34180-01.html" : "34180-03.html";
}
}
return htmltext;
}
@Override
public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
{
final PlayerInstance player = creature.getActingPlayer();
if (player != null)
{
final QuestState qs = getQuestState(player, true);
if (!qs.isStarted())
{
playMovie(player, Movie.EPIC_TAUTI_SLIDE);
qs.startQuest();
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
Party party = killer.getParty();
if (party != null)
{
party.getMembers().forEach(p -> onKill(npc, p));
}
else
{
onKill(npc, killer);
}
return super.onKill(npc, killer, isSummon);
}
private void onKill(Npc npc, PlayerInstance killer)
{
final QuestState qs = getQuestState(killer, false);
switch (npc.getId())
{
case FLAME_SCORPION:
{
if ((qs != null) && qs.isCond(1) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScorpion = qs.getInt("killed_" + FLAME_SCORPION);
if (killedScorpion < 5)
{
qs.set("killed_" + FLAME_SCORPION, ++killedScorpion);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScorpion >= 5)
{
qs.setCond(2, true);
}
sendNpcLogList(killer);
}
break;
}
case FLAME_GOLEM:
{
if ((qs != null) && qs.isCond(3) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(5, true);
}
break;
}
case FLAME_SCARAB:
{
if ((qs != null) && qs.isCond(4) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
int killedScarab = qs.getInt("killed_" + FLAME_SCARAB);
if (killedScarab < 5)
{
qs.set("killed_" + FLAME_SCARAB, ++killedScarab);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
if (killedScarab >= 5)
{
qs.setCond(5, true);
}
sendNpcLogList(killer);
}
break;
}
case SEAL_TOMBSTONE:
{
if ((qs != null) && qs.isCond(5) && killer.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
{
qs.setCond(6, true);
}
break;
}
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs.isCond(1) || qs.isCond(4))
{
final Set<NpcLogListHolder> holder = new HashSet<>(2);
holder.add(new NpcLogListHolder(FLAME_SCORPION, false, qs.getInt("killed_" + FLAME_SCORPION)));
holder.add(new NpcLogListHolder(FLAME_SCARAB, false, qs.getInt("killed_" + FLAME_SCARAB)));
return holder;
}
return super.getNpcLogList(player);
}
}

Some files were not shown because too many files have changed in this diff Show More