|
@@ -135,7 +135,8 @@ public class Quest extends ManagedScript
|
|
ON_SPAWN(true), // onSpawn action triggered when an NPC is spawned or respawned.
|
|
ON_SPAWN(true), // onSpawn action triggered when an NPC is spawned or respawned.
|
|
ON_SKILL_SEE(true), // NPC or Mob saw a person casting a skill (regardless what the target is).
|
|
ON_SKILL_SEE(true), // NPC or Mob saw a person casting a skill (regardless what the target is).
|
|
ON_FACTION_CALL(true), // NPC or Mob saw a person casting a skill (regardless what the target is).
|
|
ON_FACTION_CALL(true), // NPC or Mob saw a person casting a skill (regardless what the target is).
|
|
- ON_AGGRO_RANGE_ENTER(true); // a person came within the Npc/Mob's range
|
|
|
|
|
|
+ ON_AGGRO_RANGE_ENTER(true), // a person came within the Npc/Mob's range
|
|
|
|
+ ON_SPELL_FINISHED(true); // on spell finished action when npc finish casting skill
|
|
|
|
|
|
// control whether this event type is allowed for the same npc template in multiple quests
|
|
// control whether this event type is allowed for the same npc template in multiple quests
|
|
// or if the npc must be registered in at most one quest for the specified event
|
|
// or if the npc must be registered in at most one quest for the specified event
|
|
@@ -361,6 +362,20 @@ public class Quest extends ManagedScript
|
|
return showResult(qs.getPlayer(), res);
|
|
return showResult(qs.getPlayer(), res);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public final boolean notifySpellFinished(L2NpcInstance instance, L2PcInstance player, L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ String res = null;
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ res = onSpellFinished(instance, player, skill);
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ return showError(player, e);
|
|
|
|
+ }
|
|
|
|
+ return showResult(player, res);
|
|
|
|
+
|
|
|
|
+ }
|
|
public final boolean notifySpawn(L2NpcInstance npc)
|
|
public final boolean notifySpawn(L2NpcInstance npc)
|
|
{
|
|
{
|
|
try
|
|
try
|
|
@@ -557,6 +572,11 @@ public class Quest extends ManagedScript
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public String onSpellFinished(L2NpcInstance npc, L2PcInstance player, L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
public String onSpawn(L2NpcInstance npc)
|
|
public String onSpawn(L2NpcInstance npc)
|
|
{
|
|
{
|
|
return null;
|
|
return null;
|
|
@@ -1153,7 +1173,11 @@ public class Quest extends ManagedScript
|
|
{
|
|
{
|
|
return addEventId(npcId, Quest.QuestEventType.ON_SKILL_SEE);
|
|
return addEventId(npcId, Quest.QuestEventType.ON_SKILL_SEE);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ public L2NpcTemplate addSpellFinishedId(int npcId)
|
|
|
|
+ {
|
|
|
|
+ return addEventId(npcId, Quest.QuestEventType.ON_SPELL_FINISHED);
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* Add this quest to the list of quests that the passed npc will respond to for Faction Call Events.<BR><BR>
|
|
* Add this quest to the list of quests that the passed npc will respond to for Faction Call Events.<BR><BR>
|
|
* @param talkId : ID of the NPC
|
|
* @param talkId : ID of the NPC
|