Package com.l2jfrozen.gameserver.model

Examples of com.l2jfrozen.gameserver.model.L2Skill


          newNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, originalKiller);
          if(Rnd.nextBoolean())
          {
            if (originalKiller != null)
            {
              final L2Skill skill = SkillTable.getInstance().getInfo(4243, 1);
              if(skill != null)
              {
                skill.getEffects(newNpc, originalKiller, false, false, false);
              }
            }
          }
        }
      }
View Full Code Here


      startQuestTimer("morph_04", 1500, weakScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_04"))
    {
      _Zone.broadcastPacket(new SocialAction(weakScarlet.getObjectId(),4));
      L2Skill skill = SkillTable.getInstance().getInfo(5017, 1);
      if (skill != null)
        skill.getEffects(weakScarlet, weakScarlet, false, false, false);
     
      startQuestTimer("morph_end", 6000, weakScarlet, null);
      startQuestTimer("start_pc", 3000, weakScarlet, null);
      startQuestTimer("start_npc", 3000, weakScarlet, null);
      startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null);
      startQuestTimer("skill02", 10000 + Rnd.get(10000), weakScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_05a"))
    {
      _Zone.broadcastPacket(new SocialAction(frintezza.getObjectId(),4));
    }
    else if (event.equalsIgnoreCase("morph_05"))
    {
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),250, 120, 15, 0, 1000));
      startQuestTimer("morph_06", 0, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_06"))
    {
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),250, 120, 15, 0, 10000));
     
      //cancelQuestTimers("loc_check");
     
      _Scarlet_x = weakScarlet.getX();
      _Scarlet_y = weakScarlet.getY();
      _Scarlet_z = weakScarlet.getZ();
      _Scarlet_h = weakScarlet.getHeading();
      weakScarlet.deleteMe();
      weakScarlet = null;
      activeScarlet = null;
      weakScarlet = (L2GrandBossInstance) addSpawn(SCARLET1, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false,0);
      weakScarlet.setIsInvul(false);
      weakScarlet.setIsImobilised(true);
      weakScarlet.disableAllSkills();
      weakScarlet.setRHandId(7903);
      _Zone.updateKnownList(weakScarlet);
     
      startQuestTimer("morph_07", 7000, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_07"))
    {
      _Zone.broadcastPacket(new MagicSkillUser(frintezza, frintezza, 5006, 1, 34000, 0));
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),500, 70, 15, 3000, 10000));
      startQuestTimer("morph_08", 3000, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_08"))
    {
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),2500, 90, 12, 6000, 10000));
      startQuestTimer("morph_09", 3000, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_09"))
    {
      _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(),250, _Angle, 12, 0, 1000));
      startQuestTimer("morph_10", 0, weakScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_10"))
    {
      _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(),250, _Angle, 12, 0, 10000));
      startQuestTimer("morph_11", 500, weakScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_11"))
    {
      weakScarlet.doDie(weakScarlet);
      _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(),450, _Angle, 14, 8000, 8000));
     
      startQuestTimer("morph_12", 6250, weakScarlet, null);
      startQuestTimer("morph_13", 7200, weakScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_12"))
    {
      weakScarlet.deleteMe();
      weakScarlet = null;
    }
    else if (event.equalsIgnoreCase("morph_13"))
    {
      strongScarlet = (L2GrandBossInstance) addSpawn(SCARLET2, reverseXFix(_Scarlet_x), reverseYFix(_Scarlet_y), reverseZFix(_Scarlet_z), _Scarlet_h, false,0);
      strongScarlet.setIsInvul(false);
      strongScarlet.setIsImobilised(true);
      strongScarlet.disableAllSkills();
      _Zone.updateKnownList(strongScarlet);
      activeScarlet = strongScarlet;
     
      _Zone.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(),450, _Angle, 12, 500, 14000));
     
      startQuestTimer("morph_14", 3000, strongScarlet, null);
      //startQuestTimer("loc_check", 60000, strongScarlet, null, true);
    }
    else if (event.equalsIgnoreCase("morph_14"))
    {
      startQuestTimer("morph_15", 5100, strongScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_15"))
    {
      _Zone.broadcastPacket(new SocialAction(strongScarlet.getObjectId(),2));
      L2Skill skill = SkillTable.getInstance().getInfo(5017, 1);
      if (skill != null)
        skill.getEffects(strongScarlet, strongScarlet, false, false, false);
     
      startQuestTimer("morph_end", 9000, strongScarlet, null);
      startQuestTimer("start_pc", 6000, strongScarlet, null);
      startQuestTimer("start_npc", 6000, strongScarlet, null);
      startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null);
      startQuestTimer("skill03", 10000 + Rnd.get(10000), strongScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_16"))
    {
      _Zone.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(),300, _Angle - 180 , 5, 0, 7000));
      startQuestTimer("morph_17", 0, strongScarlet, null);
    }
    else if (event.equalsIgnoreCase("morph_17"))
    {
      _Zone.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(),200, _Angle, 85, 4000, 10000));
      startQuestTimer("morph_17b", 7400, frintezza, null);
      startQuestTimer("morph_18", 7500, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_17b"))
    {
      frintezza.doDie(frintezza);
    }
    else if (event.equalsIgnoreCase("morph_18"))
    {
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),100, 120, 5, 0, 7000));
      startQuestTimer("morph_19", 0, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_19"))
    {
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),100, 90, 5, 5000, 15000));
      startQuestTimer("morph_20", 7000, frintezza, null);
      startQuestTimer("spawn_cubes", 7000, frintezza, null);
    }
    else if (event.equalsIgnoreCase("morph_20"))
    {
      _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(),900, 90, 25, 7000, 10000));
      startQuestTimer("start_pc", 7000, frintezza, null);
    }
    else if (event.equalsIgnoreCase("songs_play"))
    {
      if (frintezza != null && !frintezza.isDead() && _OnMorph == 0)
      {
        _OnSong = Rnd.get(1, 5);
        if(_OnSong == 3){ //to fix skill exception
          _OnSong = 2;
        }
       
        String SongName = "";
                      
        // Name of the songs are custom, named with client side description.
        switch(_OnSong)
        {
        case 1:
        SongName = "Frintezza's Healing Rhapsody";
        break;
        case 2:
        SongName = "Frintezza's Rampaging Opus";
        break;
        case 3:
        SongName = "Frintezza's Power Concerto";
        break;
        case 4:
        SongName = "Frintezza's Plagued Concerto";
        break;
        case 5:
        SongName = "Frintezza's Psycho Symphony";
        break;
        default:
        SongName = "Frintezza's Song";
        break;
        }
                    
        // Like L2OFF the skill name is printed on screen
        _Zone.broadcastPacket(new ExShowScreenMessage(SongName , 6000));
       
        if (_OnSong == 1 && _ThirdMorph == 1 && strongScarlet.getCurrentHp() < strongScarlet.getMaxHp() * 0.6 && Rnd.get(100) < 80)
        {
          _Zone.broadcastPacket(new MagicSkillUser(frintezza, frintezza, 5007, 1, 32000, 0));
          startQuestTimer("songs_effect", 5000, frintezza, null);
          startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null);
        }
        else if (_OnSong == 2 || _OnSong == 3)
        {
          _Zone.broadcastPacket(new MagicSkillUser(frintezza, frintezza, 5007, _OnSong, 32000, 0));
          startQuestTimer("songs_effect", 5000, frintezza, null);
          startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null);
        }
        else if (_OnSong == 4 && _SecondMorph == 1)
        {
          _Zone.broadcastPacket(new MagicSkillUser(frintezza, frintezza, 5007, 4, 31000, 0));
          startQuestTimer("songs_effect", 5000, frintezza, null);
          startQuestTimer("songs_play", 31000 + Rnd.get(10000), frintezza, null);
        }
        else if (_OnSong == 5 && _ThirdMorph == 1 && _Abnormal == 0)
        {
          _Abnormal = 1;
          _Zone.broadcastPacket(new MagicSkillUser(frintezza, frintezza, 5007, 5, 35000, 0));
          startQuestTimer("songs_effect", 5000, frintezza, null);
          startQuestTimer("songs_play", 35000 + Rnd.get(10000), frintezza, null);
        }
        else
          startQuestTimer("songs_play", 5000 + Rnd.get(5000), frintezza, null);
      }
    }
    else if (event.equalsIgnoreCase("songs_effect"))
    {
      L2Skill skill = SkillTable.getInstance().getInfo(5008, _OnSong);
      if (skill == null)
        return null;
     
      String SongName = "";
              
      // Name of the songs are custom, named with client side description.
      switch(_OnSong)
      {
      case 1:
      SongName = "Frintezza's Concert Hall Melody";
      break;
      case 2:
      SongName = "Frintezza's Rampaging Opus en masse";
      break;
      case 3:
      SongName = "Frintezza Power Encore";
      break;
      case 4:
      SongName = "Mournful Chorale Prelude";
      break;
      case 5:
      SongName = "Hypnotic Mazurka ";
      break;
      default:
      SongName = "Frintezza's Song";
      break;
      }
                 
      // Like L2OFF the skill name is printed on screen
      _Zone.broadcastPacket(new ExShowScreenMessage(SongName , 6000));
     
      if (_OnSong == 1 || _OnSong == 2 || _OnSong == 3)
      {
        if (frintezza != null && !frintezza.isDead() && activeScarlet != null && !activeScarlet.isDead())
          skill.getEffects(frintezza, activeScarlet, false, false, false);
      }
      else if (_OnSong == 4)
      {
        for (L2Character cha : _Zone.getCharactersInside().values())
        {
          if (cha instanceof L2PcInstance && Rnd.get(100) < 80)
          {
            skill.getEffects(frintezza, cha, false, false, false);
            cha.sendPacket(new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(5008, 4));
          }
        }
      }
      else if (_OnSong == 5)
      {
        for (L2Character cha : _Zone.getCharactersInside().values())
        {
          if (cha instanceof L2PcInstance && Rnd.get(100) < 70)
          {
            cha.abortAttack();
            cha.abortCast();
            cha.disableAllSkills();
            cha.stopMove(null);
            cha.setIsImobilised(true);
            cha.setIsParalyzed(true);
            cha.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
            skill.getEffects(frintezza, cha, false, false, false);
            cha.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_DANCE_STUNNED);
            cha.sendPacket(new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(5008, 5));
          }
        }
        startQuestTimer("stop_effect", 25000, frintezza, null);
      }
    }
    else if (event.equalsIgnoreCase("stop_effect"))
    {
      for (L2Character cha : _Zone.getCharactersInside().values())
      {
        if (cha instanceof L2PcInstance)
        {
          cha.stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_DANCE_STUNNED);
          cha.stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLOATING_ROOT);
          cha.enableAllSkills();
          cha.setIsImobilised(false);
          cha.setIsParalyzed(false);
        }
      }
      _Abnormal = 0;
    }
    else if (event.equalsIgnoreCase("attack_stop"))
    {
      cancelQuestTimer("skill01", npc, null);
      cancelQuestTimer("skill02", npc, null);
      cancelQuestTimer("skill03", npc, null);
      cancelQuestTimer("songs_play", npc, null);
      cancelQuestTimer("songs_effect", npc, null);
     
      if (frintezza != null)
        _Zone.broadcastPacket(new MagicSkillCanceld(frintezza.getObjectId()));
    }
    else if (event.equalsIgnoreCase("check_hp"))
    {
      if (npc.isDead())
      {
        _OnMorph = 1;
        _Zone.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
       
        startQuestTimer("attack_stop", 0, frintezza, null);
        startQuestTimer("stop_pc", 0, npc, null);
        startQuestTimer("stop_npc", 0, npc, null);
        startQuestTimer("morph_16", 0, npc, null);
      }
      else
      {
        _CheckDie = _CheckDie + 10;
        if (_CheckDie < 3000)
          startQuestTimer("check_hp", 10, npc, null);
        else
        {
          _OnCheck = 0;
          _CheckDie = 0;
        }
      }
    }
    else if (event.equalsIgnoreCase("skill01"))
    {
      if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0)
      {
        int i = Rnd.get(0,1);
        L2Skill skill = SkillTable.getInstance().getInfo(_skill[i][0],_skill[i][1]);
        if (skill != null)
        {
          weakScarlet.stopMove(null);
          //weakScarlet.setIsCastingNow(true);
          weakScarlet.doCast(skill);
        }
        startQuestTimer("skill01", _skill[i][2] + 5000 + Rnd.get(10000), npc, null);
      }
    }
    else if (event.equalsIgnoreCase("skill02"))
    {
      if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0)
      {
        int i = 0;
        if (_Abnormal == 0)
          i = Rnd.get(2,5);
        else
          i = Rnd.get(2,4);
       
        L2Skill skill = SkillTable.getInstance().getInfo(_skill[i][0],_skill[i][1]);
        if (skill != null)
        {
          weakScarlet.stopMove(null);
          //weakScarlet.setIsCastingNow(true);
          weakScarlet.doCast(skill);
        }
        startQuestTimer("skill02", _skill[i][2] + 5000 + Rnd.get(10000), npc, null);
       
        if (i == 5)
        {
          _Abnormal = 1;
          startQuestTimer("float_effect", 4000, weakScarlet, null);
        }
      }
    }
    else if (event.equalsIgnoreCase("skill03"))
    {
      if (strongScarlet != null && !strongScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 1 && _OnMorph == 0)
      {
        int i = 0;
        if (_Abnormal == 0)
          i = Rnd.get(6,10);
        else
          i = Rnd.get(6,9);
       
        L2Skill skill = SkillTable.getInstance().getInfo(_skill[i][0],_skill[i][1]);
        if (skill != null)
        {
          strongScarlet.stopMove(null);
          //strongScarlet.setIsCastingNow(true);
          strongScarlet.doCast(skill);
View Full Code Here

        if (Rnd.get(100) < 30)
        {
          _Bomber = 1;
          startQuestTimer("bomber", 3000, npc, null);
         
          L2Skill skill = SkillTable.getInstance().getInfo(5011,1);
          if (skill != null)
          {
            //npc.setIsCastingNow(true);
            npc.doCast(skill);
          }
View Full Code Here

      String content = "<html><body>Newbie Guide:<br>I'm sorry, but you are not eligible to receive the protection blessing.<br1>It can only be bestowed on <font color=\"LEVEL\">characters below level 39 who have not made a seccond transfer.</font></body></html>";
      insertObjectIdAndShowChatWindow(player, content);
      content = null;
      return;
    }
    L2Skill skill = SkillTable.getInstance().getInfo(5182, 1);
    doCast(skill);
    skill = null;
  }
View Full Code Here

    SystemMessage sm;
    if (!player.reduceAdena("RestoreCP", neededmoney, player.getLastFolkNPC(), true))
      return;
   
    // Skill's animation
    L2Skill skill = SkillTable.getInstance().getInfo(4380, 1);
    if (skill != null)
    {
      setTarget(player);
      doCast(skill);
    }
View Full Code Here

      String content = "<html><body>Come back here when you have reached level " + lowestLevel + ". I will give you support magic then.</body></html>";
      insertObjectIdAndShowChatWindow(player, content);
      return;
    }
   
    L2Skill skill = null;
    // Go through the Helper Buff list define in sql table helper_buff_list and cast skill
    for (L2HelperBuff helperBuffItem : HelperBuffTable.getInstance().getHelperBuffTable())
    {
      if (helperBuffItem.isMagicClassBuff() == player.isMageClass())
      {
        if (player_level >= helperBuffItem.getLowerLevel() && player_level <= helperBuffItem.getUpperLevel())
        {
          skill = SkillTable.getInstance().getInfo(helperBuffItem.getSkillID(), helperBuffItem.getSkillLevel());
         
          if (skill.getSkillType() == SkillType.SUMMON)
          {
            player.doCast(skill);
          }
          else
          {
View Full Code Here

       
        break;
      case 1: // pet summons
        activeChar.setTarget(activeChar);
        // Skill 2046 used only for animation
        L2Skill skill = SkillTable.getInstance().getInfo(2046, 1);
        activeChar.useMagic(skill, true, true);
        activeChar.sendPacket(new SystemMessage(SystemMessageId.SUMMON_A_PET));
        ThreadPoolManager.getInstance().scheduleGeneral(new PetSummonFinalizer(activeChar, npcTemplate, item), 4800);
       
        break;
View Full Code Here

            if (_target != null)
                _skill = SkillTable.getInstance().getInfo(getRandomSkill(npc), 1);
        }

        L2Character target = _target;
        L2Skill skill = _skill;
        if (skill == null)
            skill = SkillTable.getInstance().getInfo(getRandomSkill(npc), 1);
        if (target == null || target.isDead() || !(_Zone.isInsideZone(target))) {
            //npc.setIsCastingNow(false);
            return;
        }

        if (Util.checkIfInRange(skill.getCastRange(), npc, target, true)) {
            npc.getAI().setIntention(AI_INTENTION_IDLE);
            npc.setTarget(target);
            //npc.setIsCastingNow(true);
            _target = null;
            _skill = null;
            if (getDist(skill.getCastRange()) > 0)
                npc.broadcastPacket(new MoveToPawn(npc, target, getDist(skill.getCastRange())));
            try {
                wait(1000);
                npc.stopMove(null);
                npc.doCast(skill);
            } catch (Exception e) {
View Full Code Here

      StringBuffer replyMSG = new StringBuffer("<html><title>(NPC:" + npcId + " SKILL:" + skillId + ")</title>");
      replyMSG.append("<body>");

      if(skillData.next()){
        L2Skill skill = SkillTable.getInstance().getInfo(skillData.getInt("skillid"),skillData.getInt("level"));

        replyMSG.append("<table>");
        replyMSG.append("<tr><td>NPC</td><td>"+ NpcTable.getInstance().getTemplate(skillData.getInt("npcid")).getName() + "</td></tr>");
        replyMSG.append("<tr><td>SKILL</td><td>"+ skill.getName() + "(" + skillData.getInt("skillid") + ")</td></tr>");
        replyMSG.append("<tr><td>Lv(" + skill.getLevel() + ")</td><td><edit var=\"level\" width=50></td></tr>");
        replyMSG.append("</table>");

        replyMSG.append("<center>");
        replyMSG.append("<button value=\"Edit Skill\" action=\"bypass -h admin_edit_skill_npc " + npcId + " " + skillId + " $level\"  width=100 height=20 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
        replyMSG.append("<br><button value=\"Back to Skillist\" action=\"bypass -h admin_show_skilllist_npc " + npcId +"\"  width=100 height=20 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
View Full Code Here

  {
    Connection con = null;

    try
    {
      L2Skill skillData = SkillTable.getInstance().getInfo(skillId,level);
      if (skillData == null)
      {
        NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
        StringBuffer replyMSG = new StringBuffer("<html><title>Update Npc Skill Data</title>");
        replyMSG.append("<body>");
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.