Examples of useMagic()

  • com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance.useMagic()
    Check if the active L2Skill can be casted.

    Actions :

  • Check if the skill isn't toggle and is offensive
  • Check if the target is in the skill cast range
  • Check if the skill is Spoil type and if the target isn't already spoiled
  • Check if the caster owns enought consummed Item, enough HP and MP to cast the skill
  • Check if the caster isn't sitting
  • Check if all skills are enabled and this skill is enabled


  • Check if the caster own the weapon needed


  • Check if the skill is active


  • Check if all casting conditions are completed


  • Notify the AI with AI_INTENTION_CAST and target


  • @param skill The L2Skill to use @param forceUse used to force ATTACK on players @param dontMove used to prevent movement, if not in range
  • net.sf.l2j.gameserver.model.L2Summon.useMagic()
    Check if the active L2Skill can be casted.

    Actions :

  • Check if the target is correct
  • Check if the target is in the skill cast range
  • Check if the summon owns enough HP and MP to cast the skill
  • Check if all skills are enabled and this skill is enabled


  • Check if the skill is active


  • Notify the AI with AI_INTENTION_CAST and target


  • @param skill The L2Skill to use @param forceUse used to force ATTACK on players @param dontMove used to prevent movement, if not in range
  • net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.useMagic()
    Check if the active L2Skill can be casted.
    Actions :
  • Check if the skill isn't toggle and is offensive
  • Check if the target is in the skill cast range
  • Check if the skill is Spoil type and if the target isn't already spoiled
  • Check if the caster owns enought consummed Item, enough HP and MP to cast the skill
  • Check if the caster isn't sitting
  • Check if all skills are enabled and this skill is enabled

  • Check if the caster own the weapon needed

  • Check if the skill is active

  • Check if all casting conditions are completed

  • Notify the AI with AI_INTENTION_CAST and target

  • @param skill The L2Skill to use @param forceUse used to force ATTACK on players @param dontMove used to prevent movement, if not in range

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.useMagic()

          {
            activeChar.sendMessage("The chest Is empty.");
            activeChar.sendPacket(new ActionFailed());
            return;
          }
          activeChar.useMagic(skill,false,false);
        }
      }

      @Override
      public int[] getItemIds()
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.useMagic()

        L2Object[] targets = new L2Object[1];
        targets[0] = activeChar.getTarget();

          int itemId = item.getItemId();
        if (itemId == 6643) { // Golden Spice
          activeChar.useMagic(SkillTable.getInstance().getInfo(2188,1),false,false);
        }
        else if (itemId == 6644) { // Crystal Spice
          activeChar.useMagic(SkillTable.getInstance().getInfo(2189,1),false,false);
        }
      }
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.useMagic()

          int itemId = item.getItemId();
        if (itemId == 6643) { // Golden Spice
          activeChar.useMagic(SkillTable.getInstance().getInfo(2188,1),false,false);
        }
        else if (itemId == 6644) { // Crystal Spice
          activeChar.useMagic(SkillTable.getInstance().getInfo(2189,1),false,false);
        }
      }

        @Override
      public int[] getItemIds()
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.useMagic()

        int crystalId = item.getItemId();

            // Soul Crystal Casting section
            L2Skill skill = SkillTable.getInstance().getInfo(2096, 1);
            activeChar.useMagic(skill, false, true);
            // End Soul Crystal Casting section

            // Continue execution later
            CrystalFinalizer cf = new CrystalFinalizer(activeChar, target, crystalId);
            ThreadPoolManager.getInstance().scheduleEffect(cf, skill.getHitTime());
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.useMagic()

          // If Alternate rule Karma punishment is set to true, forbid skill Return to player with Karma
          if (skill.getSkillType() == L2Skill.SkillType.RECALL && !Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && activeChar.getKarma() > 0)
            return;

          // activeChar.stopMove();
          activeChar.useMagic(skill, _ctrlPressed, _shiftPressed);
        }
        else
        {
          activeChar.sendPacket(new ActionFailed());
          _log.warning("No skill found!!");
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.