Reworked some scripts.

Contributed by Stayway, gigilo1968.
This commit is contained in:
MobiusDev
2017-05-28 18:37:26 +00:00
parent 9cb39dc889
commit 29042a9311
45 changed files with 487 additions and 390 deletions

View File

@ -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);

View File

@ -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()
{

View File

@ -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;