Package ai

Source Code of ai.Hallate

package ai;

import l2p.gameserver.ai.Fighter;
import l2p.gameserver.model.L2Character;
import l2p.gameserver.model.instances.L2NpcInstance;

/**
* AI для РБ Hallate.
* Если Z координаты меньше или больше предназначеных, телепортируется обратно и восстанавливает HP.
*/
public class Hallate extends Fighter
{
  private static final int z1 = -2150;
  private static final int z2 = -1650;

  public Hallate(L2Character actor)
  {
    super(actor);
    AI_TASK_DELAY = 1000;
    AI_TASK_ACTIVE_DELAY = 1000;
  }

  @Override
  protected void onEvtAttacked(L2Character attacker, int damage)
  {
    L2NpcInstance actor = getActor();
    int z = actor.getZ();
    if(z > z2 || z < z1)
    {
      actor.teleToLocation(113548, 17061, -2125);
      actor.setCurrentHp(actor.getMaxHp(), false);
    }
    super.onEvtAttacked(attacker, damage);
  }
}
TOP

Related Classes of ai.Hallate

TOP
Copyright © 2018 www.massapi.com. 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.