Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player$SummonSkillCastingTask


      }
      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

     * @see lineage2.gameserver.listener.zone.OnZoneEnterLeaveListener#onZoneEnter(Zone, Creature)
     */
    @Override
    public void onZoneEnter(Zone zone, Creature cha)
    {
      Player player = cha.getPlayer();
      if (player == null)
      {
        return;
      }
      if (zone.isActive())
      {
        if (zone.getName().equalsIgnoreCase("[tully1]"))
        {
          player.teleToLocation(TullyFloor2LocationPoint);
        }
        else if (zone.getName().equalsIgnoreCase("[tully2]"))
        {
          player.teleToLocation(TullyFloor4LocationPoint);
        }
        else if (zone.getName().equalsIgnoreCase("[tully3]"))
        {
          player.teleToLocation(TullyFloor3LocationPoint);
        }
        else if (zone.getName().equalsIgnoreCase("[tully4]"))
        {
          player.teleToLocation(TullyFloor5LocationPoint);
        }
      }
    }
View Full Code Here

    @Override
    public void onZoneEnter(Zone zone, Creature cha)
    {
      if (cha.isPlayer())
      {
        Player player = cha.getPlayer();
        if (!player.getVarB("@roe_present_video"))
        {
          player.showQuestMovie(SceneMovie.si_illusion_03_que);
          player.setVar("@roe_present_video", "true", -1);
        }
      }
    }
View Full Code Here

  }
 
  @Override
  public String onKill(NpcInstance npc, QuestState st)
  {
    Player player = st.getRandomPartyMember(STARTED, Config.ALT_PARTY_DISTRIBUTION_RANGE);
    if (st.getState() != STARTED)
    {
      return null;
    }
    if (player != null)
    {
      QuestState sts = player.getQuestState(st.getQuest().getName());
      if ((sts != null) && Rnd.chance(EVIL_WEAPON_CHANCE))
      {
        st.giveItems(EVIL_WEAPON, 1);
        st.playSound(SOUND_ITEMGET);
      }
View Full Code Here

     * @see lineage2.gameserver.listener.zone.OnZoneEnterLeaveListener#onZoneEnter(Zone, Creature)
     */
    @Override
    public void onZoneEnter(Zone zone, Creature cha)
    {
      Player player = cha.getPlayer();
      if ((player == null) || (zone.getParams() == null))
      {
        return;
      }
      String[] params;
      int reuse = zone.getParams().getInteger("reuse");
      int despawn = zone.getParams().getInteger("despawn", 5 * 60);
      boolean attackOnSpawn = zone.getParams().getBool("attackOnSpawn", true);
      long currentMillis = System.currentTimeMillis();
      long nextReuse = zone.getParams().getLong("nextReuse", currentMillis);
      if (nextReuse > currentMillis)
      {
        return;
      }
      zone.getParams().set("nextReuse", currentMillis + (reuse * 1000L));
      String[] groups = zone.getParams().getString("monsters").split(";");
      RndSelector<int[]> rnd = new RndSelector<>();
      for (String group : groups)
      {
        params = group.split(":");
        int chance = Integer.parseInt(params[0]);
        params = params[1].split(",");
        int[] mobs = new int[params.length];
        for (int j = 0; j < params.length; j++)
        {
          mobs[j] = Integer.parseInt(params[j]);
        }
        rnd.add(mobs, chance);
      }
      int[] mobs = rnd.chance();
      for (int npcId : mobs)
      {
        try
        {
          SimpleSpawner spawn = new SimpleSpawner(npcId);
          spawn.setTerritory(zone.getTerritory());
          spawn.setAmount(1);
          spawn.setReflection(player.getReflection());
          spawn.stopRespawn();
          NpcInstance mob = spawn.doSpawn(true);
          if (mob != null)
          {
            ThreadPoolManager.getInstance().schedule(new UnSpawnTask(spawn), despawn * 1000L);
 
View Full Code Here

    {
      if (_startLaunched)
      {
        return;
      }
      Player player = cha.getPlayer();
      if ((player == null) || (!cha.isPlayer()))
      {
        return;
      }
      ThreadPoolManager.getInstance().schedule(new StartKartiaParty90(), 30000L);
View Full Code Here

 
  @Override
  public String onEvent(String event, QuestState st, NpcInstance npc)
  {
    String htmltext = event;
    Player player = st.getPlayer();
    if (event.equalsIgnoreCase("30839-02.htm") || event.equalsIgnoreCase("31307-02.htm"))
    {
      st.setCond(1);
      st.setState(STARTED);
      st.playSound(SOUND_ACCEPT);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Player$SummonSkillCastingTask

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.