Package com.l2jfrozen.gameserver.model.quest

Examples of com.l2jfrozen.gameserver.model.quest.QuestTimer


            FastList.recycle(result);
            return null;
        }

        Object[] characters = result.toArray();
        QuestTimer timer = getQuestTimer("clean_player", npc, null);
        if (timer != null)
            timer.cancel();
        startQuestTimer("clean_player", 20000, npc, null);
        L2Character target = (L2Character) characters[Rnd.get(characters.length)];
        FastList.recycle(result);
        return target;
View Full Code Here


      callSkillAI(npc, c2, skill);
  }
 
  public void callSkillAI(L2NpcInstance npc, L2Character c2, L2Skill skill)
  {
    QuestTimer timer = getQuestTimer("launch_random_skill", npc, null);
   
    if (npc == null)
    {
      if (timer != null)
        timer.cancel();
      return;
    }
   
    if (npc.isInvul())
      return;
   
    if (c2 == null || c2.isDead() || timer == null)
    {
      c2 = getRandomTarget(npc); // just in case if hate AI fail
      if (timer == null)
      {
        startQuestTimer("launch_random_skill", 500, npc, null, true);
        return;
      }
    }
    L2Character target = c2;
    if (target == null || target.isDead())
    {
      return;
    }
   
    if (Util.checkIfInRange(skill.getCastRange(), npc, target, true))
    {
      timer.cancel();
      npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
      //npc.setIsCastingNow(true);
      npc.setTarget(target);
      npc.doCast(skill);
     
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.quest.QuestTimer

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.