Jump to content

barao45

Members
  • Posts

    231
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by barao45

  1. Thanks Panic. I think I won't be able to make that code modification, I don't know where to start. In sunrise they have the dropchange and the dropAmount only. I'm thinking of starting to modify the mobs one by one through their xml.
  2. Hello!. I wanted to ask you for help. I have a somewhat complex problem I think, I am using L2Jsunrise H5 and I have noticed that some raids for example Ketra's Commander Tayr. First it wasn't spawned. When I spawn him and then kill him, the respawn is very short, I calculate that he respawns in 1 minute after killing him, the settings in the DB seem to be fine.
  3. @Tryskell i have tested intentions again, i found that when the player is not hiting a target and you use a skill then start attacking, but when the player already is hitting a npc and use a skills stops hitting. I have found the same thing when an npc throws you to sleep skill you must to retarget another npc to move or hit. I copy the code of my class that I have from sunrise. Do you do developments if I can pay you? or do you know someone? /* * Copyright (C) 2004-2015 L2J Server * * This file is part of L2J Server. * * L2J Server 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. * * L2J Server 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 l2r.gameserver.ai; import static l2r.gameserver.enums.CtrlIntention.AI_INTENTION_ATTACK; import static l2r.gameserver.enums.CtrlIntention.AI_INTENTION_FOLLOW; import static l2r.gameserver.enums.CtrlIntention.AI_INTENTION_IDLE; import java.util.concurrent.Future; import l2r.gameserver.ThreadPoolManager; import l2r.gameserver.enums.CtrlEvent; import l2r.gameserver.enums.CtrlIntention; import l2r.gameserver.model.L2Object; import l2r.gameserver.model.Location; import l2r.gameserver.model.actor.L2Character; import l2r.gameserver.model.actor.L2Summon; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.model.skills.L2Skill; import l2r.gameserver.network.serverpackets.ActionFailed; import l2r.gameserver.network.serverpackets.AutoAttackStart; import l2r.gameserver.network.serverpackets.AutoAttackStop; import l2r.gameserver.network.serverpackets.Die; import l2r.gameserver.taskmanager.AttackStanceTaskManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Mother class of all objects AI in the world.<br> * AbastractAI :<br> * <li>L2CharacterAI</li> */ public abstract class AbstractAI implements Ctrl { protected final Logger _log = LoggerFactory.getLogger(getClass().getName()); private NextAction _nextAction; /** * @return the _nextAction */ public NextAction getNextAction() { return _nextAction; } /** * @param nextAction the next action to set. */ public void setNextAction(NextAction nextAction) { _nextAction = nextAction; } private class FollowTask implements Runnable { protected int _range = 45; protected boolean _isFollow = false; public FollowTask() { _isFollow = true; } public FollowTask(int range) { _range = range; _isFollow = false; } @Override public void run() { try { if (_followTask == null) { return; } final L2Character followTarget = _followTarget; // copy to prevent NPE if (followTarget == null) { if (_actor instanceof L2Summon) { ((L2Summon) _actor).setFollowStatus(false); } setIntention(AI_INTENTION_IDLE); return; } if (!_actor.isInsideRadius(followTarget, _isFollow ? _range * 2 : _range, true, false)) { if (!_actor.isInsideRadius(followTarget, 3000, true, false)) { // if the target is too far (maybe also teleported) if (_actor instanceof L2Summon) { ((L2Summon) _actor).setFollowStatus(false); } setIntention(AI_INTENTION_IDLE); return; } moveToPawn(followTarget, Math.max(_range, 10)); } } catch (Exception e) { _log.warn(getClass().getSimpleName() + ": Error: " + e.getMessage()); } } } protected void moveToPawn(L2Object followTarget, int _range) { moveToPawn(followTarget, _range, true); } protected void moveToPawn(L2Object followTarget, int _range, boolean usePath) { moveTo(followTarget.getLocation(), _range); } /** The character that this AI manages */ protected final L2Character _actor; protected int _maxFailedPath = 20; public int _onFailedPath = 0; /** Current long-term intention */ protected CtrlIntention _intention = AI_INTENTION_IDLE; /** Current long-term intention parameter */ protected Object _intentionArg0 = null; /** Current long-term intention parameter */ protected Object _intentionArg1 = null; /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientAutoAttacking; /** Different targets this AI maintains */ private L2Object _target; protected L2Character _interactionTarget; protected L2Character _followTarget; /** The skill we are currently casting by INTENTION_CAST */ L2Skill _skill; protected Future<?> _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; /** * Constructor of AbstractAI. * @param creature the creature */ protected AbstractAI(L2Character creature) { _actor = creature; } /** * @return the L2Character managed by this Accessor AI. */ @Override public L2Character getActor() { return _actor; } /** * @return the current Intention. */ @Override public CtrlIntention getIntention() { return _intention; } protected void setInteractionTarget(L2Character target) { _interactionTarget = target; } /** * @return current attack target. */ @Override public L2Character getInteractionTarget() { return _interactionTarget; } /** * Set the Intention of this AbstractAI.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is USED by AI classes</B></FONT><B><U><br> * Overridden in </U> : </B><BR> * <B>L2AttackableAI</B> : Create an AI Task executed every 1s (if necessary)<BR> * <B>L2PlayerAI</B> : Stores the current AI intention parameters to later restore it if necessary. * @param intention The new Intention to set to the AI * @param arg0 The first parameter of the Intention * @param arg1 The second parameter of the Intention */ synchronized void changeIntention(CtrlIntention intention, Object arg0, Object arg1) { _intention = intention; _intentionArg0 = arg0; _intentionArg1 = arg1; } /** * Launch the L2CharacterAI onIntention method corresponding to the new Intention.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Stop the FOLLOW mode if necessary</B></FONT> * @param intention The new Intention to set to the AI */ @Override public final void setIntention(CtrlIntention intention) { setIntention(intention, null, null); } /** * Launch the L2CharacterAI onIntention method corresponding to the new Intention.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Stop the FOLLOW mode if necessary</B></FONT> * @param intention The new Intention to set to the AI * @param arg0 The first parameter of the Intention (optional target) */ @Override public final void setIntention(CtrlIntention intention, Object arg0) { setIntention(intention, arg0, null); } @Override public final void setIntention(CtrlIntention intention, Object arg0, Object arg1) { // Stop the follow mode if necessary if ((intention != AI_INTENTION_FOLLOW) && (intention != AI_INTENTION_ATTACK)) { stopFollow(); } // Launch the onIntention method of the L2CharacterAI corresponding to the new Intention switch (intention) { case AI_INTENTION_IDLE: onIntentionIdle(); break; case AI_INTENTION_ACTIVE: onIntentionActive(); break; case AI_INTENTION_REST: onIntentionRest(); break; case AI_INTENTION_ATTACK: onIntentionAttack((L2Character) arg0); break; case AI_INTENTION_CAST: onIntentionCast((L2Skill) arg0, (L2Object) arg1); break; case AI_INTENTION_MOVE_TO: onIntentionMoveTo((Location) arg0); break; case AI_INTENTION_FOLLOW: onIntentionFollow((L2Character) arg0); break; case AI_INTENTION_PICK_UP: onIntentionPickUp((L2Object) arg0); break; case AI_INTENTION_INTERACT: onIntentionInteract((L2Object) arg0); break; } // If do move or follow intention drop next action. if ((_nextAction != null) && _nextAction.getIntentions().contains(intention)) { _nextAction = null; } } /** * Launch the L2CharacterAI onEvt method corresponding to the Event.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned period)</B></FONT> * @param evt The event whose the AI must be notified */ @Override public final void notifyEvent(CtrlEvent evt) { notifyEvent(evt, null, null); } /** * Launch the L2CharacterAI onEvt method corresponding to the Event. <FONT COLOR=#FF0000><B> <U>Caution</U> : The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned period)</B></FONT> * @param evt The event whose the AI must be notified * @param arg0 The first parameter of the Event (optional target) */ @Override public final void notifyEvent(CtrlEvent evt, Object arg0) { notifyEvent(evt, arg0, null); } /** * Launch the L2CharacterAI onEvt method corresponding to the Event. <FONT COLOR=#FF0000><B> <U>Caution</U> : The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned period)</B></FONT> * @param evt The event whose the AI must be notified */ @Override public final void notifyEvent(CtrlEvent evt, Object... args) { if ((!_actor.isVisible() && !_actor.isTeleporting()) || !_actor.hasAI()) { return; } switch (evt) { case EVT_THINK: onEvtThink(); break; case EVT_ATTACKED: onEvtAttacked((L2Character) args[0]); break; case EVT_AGGRESSION: onEvtAggression((L2Character) args[0], ((Number) args[1]).intValue()); break; case EVT_STUNNED: onEvtStunned((L2Character) args[0]); break; case EVT_PARALYZED: onEvtParalyzed((L2Character) args[0]); break; case EVT_SLEEPING: onEvtSleeping((L2Character) args[0]); break; case EVT_ROOTED: onEvtRooted((L2Character) args[0]); break; case EVT_CONFUSED: onEvtConfused((L2Character) args[0]); break; case EVT_MUTED: onEvtMuted((L2Character) args[0]); break; case EVT_EVADED: onEvtEvaded((L2Character) args[0]); break; case EVT_READY_TO_ACT: // vGodFather check this // After change this line we fixed a nasty bug with potions sometimes stops auto attack // if (!_actor.isCastingNow() && !_actor.isCastingSimultaneouslyNow()) if (!_actor.isCastingNow() && (getIntention() != CtrlIntention.AI_INTENTION_CAST)) { onEvtReadyToAct(); } break; case EVT_USER_CMD: onEvtUserCmd(args[0], args[1]); break; case EVT_ARRIVED: // happens e.g. from stopmove but we don't process it if we're casting if (!_actor.isCastingNow() && !_actor.isCastingSimultaneouslyNow()) { onEvtArrived(); } break; case EVT_ARRIVED_REVALIDATE: // this is disregarded if the char is not moving any more if (_actor.isMoving()) { onEvtArrivedRevalidate(); } break; case EVT_ARRIVED_BLOCKED: onEvtArrivedBlocked((Location) args[0]); break; case EVT_FORGET_OBJECT: onEvtForgetObject((L2Object) args[0]); break; case EVT_CANCEL: onEvtCancel(); break; case EVT_DEAD: onEvtDead(); break; case EVT_FAKE_DEATH: onEvtFakeDeath(); break; case EVT_FINISH_CASTING: onEvtFinishCasting(); break; case EVT_AFRAID: { try { onEvtAfraid((L2Character) args[0], (Boolean) args[1]); } catch (Exception e) { // vGodFather: TODO remove try catch when implement completely } break; } } // Do next action. if ((_nextAction != null) && _nextAction.getEvents().contains(evt)) { _nextAction.doAction(); } } protected abstract void onIntentionIdle(); protected abstract void onIntentionActive(); protected abstract void onIntentionRest(); protected abstract void onIntentionAttack(L2Character target); protected abstract void onIntentionCast(L2Skill skill, L2Object target); protected abstract void onIntentionMoveTo(Location destination); protected abstract void onIntentionFollow(L2Character target); protected abstract void onIntentionPickUp(L2Object item); protected abstract void onIntentionInteract(L2Object object); protected abstract void onEvtThink(); protected abstract void onEvtAttacked(L2Character attacker); protected abstract void onEvtAggression(L2Character target, long aggro); protected abstract void onEvtStunned(L2Character attacker); protected abstract void onEvtParalyzed(L2Character attacker); protected abstract void onEvtSleeping(L2Character attacker); protected abstract void onEvtRooted(L2Character attacker); protected abstract void onEvtConfused(L2Character attacker); protected abstract void onEvtMuted(L2Character attacker); protected abstract void onEvtEvaded(L2Character attacker); protected abstract void onEvtReadyToAct(); protected abstract void onEvtUserCmd(Object arg0, Object arg1); protected abstract void onEvtArrived(); protected abstract void onEvtArrivedRevalidate(); protected abstract void onEvtArrivedBlocked(Location blocked_at_pos); protected abstract void onEvtForgetObject(L2Object object); protected abstract void onEvtCancel(); protected abstract void onEvtDead(); protected abstract void onEvtFakeDeath(); protected abstract void onEvtFinishCasting(); protected abstract void onEvtAfraid(L2Character effector, boolean start); /** * Cancel action client side by sending Server->Client packet ActionFailed to the L2PcInstance actor. <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT> */ protected void clientActionFailed() { if (_actor instanceof L2PcInstance) { _actor.sendPacket(ActionFailed.STATIC_PACKET); } } protected void moveTo(Location loc, int offset) { moveTo(loc.getX(), loc.getY(), loc.getZ(), offset); } protected void moveTo(Location loc) { moveTo(loc.getX(), loc.getY(), loc.getZ(), 0); } protected void moveTo(int x, int y, int z) { moveTo(x, y, z, 0); } /** * Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation <I>(broadcast)</I>.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT> * @param x * @param y * @param z * @param offset */ protected void moveTo(int x, int y, int z, int offset) { _actor.moveToLocation(x, y, z, offset); } public void clientStopMoving(boolean validate) { _actor.stopMove(validate); } public void clientStopMoving() { _actor.stopMove(); } public boolean isAutoAttacking() { return _clientAutoAttacking; } public void setAutoAttacking(boolean isAutoAttacking) { if (_actor instanceof L2Summon) { L2Summon summon = (L2Summon) _actor; if (summon.getOwner() != null) { summon.getOwner().getAI().setAutoAttacking(isAutoAttacking); } return; } _clientAutoAttacking = isAutoAttacking; } /** * Start the actor Auto Attack client side by sending Server->Client packet AutoAttackStart <I>(broadcast)</I>.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT> */ public void clientStartAutoAttack() { if (_actor instanceof L2Summon) { L2Summon summon = (L2Summon) _actor; if (summon.getOwner() != null) { summon.getOwner().getAI().clientStartAutoAttack(); } return; } if (!isAutoAttacking()) { if (_actor.isPlayer() && _actor.hasSummon()) { _actor.getSummon().broadcastPacket(new AutoAttackStart(_actor.getSummon().getObjectId())); } // Send a Server->Client packet AutoAttackStart to the actor and all L2PcInstance in its _knownPlayers _actor.broadcastPacket(new AutoAttackStart(_actor.getObjectId())); setAutoAttacking(true); } AttackStanceTaskManager.getInstance().addAttackStanceTask(_actor); } /** * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop <I>(broadcast)</I>.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT> */ public void clientStopAutoAttack() { if (_actor instanceof L2Summon) { L2Summon summon = (L2Summon) _actor; if (summon.getOwner() != null) { summon.getOwner().getAI().clientStopAutoAttack(); } return; } if (_actor instanceof L2PcInstance) { if (!AttackStanceTaskManager.getInstance().hasAttackStanceTask(_actor) && isAutoAttacking()) { AttackStanceTaskManager.getInstance().addAttackStanceTask(_actor); } } else if (isAutoAttacking()) { _actor.broadcastPacket(new AutoAttackStop(_actor.getObjectId())); setAutoAttacking(false); } } /** * Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die <I>(broadcast)</I>.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT> */ protected void clientNotifyDead() { // Send a Server->Client packet Die to the actor and all L2PcInstance in its _knownPlayers Die msg = new Die(_actor); _actor.broadcastPacket(msg); // Init AI _intention = AI_INTENTION_IDLE; _target = null; _interactionTarget = null; _interactionTarget = null; // Cancel the follow task if necessary stopFollow(); } /** * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the L2PcInstance player.<br> * <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT> * @param player The L2PcIstance to notify with state of this L2Character */ public void describeStateToPlayer(L2PcInstance player) { if (getActor().isVisibleFor(player)) { // Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers player.movePacket(); } } /** * Create and Launch an AI Follow Task to execute every 1s. * @param target The L2Character to follow */ public synchronized void startFollow(L2Character target) { if (_followTask != null) { _followTask.cancel(false); _followTask = null; } // Create and Launch an AI Follow Task to execute every 1s _followTarget = target; _followTask = ThreadPoolManager.getInstance().scheduleAiAtFixedRate(new FollowTask(), 5, FOLLOW_INTERVAL); } /** * Create and Launch an AI Follow Task to execute every 0.5s, following at specified range. * @param target The L2Character to follow * @param range */ public synchronized void startFollow(L2Character target, int range) { if (_followTask != null) { _followTask.cancel(false); _followTask = null; } _followTarget = target; _followTask = ThreadPoolManager.getInstance().scheduleAiAtFixedRate(new FollowTask(range), 5, ATTACK_FOLLOW_INTERVAL); } /** * Stop an AI Follow Task. */ public synchronized void stopFollow() { if (_followTask != null) { // Stop the Follow Task _followTask.cancel(false); _followTask = null; } _followTarget = null; } public L2Character getFollowTarget() { return _followTarget; } public void setFollowTarget(L2Character target) { _followTarget = target; } protected L2Object getTarget() { return _target; } protected void setTarget(L2Object target) { _target = target; } /** * Stop all Ai tasks and futures. */ public void stopAITask() { stopFollow(); } @Override public String toString() { return "Actor: " + _actor; } }
  4. Hello how are you?. I am using a pack of L2JSunrise, my question is... how can I change the distance that a mob follows you? I have seen that the mob follows you infinitely, even if you have it miles away, it follows you the same.
  5. Hello how are you?. I'm checking some issues of chances and % drops in L2jSunrise. I have configured only that the drop CHANCE is 5, so... for example the npc Ascetic Solina. some drop is <group chance="0.06449999660253525"> <item id="13460" min="1" max="1" chance="0.2343" /> <!-- Vesper Shaper --> <item id="15637" min="1" max="1" chance="99.7657" /> <!-- Vesper Shaper Piece --> </group> When I change the drop rate, that percentage should be updated, right? and should it be seen in the NPC Drop View multiplied by the chance? I feel like the drops are too low.
  6. Hello how are you?. It is happening to me with L2jSunrise that when the characters use a skill they stop attacking their target. Can I solve it somehow? Could someone please help me. Thank you
  7. Yes i did it, and i get this error on console. data\scripts\events\SavingSanta\SavingSanta.java.error.log Line: -1 - Column: -1 no main method in events.SavingSanta.SavingSanta
  8. Hello!, consult. I am trying to trigger the general HighFive events like MasterOfEnchanting, SaveSanta etc. I am using L2jSunrise but I see that they were disabled in EventsLoader. Is it possible to run them? with that Datapack?
  9. Hi people! how are you doing?. I need help with a problem, when i try tu summon a cubic with Dark Elf or Elf it's not spawning and i get this error. WARN: Error creating new instance of Class class handlers.effecthandlers.SummonCubic Exception was: Integer value required, but not specified: cubicLvl! java.lang.IllegalArgumentException: Integer value required, but not specified: cubicLvl! at l2r.gameserver.model.StatsSet.getInt(StatsSet.java:277) at handlers.effecthandlers.SummonCubic.<init>(SummonCubic.java:26) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at l2r.gameserver.model.effects.EffectTemplate.getEffect(EffectTemplate.java:115) at l2r.gameserver.model.skills.L2Skill.hasEffectType(L2Skill.java:2317) at l2r.gameserver.model.actor.L2Character.beginCast(L2Character.java:1787) at l2r.gameserver.model.actor.L2Character.doCast(L2Character.java:1607) at l2r.gameserver.model.actor.instance.L2PcInstance.doCast(L2PcInstance.java:4775) at l2r.gameserver.ai.L2PlayerAI.thinkCast(L2PlayerAI.java:319) at l2r.gameserver.ai.L2PlayerAI.onEvtThink(L2PlayerAI.java:386) at l2r.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:337) at l2r.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:308) at l2r.gameserver.ai.L2CharacterAI.changeIntentionToCast(L2CharacterAI.java:392) at l2r.gameserver.ai.L2CharacterAI.onIntentionCast(L2CharacterAI.java:367) at l2r.gameserver.ai.L2PlayableAI.onIntentionCast(L2PlayableAI.java:127) at l2r.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:277) at l2r.gameserver.model.actor.instance.L2PcInstance.useMagic(L2PcInstance.java:8128) at l2r.gameserver.network.clientpackets.RequestMagicSkillUse.runImpl(RequestMagicSkillUse.java:166) at l2r.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:71) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Can you help me please?. I dont know where can i look for. Solved. It was an xml skills error.
  10. Hi. it's posible to call a voiced from a UI button on the screen?. on interface.u
  11. I think you don't understand or you don't read more than 1 line onwards, so the solutions are not resolved because with that bugs are generated. If you solve everything like this, no thanks, I don't ask you for anything else xD. I have found the right way. Thanks anyway
  12. The code is'ts equals or like that. but this parts is missing and i added. // Distance check for player <-> npc. if (!activeChar.isInsideRadius(trainer, Npc.INTERACTION_DISTANCE, false, false) && !activeChar.isGM()) return; but i tested and it closes when you click the window. only works when you click on npc. an then you can click on that window. i think that i need to touch more classes. because when i want to learn skills on a windows or community is not equal that when you try to learn skills on a npc.
  13. public final class AcquireSkillList extends L2GameServerPacket { private final List<Skill> _skills; private final AcquireSkillType _skillType; /** * Private class containing learning skill information. */ private static class Skill { public int id; public int nextLevel; public int maxLevel; public int spCost; public int requirements; public Skill(int pId, int pNextLevel, int pMaxLevel, int pSpCost, int pRequirements) { id = pId; nextLevel = pNextLevel; maxLevel = pMaxLevel; spCost = pSpCost; requirements = pRequirements; } } public AcquireSkillList(AcquireSkillType type) { _skillType = type; _skills = new ArrayList<>(); } public void addSkill(int id, int nextLevel, int maxLevel, int spCost, int requirements) { _skills.add(new Skill(id, nextLevel, maxLevel, spCost, requirements)); } @Override protected void writeImpl() { if (_skills.isEmpty()) { return; } writeC(0x90); writeD(_skillType.ordinal()); writeD(_skills.size()); for (Skill temp : _skills) { writeD(temp.id); writeD(temp.nextLevel); writeD(temp.maxLevel); writeD(temp.spCost); writeD(temp.requirements); if (_skillType == AcquireSkillType.SUBPLEDGE) { writeD(0); // TODO: ? } } } }
  14. Yes, when i'm near the Skills Master, that windows works.
  15. How can' i compile it? i have been using L2Sunrise and when i compile it creates a zip file but whit this datapack not.
  16. Hi people, i'm looking for a Datasource where i could take an example of a DailyQuest/Missions to add on my Server. Can you share with what datapack can i use?.
  17. Hi people!. I have created a button on my communityboard that show available skills to learn but with this code when SkillsList Opens and i try to click on that windows it closes. public void showSkillsList(L2PcInstance player) { // Normal skills, No LearnedByFS, no AutoGet skills. final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailableSkills(player, player.getClassId(), false, false); final AcquireSkillList asl = new AcquireSkillList(AcquireSkillType.CLASS); int count = 0; player.setLearningClass(player.getClassId()); for (L2SkillLearn s : skills) { if (SkillData.getInstance().getInfo(s.getSkillId(), s.getSkillLevel()) != null) { asl.addSkill(s.getSkillId(), s.getSkillLevel(), s.getSkillLevel(), s.getCalculatedLevelUpSp(player.getClassId(), player.getClassId()), 0); count++; } } if (count == 0) { final Map<Integer, L2SkillLearn> skillTree = SkillTreesData.getInstance().getCompleteClassSkillTree(player.getClassId()); final int minLevel = SkillTreesData.getInstance().getMinLevelForNewSkill(player, skillTree); if (minLevel > 0) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN_S1); sm.addInt(minLevel); player.sendPacket(sm); } else { if (player.getClassId().level() == 1) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.NO_SKILLS_TO_LEARN_RETURN_AFTER_S1_CLASS_CHANGE); sm.addInt(2); player.sendPacket(sm); } else { player.sendPacket(SystemMessageId.NO_MORE_SKILLS_TO_LEARN); } } } else { player.sendPacket(asl); } } Do you know if there ir a solution for that problem?.
  18. Hi People! i have created a button on interface and the intention of it is to show player control panel or .ccp voiced. When i click on that button NPCWindow opens but it shows the last html opened. Does anybody know how can i do it?. I'm using L2jSunrise.
  19. Does anybody know price of this anticheat?.
  20. An4rchy do you know how can i add a clock showing time left for a regards?.
  21. Tell us what kind of item do you wanna create, check if it's an armor, por etcitem, read files like etcitemgroup and item files in your server files xml.
  22. Hi people!! i wanna create new hair styles for players creation, what file includes players skins?.
  23. okay. I have been able to solve that problem and I have received the item after some time. I am using Sunrise, is it possible that I can create an array of ints with the ID number of the item so that depending on the time it is connected, it will go through the array and give away the items? I speak type of the variable CONFIGS of the ini.
  24. jquery-1.12.4.min.js:4 Uncaught ReferenceError: submitButton is not defined That error appeard when i'm trying to login into an account from website. Do you know what the problem is?.
×
×
  • Create New...