Package com.l2jfrozen.gameserver.model

Examples of com.l2jfrozen.gameserver.model.L2Skill


    Connection con = null;
 
    try
    {
      // skill check
      L2Skill skillData = SkillTable.getInstance().getInfo(skillId,level);
      if (skillData == null) {

        NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
        StringBuffer replyMSG = new StringBuffer("<html><title>Add Skill to Npc</title>");
        replyMSG.append("<body>");
View Full Code Here


    {
      con = L2DatabaseFactory.getInstance().getConnection(false);
      L2NpcTemplate npcData = NpcTable.getInstance().getTemplate(npcId);
      npcData.getSkills().clear();

      L2Skill skillData = null;
     
      // with out race
      String _sql = "SELECT npcid, skillid, level FROM npcskills WHERE npcid=? AND (skillid NOT BETWEEN 4290 AND 4302)";
     
      PreparedStatement statement = con.prepareStatement(_sql);
View Full Code Here

    if(attrs.getNamedItem("lvl") != null)
    {
      lvl = Integer.decode(getValue(attrs.getNamedItem("lvl").getNodeValue(), template));
    }

    L2Skill skill = SkillTable.getInstance().getInfo(id, lvl);

    if(attrs.getNamedItem("chance") != null)
    {
      if(template instanceof L2Weapon || template instanceof L2Item)
      {
        skill.attach(new ConditionGameChance(Integer.decode(getValue(attrs.getNamedItem("chance").getNodeValue(), template))), true);
      }
      else
      {
        skill.attach(new ConditionGameChance(Integer.decode(getValue(attrs.getNamedItem("chance").getNodeValue(), template))), false);
      }
    }

    if(template instanceof L2Weapon)
    {
View Full Code Here

              break; // Blessed Scroll of Resurrection: For Pets
          }
         
          if (skillId != 0)
          {
            L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLevel);
            activeChar.useMagic(skill, true, true);
           
            // Consume the scroll 
            if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
              return;
View Full Code Here

        }
        else
        {
          if (skill.getId() == 345) // Sonic Rage
          {
            L2Skill dummy = SkillTable.getInstance().getInfo(8, 7); // Lv7 Sonic Focus
            dummy.getEffects(activeChar, activeChar, ss, sps, bss);
            dummy = null;
          }
          else if (skill.getId() == 346) // Raging Force
          {
            L2Skill dummy = SkillTable.getInstance().getInfo(50, 7); // Lv7 Focused Force
            dummy.getEffects(activeChar, activeChar, ss, sps, bss);
            dummy = null;
          }
        }
        effect = null;
      }
View Full Code Here

      }
      else
      {
        if (magicId > 2277 && magicId < 2285 && _herbstask >= 100)
          _herbstask -= 100;
        L2Skill skill = SkillTable.getInstance().getInfo(magicId, level);
        if (skill != null)
        {
          // Return false if potion is in reuse
          // so is not destroyed from inventory
          if (activeChar.isSkillDisabled(skill.getId()))
          {
            if (!(skill.getId() == 2166))
            {
              SystemMessage sm = new SystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE);
              sm.addSkillName(skill.getId(), skill.getLevel());
              activeChar.sendPacket(sm);
            }
            // Cp potion message
            else if (skill.getId() == 2166)
            {
              if (skill.getLevel() == 2)
                activeChar.sendMessage("Greater CP Potion is not available at this time: being prepared for reuse.");
              else if (skill.getLevel() == 1)
                activeChar.sendMessage("CP Potion is not available at this time: being prepared for reuse.");
            }
           
            return false;
          }
         
          activeChar.doCast(skill);
         
          // only for Heal potions
          if (magicId == 2031 || magicId == 2032 || magicId == 2037)
          {
            activeChar.shortBuffStatusUpdate(magicId, level, 15);
          }
         
          if (!(activeChar.isSitting() && !skill.isPotion()))
            return true;
        }
      }
    }
    else if (player instanceof L2PetInstance)
    {
      L2PetInstance activeChar = (L2PetInstance) player;
      L2Skill skill = SkillTable.getInstance().getInfo(magicId, level);
      if (skill != null)
      {
        // Return false if potion is in reuse
        // so is not destroyed from inventory
        if (activeChar.isSkillDisabled(skill.getId()))
        {
          if (!(skill.getId() == 2166))
          {
            SystemMessage sm = new SystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE);
            sm.addSkillName(skill.getId(), skill.getLevel());
            activeChar.sendPacket(sm);
          }
          return false;
        }
       
        activeChar.doCast(skill);
       
        if (!(!skill.isPotion()))
          return true;
      }
    }
    return false;
  }
View Full Code Here

        else
        {
          skillId = 4362;
        }

        L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLevel);
        if(activeChar.getFirstEffect(skill) == null)
        {
          skill.getEffects(activeChar, activeChar,false,false,false);
          SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
          sm.addSkillName(skillId);
          activeChar.sendPacket(sm);
          sm = null;
        }
View Full Code Here

        startMinionSpawns(npc.getNpcId());
      }
    }
    else if (npc.getNpcId() > 29069 && npc.getNpcId() < 29077 && npc.getCurrentHp() <= damage)
    {
      L2Skill skill = null;
      switch (npc.getNpcId())
      {
        case 29070:
        case 29071:
        case 29072:
View Full Code Here

    if(areaValid(MapRegionTable.getInstance().getAreaCastle(_activeChar)))
    {
      //TODO: get right skill level
      _target.setSeeded(_seedId, _activeChar);
      L2Skill skill = SkillTable.getInstance().getInfo(2097, 3); //sowing skill
      _activeChar.useMagic(skill, false, false);
      skill = null;
    }
    else
    {
View Full Code Here

    if(!(playable instanceof L2PcInstance))
      return;

    L2PcInstance activeChar = (L2PcInstance) playable;
    int itemId = item.getItemId();
    L2Skill skill = SkillTable.getInstance().getInfo(2229, itemId - 6664);//box key skill
    L2Object target = activeChar.getTarget();

    if(!(target instanceof L2ChestInstance))
    {
      activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.L2Skill

Copyright © 2018 www.massapicom. 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.