Package net.sf.l2j.gameserver.serverpackets

Examples of net.sf.l2j.gameserver.serverpackets.MagicSkillUser


        L2Object oldTarget = activeChar.getTarget();
        activeChar.setTarget(activeChar);

    //activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT));

    MagicSkillUser MSU = new MagicSkillUser(activeChar,SKILL_IDS[grade],1,0,0);
        Broadcast.toSelfAndKnownPlayers(activeChar, MSU);
        activeChar.setTarget(oldTarget);
  }
View Full Code Here


        }

        // Pet uses the power of spirit.
        activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));

        Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/);
    }
View Full Code Here

        }

        // Pet uses the power of spirit.
        activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));

        Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed? 2009:2008, 1, 0, 0), 360000/*600*/);
    }
View Full Code Here

          activeChar.soulShotLock.unlock();
        }

    // Send message to client
        activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SOULSHOT));
        Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  }
 
View Full Code Here

      return;
    L2PcInstance activeChar = (L2PcInstance)playable;
    //item.getItem().getEffects(item, activeChar);

    // Use a summon skill effect for fun ;)
    MagicSkillUser MSU = new MagicSkillUser(playable, playable, 2103, 1, 0, 0);
    activeChar.sendPacket(MSU);
    activeChar.broadcastPacket(MSU);

    activeChar.startAbnormalEffect(BIGHEAD_EFFECT);
    activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);
View Full Code Here

         {
          e.exit();
          break;
        }
      }
      MagicSkillUser MSU = new MagicSkillUser(playable, playable, 2042, 1, 0, 0);
      activeChar.sendPacket(MSU);
      activeChar.broadcastPacket(MSU);
      playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
    }
      else if (itemId == 1832) // advanced antidote
    {
      L2Effect[] effects = activeChar.getAllEffects();
      for (L2Effect e : effects)
      {
        if (e.getSkill().getSkillType() == L2Skill.SkillType.POISON && e.getSkill().getLevel() <= 7)
        {
          e.exit();
          break;
        }
      }
      MagicSkillUser MSU = new MagicSkillUser(playable, playable, 2043, 1, 0, 0);
      activeChar.sendPacket(MSU);
      activeChar.broadcastPacket(MSU);
      playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
    }
    else if (itemId == 1833) // bandage
    {
      L2Effect[] effects = activeChar.getAllEffects();
      for (L2Effect e : effects)
      {
         if (e.getSkill().getSkillType() == L2Skill.SkillType.BLEED && e.getSkill().getLevel() <= 3)
         {
          e.exit();
          break;
        }
      }
      MagicSkillUser MSU = new MagicSkillUser(playable, playable, 34, 1, 0, 0);
      activeChar.sendPacket(MSU);
      activeChar.broadcastPacket(MSU);
      playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
    }
    else if (itemId == 1834) // emergency dressing
    {
      L2Effect[] effects = activeChar.getAllEffects();
      for (L2Effect e : effects)
      {
        if (e.getSkill().getSkillType() == L2Skill.SkillType.BLEED && e.getSkill().getLevel() <= 7)
        {
          e.exit();
          break;
        }
      }
      MagicSkillUser MSU = new MagicSkillUser(playable, playable, 2045, 1, 0, 0);
      activeChar.sendPacket(MSU);
      activeChar.broadcastPacket(MSU);
      playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
    }
        else if (itemId == 3889) // potion of recovery
        {
            L2Effect[] effects = activeChar.getAllEffects();
            for (L2Effect e : effects) {
                if (e.getSkill().getId() == 4082)
                    e.exit();
            }
            activeChar.setIsImobilised(false);
            if (activeChar.getFirstEffect(L2Effect.EffectType.ROOT) == null) activeChar.stopRooting(null);
            MagicSkillUser MSU = new MagicSkillUser(playable, playable, 2042, 1, 0, 0);
            activeChar.sendPacket(MSU);
            activeChar.broadcastPacket(MSU);
            playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
       }
  }
View Full Code Here

                 (itemId == 8598 && activeChar.getExpertiseIndex()==4) || // Scroll: Recovery (A Grade)
                 (itemId == 8599 && activeChar.getExpertiseIndex()==5))   // Scroll: Recovery (S Grade)
            {
        if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
          return;
        activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2286, 1, 1, 0));
        activeChar.reduceDeathPenaltyBuffLevel();
        useScroll(activeChar, 2286, itemId - 8593);
            }
         else
           activeChar.sendPacket(new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE));
            return;
    }
    else if (itemId == 5703 || itemId >= 5803 && itemId <= 5807)
    {
      if ((itemId == 5703 && activeChar.getExpertiseIndex()==0) ||     // Lucky Charm (No Grade)
          (itemId == 5803 && activeChar.getExpertiseIndex()==1) || // Lucky Charm (D Grade)
          (itemId == 5804 && activeChar.getExpertiseIndex()==2) || // Lucky Charm (C Grade)
          (itemId == 5805 && activeChar.getExpertiseIndex()==3) || // Lucky Charm (B Grade)
          (itemId == 5806 && activeChar.getExpertiseIndex()==4) || // Lucky Charm (A Grade)
          (itemId == 5807 && activeChar.getExpertiseIndex()==5))   // Lucky Charm (S Grade)
      {
        if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
          return;
        activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2168, activeChar.getExpertiseIndex()+1, 1, 0));
        useScroll(activeChar, 2168, activeChar.getExpertiseIndex()+1);
        activeChar.setCharmOfLuck(true);
      }
      else
        activeChar.sendPacket(new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE));
      return;
    }
       else if (itemId >= 8515 && itemId <= 8520) // Charm of Courage XML: 5041
       {
         if ((itemId == 8515 && activeChar.getExpertiseIndex()==0) || // Charm of Courage (No Grade)
          (itemId == 8516 && activeChar.getExpertiseIndex()==1) || // Charm of Courage (D Grade)
                 (itemId == 8517 && activeChar.getExpertiseIndex()==2) || // Charm of Courage (C Grade)
                 (itemId == 8518 && activeChar.getExpertiseIndex()==3) || // Charm of Courage (B Grade)
                 (itemId == 8519 && activeChar.getExpertiseIndex()==4) || // Charm of Courage (A Grade)
                 (itemId == 8520 && activeChar.getExpertiseIndex()==5))   // Charm of Courage (S Grade)
             {
           if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
             return;
             activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 5041, 1, 1, 0));
              useScroll(activeChar, 5041, 1);
              activeChar.setCharmOfCourage(true);
             }
         else
           activeChar.sendPacket(new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE));
         return;
       }
       else if (itemId >= 8954 && itemId <= 8956)
       {
         if (activeChar.getLevel() < 76) return;
         if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
        return;
         switch(itemId)
      {
        case 8954: // Blue Primeval Crystal XML: 2306
          activeChar.sendPacket(new MagicSkillUser(playable, playable, 2306, 1, 1, 0));
          activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2306, 1, 1, 0));
          activeChar.addExpAndSp(0, 50000);
          break;
        case 8955: // Green Primeval Crystal XML: 2306
          activeChar.sendPacket(new MagicSkillUser(playable, playable, 2306, 2, 1, 0));
          activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2306, 2, 1, 0));
          activeChar.addExpAndSp(0, 100000);
          break;
        case 8956: // Red Primeval Crystal XML: 2306
          activeChar.sendPacket(new MagicSkillUser(playable, playable, 2306, 3, 1, 0));
          activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2306, 3, 1, 0));
          activeChar.addExpAndSp(0, 200000);
          break;
        default:
          break;
      }
         return;
       }

    // for the rest, there are no extra conditions
    if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
      return;

    switch(itemId)
    {
      case 3926: // Scroll of Guidance XML:2050
        activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2050, 1, 1, 0));
             useScroll(activeChar, 2050, 1);
             break;
           case 3927: // Scroll of Death Whipser XML:2051
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2051, 1, 1, 0));
             useScroll(activeChar, 2051, 1);
             break;
           case 3928: // Scroll of Focus XML:2052
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2052, 1, 1, 0));
             useScroll(activeChar, 2052, 1);
             break;
           case 3929: // Scroll of Greater Acumen XML:2053
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2053, 1, 1, 0));
             useScroll(activeChar, 2053, 1);
             break;
           case 3930: // Scroll of Haste XML:2054
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2054, 1, 1, 0));
             useScroll(activeChar, 2054, 1);
             break;
           case 3931: // Scroll of Agility XML:2055
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2055, 1, 1, 0));
             useScroll(activeChar, 2055, 1);
             break;
           case 3932: // Scroll of Mystic Enpower XML:2056
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2056, 1, 1, 0));
             useScroll(activeChar, 2056, 1);
             break;
           case 3933: // Scroll of Might XML:2057
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2057, 1, 1, 0));
             useScroll(activeChar, 2057, 1);
             break;
           case 3934: // Scroll of Wind Walk XML:2058
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2058, 1, 1, 0));
             useScroll(activeChar, 2058, 1);
             break;
           case 3935: // Scroll of Shield XML:2059
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2059, 1, 1, 0));
             useScroll(activeChar, 2059, 1);
             break;
           case 4218: // Scroll of Mana Regeneration XML:2064
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2064, 1, 1, 0));
             useScroll(activeChar, 2064, 1);
             break;
           case 5593: // SP Scroll Low Grade XML:2167
             activeChar.sendPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
             activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
             activeChar.addExpAndSp(0, 500);
             break;
           case 5594: // SP Scroll Medium Grade XML:2167
             activeChar.sendPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
             activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
             activeChar.addExpAndSp(0, 5000);
             break;
           case 5595: // SP Scroll High Grade XML:2167
             activeChar.sendPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
             activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
             activeChar.addExpAndSp(0, 100000);
             break;
           case 6037: // Scroll of Waking XML:2170
             activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2170, 1, 1, 0));
             useScroll(activeChar, 2170, 1);
             break;
           case 9146: // Scroll of Guidance - For Event XML:2050
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2050, 1, 1, 0));
             useScroll(activeChar, 2050, 1);
             break;
           case 9147: // Scroll of Death Whipser - For Event XML:2051
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2051, 1, 1, 0));
             useScroll(activeChar, 2051, 1);
             break;
           case 9148: // Scroll of Focus - For Event XML:2052
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2052, 1, 1, 0));
             useScroll(activeChar, 2052, 1);
             break;
           case 9149: // Scroll of Acumen - For Event XML:2053
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2053, 1, 1, 0));
             useScroll(activeChar, 2053, 1);
             break;
           case 9150: // Scroll of Haste - For Event XML:2054
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2054, 1, 1, 0));
             useScroll(activeChar, 2054, 1);
             break;
           case 9151: // Scroll of Agility - For Event XML:2055
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2055, 1, 1, 0));
             useScroll(activeChar, 2055, 1);
             break;
           case 9152: // Scroll of Enpower - For Event XML:2056
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2056, 1, 1, 0));
             useScroll(activeChar, 2056, 1);
             break;
           case 9153: // Scroll of Might - For Event XML:2057
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2057, 1, 1, 0));
             useScroll(activeChar, 2057, 1);
             break;
           case 9154: // Scroll of Wind Walk - For Event XML:2058
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2058, 1, 1, 0));
             useScroll(activeChar, 2058, 1);
             break;
           case 9155: // Scroll of Shield - For Event XML:2059
             activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2059, 1, 1, 0));
             useScroll(activeChar, 2059, 1);
             break;
           default:
             break;
    }
View Full Code Here

            return;

        activeChar.disableAllSkills();

        L2Skill skill = SkillTable.getInstance().getInfo(escapeSkill, 1);
        MagicSkillUser msu = new MagicSkillUser(activeChar, escapeSkill, 1, skill.getHitTime(), 0);
        activeChar.broadcastPacket(msu);
        SetupGauge sg = new SetupGauge(0, skill.getHitTime());
        activeChar.sendPacket(sg);
        //End SoE Animation section
View Full Code Here

            {
                _log.warning("SevenSignsFestival: Error while spawning Festival Witch ID " + _witchSpawn._npcId + ": " + e);
            }

            // Make it appear as though the Witch has apparated there.
            MagicSkillUser msu = new MagicSkillUser(_witchInst, _witchInst, 2003, 1, 1, 0);
            _witchInst.broadcastPacket(msu);

            // And another one...:D
            msu = new MagicSkillUser(_witchInst, _witchInst, 2133, 1, 1, 0);
            _witchInst.broadcastPacket(msu);

            // Send a message to all participants from the witch.
            sendMessageToParticipants("The festival will begin in 2 minutes.");
        }
View Full Code Here

        activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
        //SoE Animation section
        activeChar.setTarget(activeChar);
        activeChar.disableAllSkills();

        MagicSkillUser msk = new MagicSkillUser(activeChar, 1050, 1, teleportTimer, 0);
        Broadcast.toSelfAndKnownPlayersInRadius(activeChar, msk, 810000/*900*/);
        SetupGauge sg = new SetupGauge(0, teleportTimer);
        activeChar.sendPacket(sg);
        //End SoE Animation section

View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.MagicSkillUser

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.