Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Territory


      }
      if (!cha.isPlayer())
      {
        return;
      }
      Player player = cha.getPlayer();
     
      QuestState qs = player.getQuestState(_10301_ShadowOfTerrorBlackishRedFog.class);
      if(qs != null && qs.getCond() == 3 && player.getVar("instance10301") == null)
      {
        Quest q = QuestManager.getQuest(10301);
        player.processQuestEvent(q.getName(), "enterInstance", null);
        //player.setVar("instance10301", "true", -1);
        return;
      }
      if (!player.getVarB("@25_20_telzone_to_magmeld"))
      {
        player.showQuestMovie(SceneMovie.si_arkan_enter);
        player.setVar("@25_20_telzone_to_magmeld", "true", -1);
      }
      cha.teleToLocation(Location.parseLoc(zone.getParams().getString("tele")));
    }
View Full Code Here


  @Override
  public String onTalk(NpcInstance npc, QuestState st)
  {
    String htmltext = "noquest";
    int npcId = npc.getNpcId();
    Player player = st.getPlayer();
    int cond = st.getCond();
    if (npcId == TEPIOS)
    {
      if (cond == 0)
      {
        if (player.getLevel() >= 75)
        {
          if ((st.getQuestItemsCount(MARK_OF_KEUCEREUS_STAGE_1) > 0) || (st.getQuestItemsCount(MARK_OF_KEUCEREUS_STAGE_2) > 0))
          {
            htmltext = "tepios_q696_1.htm";
          }
View Full Code Here

    @Override
    public void onZoneEnter(Zone zone, Creature cha)
    {
      if (cha.isPlayer())
      {
        Player player = cha.getPlayer();
        if (!player.getVarB("@ti_present_video"))
        {
          QuestState qs = player.getQuestState(_10320_LetsGototheCentralSquare.class);
          if ((qs != null) && (qs.getCond() == 1))
          {
            player.showQuestMovie(SceneMovie.si_illusion_02_que);
          }
          else
          {
            player.showQuestMovie(SceneMovie.si_illusion_01_que);
          }
          player.setVar("@ti_present_video", "true", -1);
        }
      }
    }
View Full Code Here

    }
    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

                if ("coords".equalsIgnoreCase(e2.getName()))
                {
                  coords.add(Location.parseLoc(e2.attributeValue("loc")));
                }
              }
              Territory territory = null;
              if (spawnType == 2)
              {
                Polygon poly = new Polygon();
                for (Location loc : coords)
                {
                  poly.add(loc.x, loc.y).setZmin(loc.z).setZmax(loc.z);
                }
                if (!poly.validate())
                {
                  error("invalid spawn territory for instance id : " + instanceId + " - " + poly + "!");
                }
                territory = new Territory().add(poly);
              }
              for (String mob : mobs)
              {
                mobId = Integer.parseInt(mob);
                spawnDat = new InstantZone.SpawnInfo(spawnType, mobId, count, respawn, respawnRnd, coords, territory);
View Full Code Here

              for (int i = 0; i < tokenCount; i++)
              {
                Integer value = Integer.decode(st.nextToken().trim());
                stages[i] = value;
              }
              Territory territory = null;
              for (Node s1 = d1.getFirstChild(); s1 != null; s1 = s1.getNextSibling())
              {
                if ("territory".equalsIgnoreCase(s1.getNodeName()))
                {
                  Polygon poly = new Polygon();
                  for (Node s2 = s1.getFirstChild(); s2 != null; s2 = s2.getNextSibling())
                  {
                    if ("add".equalsIgnoreCase(s2.getNodeName()))
                    {
                      int x = Integer.parseInt(s2.getAttributes().getNamedItem("x").getNodeValue());
                      int y = Integer.parseInt(s2.getAttributes().getNamedItem("y").getNodeValue());
                      int minZ = Integer.parseInt(s2.getAttributes().getNamedItem("zmin").getNodeValue());
                      int maxZ = Integer.parseInt(s2.getAttributes().getNamedItem("zmax").getNodeValue());
                      poly.add(x, y).setZmin(minZ).setZmax(maxZ);
                    }
                  }
                  territory = new Territory().add(poly);
                  if (!poly.validate())
                  {
                    _log.error("HellboundManager: Invalid spawn territory : " + poly + "!");
                    continue;
                  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Territory

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.