L2JMobius
Public Development => Shares/Contributions => Topic started by: BazookaRpm on July 06, 2025, 09:50:48 AM
-
Hello, good afternoon. Testing the "Requiem ID: 1049" skill doesn't work, since it sends to an empty handler called Passive.
To repair the Skill so that it can function properly, we will make the following changes.
skill path.game\data\stats\skills/01000-01099
Skill ID : 1049
<skill id="1049" levels="14" name="Requiem">
<!-- A requiem for the dead that temporarily disables aggressive behavior of nearby undead monsters. -->
<table name="#magicLevel">40 44 48 52 56 58 60 62 64 66 68 70 72 74</table>
<table name="#mpConsume">42 47 52 56 61 64 66 69 71 74 76 78 80 82</table>
<table name="#mpInitialConsume">11 12 13 14 16 16 17 18 18 19 19 20 20 21</table>
<set name="abnormalLevel" val="1" />
<set name="abnormalTime" val="120" />
<set name="abnormalType" val="TURN_PASSIVE" />
<set name="activateRate" val="35" />
<set name="affectLimit" val="10-10" />
<set name="affectRange" val="1000" />
<set name="basicProperty" val="MEN" />
<set name="hitTime" val="7000" />
<set name="icon" val="icon.skill1049" />
<set name="isDebuff" val="true" />
<set name="isMagic" val="1" /> <!-- Magic Skill -->
<set name="lvlBonusRate" val="1" />
<set name="magicLevel" val="#magicLevel" />
<set name="mpConsume" val="#mpConsume" />
<set name="mpInitialConsume" val="#mpInitialConsume" />
<set name="operateType" val="A2" />
<set name="reuseDelay" val="20000" />
<set name="targetType" val="AREA" />
<set name="trait" val="DERANGEMENT" />
<cond msgId="144">
<target race="UNDEAD" />
</cond>
<for>
<effect name="Requiem" /> <!-- "Requiem" effect is avariable -->
</for>
</skill>
Now we proceed to create our handler for our skill.
We create a new Java file named "Requiem"
Route script handler : game\data\scripts\handlers\effecthandlers/Requiem
This will be our handler that will be useful for our ability
/**
* Requiem effect implementation from Journey Proyect
* @author KingHanker, Zoinha
package handlers.effecthandlers;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.conditions.Condition;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
// bazookaRpm
public class Requiem extends AbstractEffect
{
public Requiem(Condition attachCond, Condition applyCond, StatSet set, StatSet params)
{
super(attachCond, applyCond, set, params);
}
[member=79]override[/member]
public boolean canStart(Creature effector, Creature effected, Skill skill)
{
return effected.isAttackable() && effected.isUndead() && !effected.isRaid();
}
[member=79]override[/member]
public void onStart(Creature effector, Creature effected, Skill skill)
{
final Npc npc = effected.asNpc();
if ((npc == null) || !npc.isAttackable())
{
return;
}
if (npc instanceof Attackable)
{
final Attackable mob = (Attackable) npc;
mob.clearAggroList();
}
npc.abortAttack();
npc.abortCast();
npc.stopMove(null);
npc.disableAllSkills();
npc.setImmobilized(true);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effected.startAbnormalVisualEffect(true, AbnormalVisualEffect.MP_NONE);
}
[member=79]override[/member]
public void onExit(Creature effector, Creature effected, Skill skill)
{
final Npc npc = effected.asNpc();
if ((npc == null) || !npc.isAttackable())
{
return;
}
npc.enableAllSkills();
npc.setImmobilized(false);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
effected.stopAbnormalVisualEffect(true, AbnormalVisualEffect.NONE);
}
}
Now we must register our handler in "EffectMasterHandler"
Requiem.class,
If there are any errors or problems, please feel free to comment. Depending on your version, there may be some changes.
-
<set name="abnormalVisualEffect" val="MP_SHIELD" />
-
I forgot to skip that part since the interlude client has no effect for visual for requiem through MP_SHIELD, it is changed to "NONE"
<set name="abnormalVisualEffect" val="NONE" />