Reworked some scripts.
Contributed by Stayway, gigilo1968.
This commit is contained in:
parent
9cb39dc889
commit
29042a9311
@ -963,7 +963,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Notify to scripts
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class);
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target, null), target, TerminateReturn.class);
|
||||
if ((attackedReturn != null) && attackedReturn.terminate())
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.events.impl.character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* An instantly executed event when L2Character is attacked by L2Character.
|
||||
@ -28,11 +29,13 @@ public class OnCreatureAttacked implements IBaseEvent
|
||||
{
|
||||
private final L2Character _attacker;
|
||||
private final L2Character _target;
|
||||
private final Skill _skill;
|
||||
|
||||
public OnCreatureAttacked(L2Character attacker, L2Character target)
|
||||
public OnCreatureAttacked(L2Character attacker, L2Character target, Skill skill)
|
||||
{
|
||||
_attacker = attacker;
|
||||
_target = target;
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
public final L2Character getAttacker()
|
||||
@ -45,6 +48,11 @@ public class OnCreatureAttacked implements IBaseEvent
|
||||
return _target;
|
||||
}
|
||||
|
||||
public final Skill getSkill()
|
||||
{
|
||||
return _skill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventType getType()
|
||||
{
|
||||
|
@ -13671,6 +13671,24 @@ public final class NpcStringId
|
||||
@ClientString(id = 554107, message = "Defeating the Scarecrow")
|
||||
public static NpcStringId DEFEATING_THE_SCARECROW;
|
||||
|
||||
@ClientString(id = 554210, message = "Preapare to use the skill 'Power Strike' or 'Mortal Blow'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_MORTAL_BLOW;
|
||||
|
||||
@ClientString(id = 554211, message = "Preapare to use the skill 'Wind Strike'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_WIND_STRIKE;
|
||||
|
||||
@ClientString(id = 554212, message = "Prepare to use the skill ‘Power Strike' or ‘Iron Punch")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_IRON_PUNCH;
|
||||
|
||||
@ClientString(id = 554213, message = "Prepare to use the skill ‘Chill Flame'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_CHILL_FLAME;
|
||||
|
||||
@ClientString(id = 554214, message = "Prepare to use the skill ‘Spoil'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_SPOIL;
|
||||
|
||||
@ClientString(id = 554215, message = "Prepare to use the skill ‘Fallen Attack' or ‘Fallen Arrow'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_FALLEN_ATTACK_OR_FALLEN_ARROW;
|
||||
|
||||
@ClientString(id = 570101, message = "The Road to Destruction (Above Lv. 93)")
|
||||
public static NpcStringId THE_ROAD_TO_DESTRUCTION_ABOVE_LV_93;
|
||||
|
||||
@ -31901,9 +31919,13 @@ public final class NpcStringId
|
||||
|
||||
@ClientString(id = 1803275, message = "If the story is still in progress, I can tell it again.")
|
||||
public static NpcStringId IF_THE_STORY_IS_STILL_IN_PROGRESS_I_CAN_TELL_IT_AGAIN;
|
||||
|
||||
@ClientString(id = 1803329, message = "Speak with the ‘Adventurers' Guide for Training'.")
|
||||
public static NpcStringId SPEAK_WITH_THE_ADVENTURERS_GUIDE_FOR_TRAINING;
|
||||
|
||||
@ClientString(id = 1803330, message = "Speak with Toyron in order to return to Shannon.")
|
||||
public static NpcStringId SPEAK_WITH_TOYRON_IN_ORDER_TO_RETURN_SHANNON;
|
||||
|
||||
@ClientString(id = 1810363, message = "You are too far from the corpse.")
|
||||
public static NpcStringId YOU_ARE_TOO_FAR_FROM_THE_CORPSE;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public final class LargeCocoon extends AbstractNpcAI
|
||||
{
|
||||
case "attack":
|
||||
{
|
||||
onCreatureAttacked(new OnCreatureAttacked(player, npc));
|
||||
onCreatureAttacked(new OnCreatureAttacked(player, npc, null));
|
||||
break;
|
||||
}
|
||||
case "attackPowerful":
|
||||
|
@ -1,3 +1,4 @@
|
||||
<html><body>Toyron:<br>
|
||||
You! Aren't you here to find the <font color="LEVEL">book</font>?
|
||||
Alright now, let's search for the intruder. It appears it's the Giant's Book he is after. Let us search around the bookshelf.<br>
|
||||
Keep the tension up while searching, as the intruder may suddenly show himself.
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<html><body>Toyron:<br>
|
||||
They're destroying the holy museum!<br>
|
||||
Defeat them!
|
||||
We cannot let the intruder be. Let us find him, and slay him.<br>
|
||||
The intruder will not be easy to take down. Please use skills to bring him down.
|
||||
</body></html>
|
@ -1,5 +1,6 @@
|
||||
<html><body>Toyron:<br>
|
||||
This museum displays the Giants' relics. Unfortunately, it's sometimes plagued by thieves.<br>
|
||||
There are always more. We still uncover treasures in their ruins.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Toyron museum_teleport">"I'll return to the Museum Lobby now."</Button>
|
||||
</body></html>
|
||||
The Giants disappeared long ago, but we still uncover treasures in their ruins, even now.<br>
|
||||
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Toyron museum_teleport">Return to the Museum Lobby</button>
|
||||
<button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</button>
|
||||
</body></html></body></html>
|
@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower;
|
||||
|
||||
/**
|
||||
* Toyron AI.
|
||||
@ -37,7 +37,7 @@ public final class Toyron extends AbstractNpcAI
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 182;
|
||||
// Location
|
||||
private static final Location MUSEUM_OUT = new Location(-114359, 260120, -1192);
|
||||
private static final Location MUSEUM_OUT = new Location(-111464, 255828, -1440);
|
||||
|
||||
private Toyron()
|
||||
{
|
||||
@ -57,7 +57,10 @@ public final class Toyron extends AbstractNpcAI
|
||||
{
|
||||
world.finishInstance(0);
|
||||
}
|
||||
player.teleToLocation(MUSEUM_OUT);
|
||||
else
|
||||
{
|
||||
player.teleToLocation(MUSEUM_OUT);
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
@ -76,15 +79,15 @@ public final class Toyron extends AbstractNpcAI
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if ((world != null) && (world.getTemplateId() == TEMPLATE_ID))
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName());
|
||||
if (qs != null)
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
case 3:
|
||||
htmltext = "33004-01.html";
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
htmltext = "33004-02.html";
|
||||
break;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
<html><body>[Desk]:<br>
|
||||
You've found <font color="LEVEL">The War of Gods and Giants</font>. Take it back to Pantheon.
|
||||
You've found <font color="LEVEL">The War of Gods and Giants</font>.<br1>
|
||||
Found It!
|
||||
</body></html>
|
@ -19,7 +19,9 @@ package instances.MuseumDungeon;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -27,7 +29,11 @@ import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.Id;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttacked;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDeath;
|
||||
import com.l2jmobius.gameserver.model.events.returns.DamageReturn;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -35,7 +41,7 @@ import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower;
|
||||
|
||||
/**
|
||||
* Museum Dungeon Instance Zone.
|
||||
@ -44,14 +50,17 @@ import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheB
|
||||
public final class MuseumDungeon extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int PANTHEON = 32972;
|
||||
private static final int SHANNON = 32974;
|
||||
private static final int TOYRON = 33004;
|
||||
private static final int DESK = 33126;
|
||||
private static final int THIEF = 23121;
|
||||
// Items
|
||||
private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575;
|
||||
// Skills
|
||||
private static final SkillHolder SPOIL = new SkillHolder(254, 1);
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 182;
|
||||
private static final double DAMAGE_BY_SKILL = 0.5d;
|
||||
|
||||
private static final NpcStringId[] THIEF_SHOUT =
|
||||
{
|
||||
@ -62,9 +71,9 @@ public final class MuseumDungeon extends AbstractInstance
|
||||
public MuseumDungeon()
|
||||
{
|
||||
super(TEMPLATE_ID);
|
||||
addStartNpc(PANTHEON);
|
||||
addStartNpc(SHANNON);
|
||||
addFirstTalkId(DESK);
|
||||
addTalkId(PANTHEON, TOYRON);
|
||||
addTalkId(SHANNON, TOYRON);
|
||||
addAttackId(THIEF);
|
||||
}
|
||||
|
||||
@ -86,19 +95,30 @@ public final class MuseumDungeon extends AbstractInstance
|
||||
toyron.setCanReturnToSpawnPoint(false);
|
||||
}
|
||||
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName());
|
||||
if (qs != null)
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
switch (qs.getCond())
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
startQuestTimer("TOYRON_FOLLOW", 500, toyron, player);
|
||||
if (instance.getNpcs(THIEF).isEmpty())
|
||||
case 1:
|
||||
{
|
||||
startQuestTimer("SPAWN_THIEFS_STAGE_2", 500, null, player);
|
||||
qs.setCond(2, true);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
getTimers().addTimer("TOYRON_FOLLOW", 1500, toyron, player);
|
||||
toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHEN_DID_THEY_GET_IN_HERE);
|
||||
|
||||
if (instance.getNpcs(THIEF).isEmpty())
|
||||
{
|
||||
instance.spawnGroup("thiefs").forEach(npc -> npc.setIsRunning(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -111,116 +131,150 @@ public final class MuseumDungeon extends AbstractInstance
|
||||
{
|
||||
enterInstance(player, npc, TEMPLATE_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
final Instance world = player.getInstanceWorld();
|
||||
if (world != null)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "TOYRON_FOLLOW":
|
||||
{
|
||||
npc.getAI().startFollow(player);
|
||||
break;
|
||||
}
|
||||
case "SPAWN_THIEFS_STAGE_1":
|
||||
{
|
||||
final List<L2Npc> thiefs = world.spawnGroup("thiefs");
|
||||
for (L2Npc thief : thiefs)
|
||||
{
|
||||
thief.setIsRunning(true);
|
||||
addAttackPlayerDesire(thief, player);
|
||||
thief.broadcastSay(ChatType.NPC_GENERAL, THIEF_SHOUT[getRandom(2)]);
|
||||
}
|
||||
final L2Npc toyron = world.getNpc(TOYRON);
|
||||
toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHEN_DID_THEY_GET_IN_HERE);
|
||||
startQuestTimer("TOYRON_MSG_1", 2500, toyron, player);
|
||||
startQuestTimer("SKILL_MSG", 4500, toyron, player);
|
||||
break;
|
||||
}
|
||||
case "SPAWN_THIEFS_STAGE_2":
|
||||
{
|
||||
final List<L2Npc> thiefs = world.spawnGroup("thiefs");
|
||||
for (L2Npc thief : thiefs)
|
||||
{
|
||||
thief.setIsRunning(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "SKILL_MSG":
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
break;
|
||||
}
|
||||
case "TOYRON_MSG_1":
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOUR_NORMAL_ATTACKS_AREN_T_WORKING);
|
||||
startQuestTimer("TOYRON_MSG_2", 2500, npc, player);
|
||||
break;
|
||||
}
|
||||
case "TOYRON_MSG_2":
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOKS_LIKE_ONLY_SKILL_BASED_ATTACKS_DAMAGE_THEM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (world == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
if ((qs == null) || qs.isCond(2))
|
||||
{
|
||||
htmltext = "33126.html";
|
||||
}
|
||||
else if (qs.isCond(1))
|
||||
{
|
||||
if (npc.getVariables().getBoolean("book", false) && !hasQuestItems(player, THE_WAR_OF_GODS_AND_GIANTS))
|
||||
{
|
||||
qs.setCond(2);
|
||||
giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1);
|
||||
showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
htmltext = "33126-01.html";
|
||||
|
||||
final L2Npc toyron = world.getNpc(TOYRON);
|
||||
startQuestTimer("SPAWN_THIEFS_STAGE_1", 500, null, player);
|
||||
startQuestTimer("TOYRON_FOLLOW", 500, toyron, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "33126-02.html";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||
{
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
if (instance != null)
|
||||
if (skill == null)
|
||||
{
|
||||
final L2Npc toyron = instance.getNpc(TOYRON);
|
||||
if (!toyron.isInCombat())
|
||||
showOnScreenMsg(attacker, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 2500);
|
||||
}
|
||||
return onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
final L2Attackable toyron = (L2Attackable) instance.getNpc(TOYRON);
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME);
|
||||
toyron.reduceCurrentHp(1, npc, null); // TODO: Find better way for attack
|
||||
npc.reduceCurrentHp(1, toyron, null);
|
||||
startQuestTimer("TOYRON_FOLLOW", 3000, toyron, attacker);
|
||||
case "TOYRON_FOLLOW":
|
||||
{
|
||||
toyron.getAI().startFollow(player);
|
||||
toyron.setIsRunning(true);
|
||||
break;
|
||||
}
|
||||
case "SPAWN_THIEFS_STAGE_1":
|
||||
{
|
||||
instance.spawnGroup("thiefs").forEach(thief ->
|
||||
{
|
||||
thief.setIsRunning(true);
|
||||
addAttackPlayerDesire(thief, player);
|
||||
thief.broadcastSay(ChatType.NPC_GENERAL, THIEF_SHOUT[getRandom(2)]);
|
||||
});
|
||||
toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHEN_DID_THEY_GET_IN_HERE);
|
||||
getTimers().addRepeatingTimer("TOYRON_MSG_1", 10000, toyron, player);
|
||||
getTimers().addRepeatingTimer("TOYRON_MSG_2", 12500, toyron, player);
|
||||
break;
|
||||
}
|
||||
case "TOYRON_MSG_1":
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOUR_NORMAL_ATTACKS_AREN_T_WORKING);
|
||||
break;
|
||||
}
|
||||
case "TOYRON_MSG_2":
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOKS_LIKE_ONLY_SKILL_BASED_ATTACKS_DAMAGE_THEM);
|
||||
break;
|
||||
}
|
||||
case "THIEF_DIE":
|
||||
{
|
||||
toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
String htmltext = null;
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
final L2Npc toyron = instance.getNpc(TOYRON);
|
||||
|
||||
final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName());
|
||||
if ((qs == null) || qs.isCond(4) || qs.isCond(5))
|
||||
{
|
||||
htmltext = "33126.html";
|
||||
}
|
||||
else if (qs.isCond(3))
|
||||
{
|
||||
if (npc.getVariables().getBoolean("book", false) && !hasQuestItems(player, THE_WAR_OF_GODS_AND_GIANTS))
|
||||
{
|
||||
qs.setCond(4, true);
|
||||
giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1);
|
||||
showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 4500, true);
|
||||
getTimers().addTimer("SPAWN_THIEFS_STAGE_1", 1000, npc, player);
|
||||
getTimers().addTimer("TOYRON_FOLLOW", 1000, toyron, player);
|
||||
htmltext = "33126-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "33126-02.html";
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_CREATURE_ATTACKED)
|
||||
@RegisterType(ListenerRegisterType.NPC)
|
||||
@Id(THIEF)
|
||||
public void onCreatureAttacked(OnCreatureAttacked event)
|
||||
{
|
||||
final L2Character creature = event.getAttacker();
|
||||
final L2Npc npc = (L2Npc) event.getTarget();
|
||||
final Skill skill = event.getSkill();
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
|
||||
if (isInInstance(instance) && !creature.isPlayer() && npc.isScriptValue(1))
|
||||
{
|
||||
getTimers().addTimer("THIEF_DIE", 500, npc, null);
|
||||
}
|
||||
else if (isInInstance(instance) && creature.isPlayer() && (skill == SPOIL.getSkill()) && npc.isScriptValue(0))
|
||||
{
|
||||
final L2Npc toyron = instance.getNpc(TOYRON);
|
||||
addAttackDesire(toyron, npc);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_CREATURE_DAMAGE_RECEIVED)
|
||||
@RegisterType(ListenerRegisterType.NPC)
|
||||
@Id(THIEF)
|
||||
public DamageReturn onCreatureDamageReceived(OnCreatureDamageReceived event)
|
||||
{
|
||||
final L2Character target = event.getTarget();
|
||||
if (target.isNpc() && event.getAttacker().isPlayer())
|
||||
{
|
||||
final L2PcInstance player = event.getAttacker().getActingPlayer();
|
||||
final Instance instance = player.getInstanceWorld();
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName());
|
||||
if ((qs != null) && qs.isCond(4))
|
||||
{
|
||||
if (event.getSkill() == null)
|
||||
{
|
||||
return new DamageReturn(true, true, true, 0);
|
||||
}
|
||||
|
||||
final L2Npc toyron = instance.getNpc(TOYRON);
|
||||
addAttackDesire(toyron, target);
|
||||
((L2Npc) target).setScriptValue(1);
|
||||
return new DamageReturn(false, true, false, target.getMaxHp() * DAMAGE_BY_SKILL);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_CREATURE_DEATH)
|
||||
@ -229,16 +283,29 @@ public final class MuseumDungeon extends AbstractInstance
|
||||
public void onCreatureKill(OnCreatureDeath event)
|
||||
{
|
||||
final L2Npc npc = (L2Npc) event.getTarget();
|
||||
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
if (world != null)
|
||||
final Instance instance = npc.getInstanceWorld();
|
||||
if (isInInstance(instance))
|
||||
{
|
||||
final L2PcInstance player = world.getFirstPlayer();
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
if ((qs != null) && qs.isCond(2) && world.getAliveNpcs(THIEF).isEmpty())
|
||||
final L2Attackable toyron = (L2Attackable) instance.getNpc(TOYRON);
|
||||
|
||||
final L2PcInstance player = instance.getFirstPlayer();
|
||||
final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName());
|
||||
if ((qs != null) && qs.isCond(4))
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
if (instance.getAliveNpcs(THIEF).isEmpty())
|
||||
{
|
||||
qs.setCond(5, true);
|
||||
showOnScreenMsg(player, NpcStringId.SPEAK_WITH_TOYRON_IN_ORDER_TO_RETURN_SHANNON, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
getTimers().cancelTimer("TOYRON_MSG_1", toyron, player);
|
||||
getTimers().cancelTimer("TOYRON_MSG_2", toyron, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
final int value = qs.getMemoStateEx(Q10542_SearchingForNewPower.KILL_COUNT_VAR) + 1;
|
||||
qs.setMemoStateEx(Q10542_SearchingForNewPower.KILL_COUNT_VAR, value);
|
||||
qs.getQuest().sendNpcLogList(player);
|
||||
getTimers().addTimer("TOYRON_FOLLOW", 1500, toyron, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
package quests.Q10320_LetsGoToTheCentralSquare;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.enums.Movie;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@ -31,7 +30,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
|
||||
|
||||
/**
|
||||
@ -89,11 +87,9 @@ public final class Q10320_LetsGoToTheCentralSquare extends Quest
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
giveAdena(player, 30, true);
|
||||
addExpAndSp(player, 30, 5);
|
||||
addExpAndSp(player, 300, 6);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAIT_WAIT_A_MINUTE_I_STILL_HAVE_TIME);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -16,13 +16,11 @@
|
||||
*/
|
||||
package quests.Q10321_QualificationsOfTheSeeker;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
|
||||
|
||||
import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare;
|
||||
@ -60,7 +58,7 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32975-03.html":
|
||||
case "32975-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
qs.setCond(2); // arrow hack
|
||||
@ -78,10 +76,8 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
giveAdena(player, 50, true);
|
||||
addExpAndSp(player, 40, 5);
|
||||
addExpAndSp(player, 300, 6);
|
||||
qs.exitQuest(false, true);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HM_DON_T_JUST_GO_I_STILL_HAVE_TONS_TO_TEACH_YOU);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
|
@ -1,5 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Gallint is hurt and cannot move, but we must do something about the books before they get stolen.<br>
|
||||
They're looking for <font color="LEVEL">The War of Gods and Giants</font> mostly, but there are a couple of others they'd probably find useful too.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10327_IntruderWhoWantsTheBookOfGiants 32972-02.htm">"The War of Gods and Giants?"</Button>
|
||||
</body></html>
|
@ -1,5 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
We think they were looking for anything related to the Giants,and tried to steal The War of Gods and Giants, an ancient book that was discovered in Ye Sagira.<br>
|
||||
It has many stories about the powers of the Giants, how that power can be learned, and about others species from their time. Now that the island has crashed, perhaps we should think about safeguarding the book...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10327_IntruderWhoWantsTheBookOfGiants 32972-03.html">"I'd like to help."</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Thank you!<br1>
|
||||
When you get to the museum, you should see a number of desks - <font color="LEVEL">one of them</font> has <font color="LEVEL">The War of Giants and Gods</font> on it. Find it, and bring it to me.<br>
|
||||
Would you like to go to the museum?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest MuseumDungeon enter_instance">"Yes."</Button>
|
||||
</body></html>
|
@ -1,5 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
You're still here<br1>
|
||||
Go into the museum!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest MuseumDungeon enter_instance">"On my way!"</Button>
|
||||
</body></html>
|
@ -1,4 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
I just saw suspicious intruders entering the Museum! I fear for the rare valuable articles inside the Museum. Please hurry into the Museum and deal with the intruders!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest MuseumDungeon enter_instance">"Sure. I am going in."</Button>
|
||||
</body></html>
|
@ -1,5 +0,0 @@
|
||||
<html><head><body>Pantheon:<br>
|
||||
You've brought the book? Good! It must have been difficult to find it amongst all those others!<br>
|
||||
I hope you didn't get hurt either - Gallint may be a fool, but plenty have hurt themselves moving books around before him.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10327_IntruderWhoWantsTheBookOfGiants 32972-07.html">"I had to fight someone!"</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
What? The thieves are getting more brash by the day!<br>
|
||||
Hmm... So, I wonder if the books related to Giants... are also related to Embryo. It's just speculation, but something worth considering.<br>
|
||||
Now, I must apologize for placing you in harm's way. Please accept these Earrings - accessories such as these help protect you against magic!<br>
|
||||
Remember: you can wear up to two <font color="LEVEL">earrings</font> at a time. Purchase more from the <font color="LEVEL">General Merchant</font> if you wish.
|
||||
</body></html>
|
@ -1,4 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
I'm still looking into things, friend. I'll let you know when I find anything<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
@ -1,4 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
This mission can't be give to just anyone!<br>
|
||||
(Only characters below 20, who've completed the "Let's Respect Elders" quest, may start this quest.)
|
||||
</body></html>
|
@ -1,131 +0,0 @@
|
||||
/*
|
||||
* 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.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
//import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower;
|
||||
|
||||
/**
|
||||
* Intruder Who Wants the Book of Giants (10327)
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int PANTHEON = 32972;
|
||||
// Items
|
||||
private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575;
|
||||
// Misc
|
||||
private static final int MAX_LEVEL = 20;
|
||||
private static final int APPRENTICE_EARRING = 112;
|
||||
|
||||
public Q10327_IntruderWhoWantsTheBookOfGiants()
|
||||
{
|
||||
super(10327);
|
||||
addStartNpc(PANTHEON);
|
||||
addTalkId(PANTHEON);
|
||||
registerQuestItems(THE_WAR_OF_GODS_AND_GIANTS);
|
||||
addCondMaxLevel(MAX_LEVEL, "32972-09.html");
|
||||
// addCondCompletedQuest(Q10542_SearchingForNewPower.class.getSimpleName(), "32972-09.html");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32972-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32972-03.html":
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32972-07.html":
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
giveAdena(player, 160, true);
|
||||
giveItems(player, APPRENTICE_EARRING, 2);
|
||||
addExpAndSp(player, 7800, 5);
|
||||
qs.exitQuest(false, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = "32972-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
htmltext = "32972-04.html";
|
||||
break;
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "32972-05.html";
|
||||
break;
|
||||
}
|
||||
else if (qs.isCond(3))
|
||||
{
|
||||
htmltext = "32972-06.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = "32972-08.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ import quests.Q10321_QualificationsOfTheSeeker.Q10321_QualificationsOfTheSeeker;
|
||||
/**
|
||||
* Train Like the Real Thing (10541)
|
||||
* @URL https://l2wiki.com/Train_Like_the_Real_Thing
|
||||
* @author GIgi
|
||||
* @author Gigi
|
||||
*/
|
||||
public final class Q10541_TrainLikeTheRealThing extends Quest
|
||||
{
|
||||
@ -164,23 +164,30 @@ public final class Q10541_TrainLikeTheRealThing extends Quest
|
||||
{
|
||||
case SHANNON:
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
switch (qs.getCond())
|
||||
{
|
||||
htmltext = "32974-05.html";
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
startQuestTimer("HTML1", 100, npc, player);
|
||||
}
|
||||
else if (qs.isCond(3))
|
||||
{
|
||||
htmltext = "32974-07.html";
|
||||
}
|
||||
else if (qs.isCond(5))
|
||||
{
|
||||
addExpAndSp(player, 2950, 7);
|
||||
qs.exitQuest(false, true);
|
||||
startQuestTimer("HTML", 200, npc, player);
|
||||
case 1:
|
||||
{
|
||||
htmltext = "32974-05.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
startQuestTimer("HTML1", 100, npc, player);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
htmltext = "32974-07.html";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
addExpAndSp(player, 2550, 7);
|
||||
qs.exitQuest(false, true);
|
||||
startQuestTimer("HTML", 200, npc, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -198,7 +205,6 @@ public final class Q10541_TrainLikeTheRealThing extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><body>Shannon:<br>
|
||||
Are you really thinking of being a seeker? You've got the will, and you seem to have the skills too, but you'll need a bit of polishing. Hmm... I think you'll first need to learn how to use your new powers. What do you think?<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10542_SearchingForNewPower 32974-02.htm">"What is the new power?"</Button>
|
||||
<button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10542_SearchingForNewPower 32974-02.htm">"What is the new power?"</button>
|
||||
</body></html>
|
@ -3,5 +3,5 @@ There are a wide variety of new powers. The Support Magic you just experienced i
|
||||
Of course, if you're going to learn something, experiencing it yourself is always going to be the most effective way.<br>
|
||||
I happen to have been asked by Pantheon to investigate some strange movement in the Museum.<br>
|
||||
I think this'll be a good training opportunity for you. Prepare yourself mentally first, and tell me when you're done getting ready.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10542_SearchingForNewPower 32974-03.htm">"How do I prepare myself?"</Button>
|
||||
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10542_SearchingForNewPower check">"How do I prepare myself?"</button>
|
||||
</body></html>
|
5
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.htm
vendored
Normal file
5
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>Shannon:<br>
|
||||
Ready already? My, my. Aren't you enthusiastic! Now then, before you head to the Museum, I'll give you some important information first.<br>
|
||||
First, take these <font color="LEVEL">Spiritshots</font>. They have no grade, but as you get stronger and get better weapons, you can use Grade D, C, B, and eventually R. This is very important in battle.<br>
|
||||
First, <font color="LEVEL">activate your Spiritshot</font>.
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Shannon:<br>
|
||||
Now that you're done preparing, should we head to the museum?<br>
|
||||
I'd go with you, but you can't always have me picking up after you, right?<br>
|
||||
I've told <font color="LEVEL">Toyron</font> at the Museum that I'm sending a promising rookie his way. Go and find Toyron.<br>
|
||||
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest MuseumDungeon enter_instance">"I understand. Please teleport me over."</Button>
|
||||
</body></html>
|
@ -1,4 +1,6 @@
|
||||
<html><body>Shannon:<br>
|
||||
You've done well. It turns out what you were dealing with wasn't as minor as I thought it was. I have some trust in you know. What did you think? I told Toyron to help you learn to use your skills properly. Did you learn well?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10542_SearchingForNewPower 32974-06.html">"Yes, I did."</Button>
|
||||
Now that you're done preparing, should we head to the museum?<br>
|
||||
I'd go with you, but you can't always have me picking up after you, right?<br>
|
||||
I've told <font color="LEVEL">Toyron</font> at the Museum that I'm sending a promising rookie his way. Go and find Toyron.<br>
|
||||
<button ALIGN=LEFT ICON="Normal" action="bypass -h Quest MuseumDungeon enter_instance">"I understand. Please teleport me over."</button>
|
||||
</body></html>
|
@ -1,3 +1,6 @@
|
||||
<html><body>Shannon:<br>
|
||||
There's my promising rookie! Good job.
|
||||
I'm guessing the situation's more dire than we thought. Suspicious intruder, did you say?<br>
|
||||
But still, we can't give up. Calm yourself down, and this time, make sure you defeat that intruder!<br>
|
||||
I'll send you back into the museum. Don't let your guard down, and make me proud!<br>
|
||||
<button ALIGN=LEFT ICON="Normal" action="bypass -h Quest MuseumDungeon enter_instance">"I understand. Please teleport me over."</button>
|
||||
</body></html>
|
4
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-07.html
vendored
Normal file
4
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-07.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Shannon:<br>
|
||||
You've done well. It turns out what you were dealing with wasn't as minor as I thought it was. I have some trust in you know. What did you think? I told Toyron to help you learn to use your skills properly. Did you learn well?<br>
|
||||
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10542_SearchingForNewPower 32974-08.html">"Yes, I did."</button>
|
||||
</body></html>
|
3
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-08.html
vendored
Normal file
3
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-08.html
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Shannon:<br>
|
||||
There's my promising rookie! Good job.
|
||||
</body></html>
|
6
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-01.html
vendored
Normal file
6
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-01.html
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<html><body>Toyron:<br>
|
||||
Has Shannon sent you? I don't know how much you know, but it would seem someone after the giants' relics has been here.<br>
|
||||
Since nobody has exited since I have entered, the intruder must not have been able to escape. However, before we start the search, since we cannot know how dangerous this intruder is, we must prepare thoroughly.<br>
|
||||
Do you know how to use <font color="LEVEL">skills</font>? Please learn how to employ skills before you proceed, in order to be better prepared against dangers.<br>
|
||||
<button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10542_SearchingForNewPower 33004-02.html">"Alright."</button>
|
||||
</body></html>
|
4
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-02.html
vendored
Normal file
4
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-02.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Toyron:<br>
|
||||
Alright now, let's search for the intruder. It appears it's the Giant's Book he is after. Let us search around the bookshelf.<br>
|
||||
Keep the tension up while searching, as the intruder may suddenly show himself.
|
||||
</body></html>
|
4
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-03.html
vendored
Normal file
4
L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-03.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Toyron:<br>
|
||||
You've retrieved the book, and defeated the intruder as well. He was much stronger than anyone we were expecting, but you've done a great job thwarting him. Now return to Shannon, and tell her that the occurrence at the museum has been neutralized.<br>
|
||||
<button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Toyron museum_teleport">"Alright."</button>
|
||||
</body></html>
|
@ -16,37 +16,47 @@
|
||||
*/
|
||||
package quests.Q10542_SearchingForNewPower;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.NpcLogListHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
|
||||
|
||||
import quests.Q10541_TrainLikeTheRealThing.Q10541_TrainLikeTheRealThing;
|
||||
|
||||
/**
|
||||
* Searching for New Power (10542)
|
||||
* @URL https://l2wiki.com/Searching_for_New_Power
|
||||
* @author GIgi
|
||||
* @author Gigi
|
||||
*/
|
||||
public final class Q10542_SearchingForNewPower extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int SHANNON = 32974;
|
||||
private static final int TOYRON = 33004;
|
||||
private static final int THIEF = 23121;
|
||||
// Items
|
||||
private static final int SOULSHOT = 1835;
|
||||
private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575;
|
||||
private static final int SOULSHOTS = 5789;
|
||||
private static final int SPIRITSHOTS = 5790;
|
||||
// Misc
|
||||
public static final int KILL_COUNT_VAR = 0;
|
||||
private static final int MAX_LEVEL = 20;
|
||||
|
||||
public Q10542_SearchingForNewPower()
|
||||
{
|
||||
super(10542);
|
||||
addStartNpc(SHANNON);
|
||||
addTalkId(SHANNON);
|
||||
addTalkId(SHANNON, TOYRON);
|
||||
registerQuestItems(THE_WAR_OF_GODS_AND_GIANTS);
|
||||
addCondNotRace(Race.ERTHEIA, "noRace.html");
|
||||
addCondMaxLevel(MAX_LEVEL, "noLevel.html");
|
||||
@ -70,22 +80,41 @@ public final class Q10542_SearchingForNewPower extends Quest
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32974-03.htm":
|
||||
case "check":
|
||||
{
|
||||
qs.startQuest();
|
||||
showOnScreenMsg(player, NpcStringId.AUTOMATE_SOULSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 10000);
|
||||
if (!hasQuestItems(player, SOULSHOT))
|
||||
if (player.isInCategory(CategoryType.MAGE_GROUP))
|
||||
{
|
||||
giveItems(player, SOULSHOT, 100);
|
||||
giveItems(player, SPIRITSHOTS, 100);
|
||||
showOnScreenMsg(player, NpcStringId.AUTOMATE_SPIRITSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
htmltext = "32974-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
giveItems(player, SOULSHOTS, 100);
|
||||
showOnScreenMsg(player, NpcStringId.AUTOMATE_SOULSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
htmltext = "32974-03.htm";
|
||||
}
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32974-06.html":
|
||||
case "33004-02.html":
|
||||
{
|
||||
addExpAndSp(player, 3200, 8);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
htmltext = "32974-08.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "32974-08.html":
|
||||
{
|
||||
if (qs.isCond(5))
|
||||
{
|
||||
giveItems(player, (player.isInCategory(CategoryType.MAGE_GROUP) ? SPIRITSHOTS : SOULSHOTS), 100);
|
||||
addExpAndSp(player, 2550, 7);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = "32974-08.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -93,10 +122,10 @@ public final class Q10542_SearchingForNewPower extends Quest
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
@ -110,14 +139,92 @@ public final class Q10542_SearchingForNewPower extends Quest
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if ((qs.getCond() > 0) && (qs.getCond() < 5))
|
||||
if (npc.getId() == SHANNON)
|
||||
{
|
||||
htmltext = "32974-04.html";
|
||||
qs.setCond(2);
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
htmltext = "32974-05.html";
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
htmltext = "32974-06.html";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
htmltext = "32974-07.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (qs.isCond(5))
|
||||
else if (npc.getId() == TOYRON)
|
||||
{
|
||||
htmltext = "32974-05.html";
|
||||
if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "33004-01.html";
|
||||
if (!isSimulated)
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2text\\QT_004_skill_01.htm", TutorialShowHtml.LARGE_WINDOW));
|
||||
htmltext = "33004-01.html";
|
||||
|
||||
NpcStringId npcStringId = null;
|
||||
switch (player.getClassId())
|
||||
{
|
||||
case FIGHTER:
|
||||
case ELVEN_FIGHTER:
|
||||
case DARK_FIGHTER:
|
||||
{
|
||||
npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_MORTAL_BLOW;
|
||||
break;
|
||||
}
|
||||
case MAGE:
|
||||
case ELVEN_MAGE:
|
||||
case DARK_MAGE:
|
||||
{
|
||||
npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_WIND_STRIKE;
|
||||
break;
|
||||
}
|
||||
case ORC_FIGHTER:
|
||||
{
|
||||
npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_IRON_PUNCH;
|
||||
break;
|
||||
}
|
||||
case ORC_MAGE:
|
||||
{
|
||||
npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_CHILL_FLAME;
|
||||
break;
|
||||
}
|
||||
case DWARVEN_FIGHTER:
|
||||
{
|
||||
npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_SPOIL;
|
||||
break;
|
||||
}
|
||||
case MALE_SOLDIER:
|
||||
case FEMALE_SOLDIER:
|
||||
{
|
||||
npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_FALLEN_ATTACK_OR_FALLEN_ARROW;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (npcStringId != null)
|
||||
{
|
||||
showOnScreenMsg(player, npcStringId, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (qs.isCond(5))
|
||||
{
|
||||
htmltext = "33004-03.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -129,4 +236,16 @@ public final class Q10542_SearchingForNewPower extends Quest
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance player)
|
||||
{
|
||||
final Set<NpcLogListHolder> holder = new HashSet<>();
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(4))
|
||||
{
|
||||
holder.add(new NpcLogListHolder(THIEF, false, qs.getMemoStateEx(KILL_COUNT_VAR)));
|
||||
}
|
||||
return holder;
|
||||
}
|
||||
}
|
@ -16,6 +16,8 @@
|
||||
*/
|
||||
package quests.Q10543_SheddingWeight;
|
||||
|
||||
import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -26,8 +28,6 @@ import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
|
||||
|
||||
import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower;
|
||||
|
||||
/**
|
||||
* Shedding Weight (10543)
|
||||
* @URL https://l2wiki.com/Shedding_Weight
|
||||
@ -40,12 +40,7 @@ public final class Q10543_SheddingWeight extends Quest
|
||||
private static final int WILFORD = 30005;
|
||||
// Items
|
||||
// private static final int NOVICE_TRAINING_LOG = 1835; // TODO Find item ID
|
||||
private static final int WOODEN_ARROW = 17;
|
||||
private static final int APPRENTICE_ADVENTURERS_STAFF = 7816;
|
||||
private static final int APPRENTICE_ADVENTURERS_BONE_CLUB = 7817;
|
||||
private static final int APPRENTICE_ADVENTURERS_KNIFE = 7818;
|
||||
private static final int APPRENTICE_ADVENTURERS_CESTUS = 7819;
|
||||
private static final int APPRENTICE_ADVENTURERS_BOW = 7820;
|
||||
private static final int APPRENTICE_ADVENTURERS_LONG_SWORD = 7821;
|
||||
// Misc
|
||||
private static final int MAX_LEVEL = 20;
|
||||
@ -88,12 +83,7 @@ public final class Q10543_SheddingWeight extends Quest
|
||||
}
|
||||
case "30005-03.html":
|
||||
{
|
||||
giveItems(player, WOODEN_ARROW, 500);
|
||||
giveItems(player, APPRENTICE_ADVENTURERS_STAFF, 1);
|
||||
giveItems(player, APPRENTICE_ADVENTURERS_BONE_CLUB, 1);
|
||||
giveItems(player, APPRENTICE_ADVENTURERS_KNIFE, 1);
|
||||
giveItems(player, APPRENTICE_ADVENTURERS_CESTUS, 1);
|
||||
giveItems(player, APPRENTICE_ADVENTURERS_BOW, 1);
|
||||
giveItems(player, APPRENTICE_ADVENTURERS_LONG_SWORD, 1);
|
||||
player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_007_post_01.htm", TutorialShowHtml.LARGE_WINDOW));
|
||||
showOnScreenMsg(player, NpcStringId.WEAPONS_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 10000);
|
||||
|
@ -226,7 +226,6 @@ import quests.Q10317_OrbisWitch.Q10317_OrbisWitch;
|
||||
import quests.Q10318_DecayingDarkness.Q10318_DecayingDarkness;
|
||||
import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare;
|
||||
import quests.Q10321_QualificationsOfTheSeeker.Q10321_QualificationsOfTheSeeker;
|
||||
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
|
||||
import quests.Q10330_ToTheRuinsOfYeSagira.Q10330_ToTheRuinsOfYeSagira;
|
||||
import quests.Q10331_StartOfFate.Q10331_StartOfFate;
|
||||
import quests.Q10332_ToughRoad.Q10332_ToughRoad;
|
||||
@ -646,7 +645,6 @@ public class QuestMasterHandler
|
||||
Q10318_DecayingDarkness.class,
|
||||
Q10320_LetsGoToTheCentralSquare.class,
|
||||
Q10321_QualificationsOfTheSeeker.class,
|
||||
Q10327_IntruderWhoWantsTheBookOfGiants.class,
|
||||
Q10330_ToTheRuinsOfYeSagira.class,
|
||||
Q10331_StartOfFate.class,
|
||||
Q10332_ToughRoad.class,
|
||||
|
@ -57,6 +57,7 @@
|
||||
<npc id="32975" x="-114355" y="255041" z="-1528" heading="16384" respawnTime="60sec" /> <!-- Theodore -->
|
||||
<npc id="32980" x="-116697" y="255513" z="-1424" respawnTime="60sec" /> <!-- Gallint -->
|
||||
<npc id="32981" x="-110704" y="253662" z="-1792" heading="19286" respawnTime="60sec" /> <!-- Adventurers' Guide -->
|
||||
<npc id="32981" x="-111465" y="255932" z="-1443" heading="51027" respawnTime="60sec" /> <!-- Adventurers' Guide -->
|
||||
<npc id="33000" x="-111408" y="253264" z="-1768" heading="6892" respawnTime="60sec" /> <!-- -->
|
||||
<npc id="33000" x="-111280" y="253072" z="-1784" heading="56600" respawnTime="60sec" /> <!-- -->
|
||||
<npc id="33000" x="-110768" y="252912" z="-1760" heading="8672" respawnTime="60sec" /> <!-- -->
|
||||
|
@ -963,7 +963,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Notify to scripts
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class);
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target, null), target, TerminateReturn.class);
|
||||
if ((attackedReturn != null) && attackedReturn.terminate())
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.events.impl.character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* An instantly executed event when L2Character is attacked by L2Character.
|
||||
@ -28,11 +29,13 @@ public class OnCreatureAttacked implements IBaseEvent
|
||||
{
|
||||
private final L2Character _attacker;
|
||||
private final L2Character _target;
|
||||
private final Skill _skill;
|
||||
|
||||
public OnCreatureAttacked(L2Character attacker, L2Character target)
|
||||
public OnCreatureAttacked(L2Character attacker, L2Character target, Skill skill)
|
||||
{
|
||||
_attacker = attacker;
|
||||
_target = target;
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
public final L2Character getAttacker()
|
||||
@ -45,6 +48,11 @@ public class OnCreatureAttacked implements IBaseEvent
|
||||
return _target;
|
||||
}
|
||||
|
||||
public final Skill getSkill()
|
||||
{
|
||||
return _skill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventType getType()
|
||||
{
|
||||
|
@ -13671,6 +13671,24 @@ public final class NpcStringId
|
||||
@ClientString(id = 554107, message = "Defeating the Scarecrow")
|
||||
public static NpcStringId DEFEATING_THE_SCARECROW;
|
||||
|
||||
@ClientString(id = 554210, message = "Preapare to use the skill 'Power Strike' or 'Mortal Blow'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_MORTAL_BLOW;
|
||||
|
||||
@ClientString(id = 554211, message = "Preapare to use the skill 'Wind Strike'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_WIND_STRIKE;
|
||||
|
||||
@ClientString(id = 554212, message = "Prepare to use the skill ‘Power Strike' or ‘Iron Punch")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_IRON_PUNCH;
|
||||
|
||||
@ClientString(id = 554213, message = "Prepare to use the skill ‘Chill Flame'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_CHILL_FLAME;
|
||||
|
||||
@ClientString(id = 554214, message = "Prepare to use the skill ‘Spoil'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_SPOIL;
|
||||
|
||||
@ClientString(id = 554215, message = "Prepare to use the skill ‘Fallen Attack' or ‘Fallen Arrow'")
|
||||
public static NpcStringId PREPARE_TO_USE_THE_SKILL_FALLEN_ATTACK_OR_FALLEN_ARROW;
|
||||
|
||||
@ClientString(id = 570101, message = "The Road to Destruction (Above Lv. 93)")
|
||||
public static NpcStringId THE_ROAD_TO_DESTRUCTION_ABOVE_LV_93;
|
||||
|
||||
@ -31901,9 +31919,13 @@ public final class NpcStringId
|
||||
|
||||
@ClientString(id = 1803275, message = "If the story is still in progress, I can tell it again.")
|
||||
public static NpcStringId IF_THE_STORY_IS_STILL_IN_PROGRESS_I_CAN_TELL_IT_AGAIN;
|
||||
|
||||
@ClientString(id = 1803329, message = "Speak with the ‘Adventurers' Guide for Training'.")
|
||||
public static NpcStringId SPEAK_WITH_THE_ADVENTURERS_GUIDE_FOR_TRAINING;
|
||||
|
||||
@ClientString(id = 1803330, message = "Speak with Toyron in order to return to Shannon.")
|
||||
public static NpcStringId SPEAK_WITH_TOYRON_IN_ORDER_TO_RETURN_SHANNON;
|
||||
|
||||
@ClientString(id = 1810363, message = "You are too far from the corpse.")
|
||||
public static NpcStringId YOU_ARE_TOO_FAR_FROM_THE_CORPSE;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public final class LargeCocoon extends AbstractNpcAI
|
||||
{
|
||||
case "attack":
|
||||
{
|
||||
onCreatureAttacked(new OnCreatureAttacked(player, npc));
|
||||
onCreatureAttacked(new OnCreatureAttacked(player, npc, null));
|
||||
break;
|
||||
}
|
||||
case "attackPowerful":
|
||||
|
@ -963,7 +963,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Notify to scripts
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class);
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target, null), target, TerminateReturn.class);
|
||||
if ((attackedReturn != null) && attackedReturn.terminate())
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.events.impl.character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* An instantly executed event when L2Character is attacked by L2Character.
|
||||
@ -28,11 +29,13 @@ public class OnCreatureAttacked implements IBaseEvent
|
||||
{
|
||||
private final L2Character _attacker;
|
||||
private final L2Character _target;
|
||||
private final Skill _skill;
|
||||
|
||||
public OnCreatureAttacked(L2Character attacker, L2Character target)
|
||||
public OnCreatureAttacked(L2Character attacker, L2Character target, Skill skill)
|
||||
{
|
||||
_attacker = attacker;
|
||||
_target = target;
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
public final L2Character getAttacker()
|
||||
@ -45,6 +48,11 @@ public class OnCreatureAttacked implements IBaseEvent
|
||||
return _target;
|
||||
}
|
||||
|
||||
public final Skill getSkill()
|
||||
{
|
||||
return _skill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventType getType()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user