/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai;
import lineage2.gameserver.ai.DefaultAI;
import lineage2.gameserver.model.Player;
import lineage2.gameserver.model.World;
import lineage2.gameserver.model.instances.NpcInstance;
import lineage2.gameserver.utils.Location;
/**
* @author Mobius
* @version $Revision: 1.0 $
*/
public class TeleportArkan extends DefaultAI
{
/**
* Constructor for TeleportArkan.
* @param actor NpcInstance
*/
public TeleportArkan(NpcInstance actor)
{
super(actor);
AI_TASK_ACTIVE_DELAY = 1000;
}
/**
* Method thinkActive.
* @return boolean
*/
@Override
protected boolean thinkActive()
{
final NpcInstance actor = getActor();
if (actor == null)
{
return true;
}
for (Player player : World.getAroundPlayers(actor, 200, 200))
{
if (player != null)
{
player.teleToLocation(new Location(207559, 86429, -1000));
}
}
return true;
}
/**
* Method isGlobalAI.
* @return boolean
*/
@Override
public boolean isGlobalAI()
{
return true;
}
}