package net.sf.l2j.gameserver.scripting.scripts.ai.group;
import net.sf.l2j.gameserver.model.actor.Attackable;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.scripting.EventType;
import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript;
/**
* @author Reborn12
*
*/
public class PartyZonePolymorph extends L2AttackableAIScript
{
private static final int[] MONSTER_IDS =
{
1009, //Stage 1 spawn
1010, //Stage 2 spawn
1011, //Stage 3 spawn
};
public PartyZonePolymorph()
{
super("ai/group");
}
@Override
protected void registerNpcs()
{
addEventIds(MONSTER_IDS, EventType.ON_KILL);
}
@Override
public String onKill(Npc npc, Player killer, boolean isPet)
{
switch (npc.getNpcId())
{
case 1009:
{
final Attackable newNpc = (Attackable) addSpawn(1010, npc, true, 0, false);
attack(newNpc, killer);
break;
}
case 1010:
{
final Attackable newNpc = (Attackable) addSpawn(1011, npc, true, 0, false);
attack(newNpc, killer);
break;
}
}
return super.onKill(npc, killer, isPet);
}
}