Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
A skill worked, but then it's taking the character who is GM.
However, when I create a new character to test, the buff does not appear.
Посмотреть вложение 74893
When I put it in the Package Custon doesn't recognize it.
\main_v01\dist\game\data\scripts\custom
I've recently been working with lineage 2 essence and the first function they gave me was to add this, it's very similar to a toggle buff, but as soon as you create the character it already appears as if it were from the buff bar, no need to click in nothing. Reasoning, I came to the conclusion that it needs to be implemented within some initial file, but I still haven't managed to get to the path.Este é o
brilhoПосмотреть вложение 74866
Qual a forma ou exemplo de conseguir o add, alguém pode me ajudar por favor?
SkillData.getInstance().getSkill(skillid, skilllevel).applyEffect(event.getPlayer(), event.getPlayer());
Make it as A2 skill which cannot be deleted and will stay after death. Make abnormal time -1
Make a simple scripts with registering event "OnPlayerLogin" - and make something asSkillData.getInstance().getSkill(skillid, skilllevel).applyEffect(event.getPlayer(), event.getPlayer());
You need create separate script with usage that event listenerIs the place where I placed the print correct?
In which line do I add this code?Or you can put it on EnterWorld.java like this
SkillData.getInstance().getSkill(<SkillId>, <SkillLevel>).applyEffects(activeChar, activeChar);
replace <SkillId> and <SkillLevel> with the buff you want to give to the player that enters the game
Text me i can help youIn which line do I add this code?
I tried as MrKirill1232 explained but I was not successful either...
I'm new to Java.
You can add it after the send packet of welcome to lineage messageIn which line do I add this code?
I tried as MrKirill1232 explained but I was not successful either...
I'm new to Java.
package custom;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.events.Containers;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
import org.l2jmobius.gameserver.model.events.listeners.AbstractEventListener;
import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener;
import org.l2jmobius.gameserver.model.quest.Quest;
public class GraceSustention extends Quest
{
private AbstractEventListener _onPlayerLogin;
public GraceSustention()
{
super(-1);
}
private void onPlayerLogin(OnPlayerLogin event)
{
SkillData.getInstance().getSkill(skillid, skilllevel).applyEffect(event.getPlayer(), event.getPlayer());
}
@Override
protected void onLoad()
{
super.onLoad();
_onPlayerLogin = Containers.Players().addListener(new ConsumerEventListener(Containers.Players(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this));
}
@Override
public void onSave()
{
super.onSave();
if (_onPlayerLogin != null)
{
_onPlayerLogin.unregisterMe();
_onPlayerLogin = null;
}
}
public static void main(String[] args)
{
new GraceSustention();
}
}
Java:package custom; import org.l2jmobius.gameserver.data.xml.SkillData; import org.l2jmobius.gameserver.model.events.Containers; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin; import org.l2jmobius.gameserver.model.events.listeners.AbstractEventListener; import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; import org.l2jmobius.gameserver.model.quest.Quest; public class GraceSustention extends Quest { private AbstractEventListener _onPlayerLogin; public GraceSustention() { super(-1); } private void onPlayerLogin(OnPlayerLogin event) { SkillData.getInstance().getSkill(skillid, skilllevel).applyEffect(event.getPlayer(), event.getPlayer()); } @Override protected void onLoad() { super.onLoad(); _onPlayerLogin = Containers.Players().addListener(new ConsumerEventListener(Containers.Players(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } @Override public void onSave() { super.onSave(); if (_onPlayerLogin != null) { _onPlayerLogin.unregisterMe(); _onPlayerLogin = null; } } public static void main(String[] args) { new GraceSustention(); } }
A skill worked, but then it's taking the character who is GM.
However, when I create a new character to test, the buff does not appear.
Посмотреть вложение 74893
When I put it in the Package Custon doesn't recognize it.
\main_v01\dist\game\data\scripts\custom
Thank you very much my king.... I managed to solve it!!\main_v01\dist\game\data\scripts\custom