Package lineage2.gameserver.data.xml.parser

Examples of lineage2.gameserver.data.xml.parser.OptionDataParser


  /**
   * Method TakeAdventurersArmorCoupon.
   */
  public void TakeAdventurersArmorCoupon()
  {
    final Player player = getSelf();
    if (player == null)
    {
      return;
    }
    if (!Config.ALT_ALLOW_SHADOW_WEAPONS)
    {
      show(new CustomMessage("common.Disabled", player), player);
      return;
    }
    if ((player.getLevel() > 39) || (player.getClassLevel() > 2))
    {
      show("Your level is too high!", player);
      return;
    }
    if ((player.getLevel() < 20) || (player.getClassLevel() < 2))
    {
      show("Your level is too low!", player);
      return;
    }
    if (player.getVarB("newbiearmor"))
    {
      show("Your already got your newbie weapon!", player);
      return;
    }
    addItem(player, 7833, 1);
    player.setVar("newbiearmor", "true", -1);
  }
View Full Code Here


  /**
   * Method enter_dc.
   */
  public void enter_dc()
  {
    final Player player = getSelf();
    final NpcInstance npc = getNpc();
    if ((player == null) || (npc == null))
    {
      return;
    }
    if (!NpcInstance.canBypassCheck(player, npc))
    {
      return;
    }
    player.setVar("DCBackCoords", player.getLoc().toXYZString(), -1);
    player.teleToLocation(-114582, -152635, -6742);
  }
View Full Code Here

  /**
   * Method exit_dc.
   */
  public void exit_dc()
  {
    final Player player = getSelf();
    final NpcInstance npc = getNpc();
    if ((player == null) || (npc == null))
    {
      return;
    }
    if (!NpcInstance.canBypassCheck(player, npc))
    {
      return;
    }
    final String var = player.getVar("DCBackCoords");
    if ((var == null) || var.isEmpty())
    {
      player.teleToLocation(new Location(43768, -48232, -800), 0);
      return;
    }
    player.teleToLocation(Location.parseLoc(var), 0);
    player.unsetVar("DCBackCoords");
  }
View Full Code Here

      }
      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

    String htmltext = "noquest";
    if (st == null)
    {
      return htmltext;
    }
    Player player = st.getPlayer();
    QuestState previous = player.getQuestState(_10310_CreationOfTwistedSpiral.class);
    if (npc.getNpcId() == 33031)
    {
      if ((previous == null) || (!previous.isCompleted()) || (player.getLevel() < 90))
      {
        st.exitCurrentQuest(true);
        return "33031-03.htm";
      }
      switch (st.getState())
View Full Code Here

     * Method runImpl.
     */
    @Override
    public void runImpl()
    {
      final SimpleSpawner sp = new SimpleSpawner(_nextId);
      sp.setLocx(_actor.getX());
      sp.setLocy(_actor.getY());
      sp.setLocz(_actor.getZ());
      sp.setReflection(_actor.getReflection());
      final NpcInstance npc = sp.doSpawn(true);
      npc.setHeading(PositionUtils.calculateHeadingFrom(npc, _player));
      npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, _player, 1000);
    }
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

TOP

Related Classes of lineage2.gameserver.data.xml.parser.OptionDataParser

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.