Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Skill$AddedSkill


    }
    final int s_energy_wave = 20;
    final int s_earth_quake = 20;
    final int s_group_hold = (actor.getCurrentHpPercents() > 50) ? 0 : 20;
    final int s_thunderbolt = (actor.getCurrentHpPercents() > 25) ? 0 : 20;
    Skill r_skill = null;
    if (actor.isMovementDisabled())
    {
      r_skill = thunderbolt;
    }
    else if (!Rnd.chance(100 - s_thunderbolt - s_group_hold - s_energy_wave - s_earth_quake))
    {
      final Map<Skill, Integer> d_skill = new HashMap<>();
      final double distance = actor.getDistance(target);
      addDesiredSkill(d_skill, target, distance, energy_wave);
      addDesiredSkill(d_skill, target, distance, earth_quake);
      if (s_group_hold > 0)
      {
        addDesiredSkill(d_skill, target, distance, group_hold);
      }
      if (s_thunderbolt > 0)
      {
        addDesiredSkill(d_skill, target, distance, thunderbolt);
      }
      r_skill = selectTopSkill(d_skill);
    }
    if (r_skill == null)
    {
      r_skill = baium_normal_attack;
    }
    else if (r_skill.getTargetType() == Skill.SkillTargetType.TARGET_SELF)
    {
      target = actor;
    }
    addTaskCast(target, r_skill);
    r_skill = null;
View Full Code Here


    for (Creature cha : around)
    {
      if (cha.isPlayer() && !cha.isDead() && Rnd.chance(SKILL_CHANCE))
      {
        int rnd = Rnd.get(SKILLS.length);
        Skill skill = SkillTable.getInstance().getInfo(SKILLS[rnd][0], SKILLS[rnd][1]);
        if (skill != null)
        {
          skill.getEffects(cha, cha, false, false);
        }
      }
    }
  }
View Full Code Here

      {
        final int level = effect.get(0).getSkill().getLevel();
        if (level < 10)
        {
          effect.get(0).exit();
          final Skill skill = SkillTable.getInstance().getInfo(DeBuff, level + 1);
          skill.getEffects(actor, attacker, false, false);
        }
      }
      else
      {
        final Skill skill = SkillTable.getInstance().getInfo(DeBuff, 1);
        if (skill != null)
        {
          skill.getEffects(actor, attacker, false, false);
        }
        else
        {
          System.out.println("Skill " + DeBuff + " is null, fix it.");
        }
View Full Code Here

  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
    }
    if (attacker.isPet())
    {
      super.onEvtAttacked(attacker, damage);
View Full Code Here

  protected void onEvtAggression(Creature attacker, int aggro)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
    }
  }
View Full Code Here

    _enteringMessageId = set.getInteger("entering_message_no", 0);
    _leavingMessageId = set.getInteger("leaving_message_no", 0);
    _target = ZoneTarget.valueOf(set.getString("target", "pc"));
    _affectRace = set.getString("affect_race", "all").equals("all") ? null : Race.valueOf(set.getString("affect_race"));
    String s = set.getString("skill_name", null);
    Skill skill = null;
    if (s != null)
    {
      String[] sk = s.split("[\\s,;]+");
      skill = SkillTable.getInstance().getInfo(Integer.parseInt(sk[0]), Integer.parseInt(sk[1]));
    }
View Full Code Here

            ThreadPoolManager.getInstance().schedule(new SecondMorph(3), 5500);
            break;
          case 3:
            weakScarlet.broadcastPacket(new SocialAction(weakScarlet.getObjectId(), 4));
            blockAll(false);
            Skill skill = SkillTable.getInstance().getInfo(5017, 1);
            skill.getEffects(weakScarlet, weakScarlet, false, false);
            for(Player pc : getPlayers())
              pc.leaveMovieMode();
            break;
        }
      }
View Full Code Here

            break;
          case 9:
            blockAll(false);
            for(Player pc : getPlayers())
              pc.leaveMovieMode();
            Skill skill = SkillTable.getInstance().getInfo(5017, 1);
            skill.getEffects(strongScarlet, strongScarlet, false, false);
            break;
        }
      }
      catch(Exception e)
      {
View Full Code Here

      List <Integer> skillListId = SkillAcquireHolder.getInstance().getMaintainSkillOnAwake(oldClassId, newClassId);
      for(int sId : skillListId)
      {
        String iconData = obtainIcon(sId);
        String name = new String();
        Skill skl = SkillTable.getInstance().getInfo(sId, SkillTable.getInstance().getBaseLevel(sId));
        if(skl != null)
        {
          name = skl.getName();
        }
        else
        {
          continue;
        }
View Full Code Here

              {
                addDesiredSkill(d_skill, target, distance, blessBlood);
              }
              addDesiredSkill(d_skill, target, distance, vampRage);
              addDesiredSkill(d_skill, target, distance, holyResist);
              final Skill r_skill = selectTopSkill(d_skill);
              chooseTaskAndTargets(r_skill, target, distance);
              doTask();
            }
            else if (qs2.getCond() == 3)
            {
              Functions.npcSay(actor, NpcString.YOUR_WORK_HERE_IS_DONE_SO_RETURN_TO_THE_CENTRAL_GUARDIAN);
            }
          }
          final QuestState qs3 = masterplayer.getQuestState(_10295_SevenSignsSolinasTomb.class);
          if ((qs3 != null) && !qs3.isCompleted())
          {
            if (qs3.getCond() == 1)
            {
              if (Rnd.chance(20))
              {
                if (Rnd.chance(30))
                {
                  Functions.npcSay(actor, NpcString.TO_REMOVE_THE_BARRIER_YOU_MUST_FIND_THE_RELICS_THAT_FIT_THE_BARRIER_AND_ACTIVATE_THE_DEVICE);
                }
                else if (Rnd.chance(30))
                {
                  Functions.npcSay(actor, NpcString.THE_GUARDIAN_OF_THE_SEAL_DOESNT_SEEM_TO_GET_INJURED_AT_ALL_UNTIL_THE_BARRIER_IS_DESTROYED);
                }
                else
                {
                  Functions.npcSay(actor, NpcString.THE_DEVICE_LOCATED_IN_THE_ROOM_IN_FRONT_OF_THE_GUARDIAN_OF_THE_SEAL_IS_DEFINITELY_THE_BARRIER_THAT_CONTROLS_THE_GUARDIANS_POWER);
                }
              }
              if (target.getCurrentHpPercents() < 80)
              {
                addDesiredSkill(d_skill, target, distance, heal);
              }
              if (target.getCurrentMpPercents() < 70)
              {
                addDesiredSkill(d_skill, target, distance, recharge);
              }
              if (target.isInCombat())
              {
                addDesiredSkill(d_skill, target, distance, blessBlood);
              }
              addDesiredSkill(d_skill, target, distance, vampRage);
              addDesiredSkill(d_skill, target, distance, holyResist);
              final Skill r_skill = selectTopSkill(d_skill);
              chooseTaskAndTargets(r_skill, target, distance);
              doTask();
            }
          }
          final QuestState qs4 = masterplayer.getQuestState(_10296_SevenSignsPoweroftheSeal.class);
          if ((qs4 != null) && !qs4.isCompleted())
          {
            if (qs4.getCond() == 2)
            {
              if (target.getCurrentHpPercents() < 80)
              {
                addDesiredSkill(d_skill, target, distance, heal);
              }
              if (target.getCurrentMpPercents() < 70)
              {
                addDesiredSkill(d_skill, target, distance, recharge);
              }
              if (target.isInCombat())
              {
                addDesiredSkill(d_skill, target, distance, blessBlood);
              }
              addDesiredSkill(d_skill, target, distance, vampRage);
              addDesiredSkill(d_skill, target, distance, holyResist);
              final Skill r_skill = selectTopSkill(d_skill);
              chooseTaskAndTargets(r_skill, target, distance);
              doTask();
            }
          }
          break;
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Skill$AddedSkill

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.