Addition of new AI for Eilhalder von Hellmann.
This commit is contained in:
parent
c56baf703a
commit
a674523af5
85
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/ForestOfTheDead/EilhalderVonHellmann.java
vendored
Normal file
85
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/ForestOfTheDead/EilhalderVonHellmann.java
vendored
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* 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.areas.ForestOfTheDead;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.events.EventType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class EilhalderVonHellmann extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
private static final int EILHALDER_VON_HELLMANN = 25328;
|
||||||
|
private static final Location SPAWN_LOCATION = new Location(59090, -42188, -3003);
|
||||||
|
private static L2Npc npcInstance;
|
||||||
|
|
||||||
|
private EilhalderVonHellmann()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
if (npc != null)
|
||||||
|
{
|
||||||
|
if (npc.isInCombat())
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.deleteMe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
||||||
|
@RegisterType(ListenerRegisterType.GLOBAL)
|
||||||
|
public void onDayNightChange(OnDayNightChange event)
|
||||||
|
{
|
||||||
|
if (!event.isNight() && (npcInstance != null) && !npcInstance.isDead())
|
||||||
|
{
|
||||||
|
if (!npcInstance.isInCombat())
|
||||||
|
{
|
||||||
|
npcInstance.deleteMe();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((npcInstance == null) || npcInstance.isDead())
|
||||||
|
{
|
||||||
|
npcInstance = addSpawn(EILHALDER_VON_HELLMANN, SPAWN_LOCATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new EilhalderVonHellmann();
|
||||||
|
}
|
||||||
|
}
|
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* 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.others.Spawns;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.GameTimeController;
|
|
||||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.events.EventType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public final class EilhalderVonHellmann extends AbstractNpcAI
|
|
||||||
{
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(EilhalderVonHellmann.class.getName());
|
|
||||||
private static final int EILHALDER_VON_HELLMANN = 25328;
|
|
||||||
private NpcSpawnTemplate _template;
|
|
||||||
|
|
||||||
private EilhalderVonHellmann()
|
|
||||||
{
|
|
||||||
addSpawnId(EILHALDER_VON_HELLMANN);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
|
||||||
{
|
|
||||||
if (event.equals("delete") && (npc != null))
|
|
||||||
{
|
|
||||||
npc.deleteMe();
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onSpawn(L2Npc npc)
|
|
||||||
{
|
|
||||||
// Spawn that comes from RaidBossSpawnManager
|
|
||||||
if ((npc.getSpawn() == null) || (npc.getSpawn().getNpcSpawnTemplate() == null))
|
|
||||||
{
|
|
||||||
startQuestTimer("delete", 1000, npc, null);
|
|
||||||
}
|
|
||||||
return super.onSpawn(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Spawning Night Raid Boss " + npc.getName());
|
|
||||||
DBSpawnManager.getInstance().notifySpawnNightNpc(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnDespawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Despawning Night Raid Boss " + npc.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnActivate(SpawnTemplate template)
|
|
||||||
{
|
|
||||||
OUT: for (SpawnGroup group : template.getGroups())
|
|
||||||
{
|
|
||||||
for (NpcSpawnTemplate npc : group.getSpawns())
|
|
||||||
{
|
|
||||||
if (npc.getId() == EILHALDER_VON_HELLMANN)
|
|
||||||
{
|
|
||||||
_template = npc;
|
|
||||||
break OUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleBoss(GameTimeController.getInstance().isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
|
||||||
@RegisterType(ListenerRegisterType.GLOBAL)
|
|
||||||
public void onDayNightChange(OnDayNightChange event)
|
|
||||||
{
|
|
||||||
handleBoss(event.isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param isNight
|
|
||||||
*/
|
|
||||||
private void handleBoss(boolean isNight)
|
|
||||||
{
|
|
||||||
if (_template == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNight)
|
|
||||||
{
|
|
||||||
_template.spawn(null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_template.despawn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new EilhalderVonHellmann();
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,29 +142,6 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</npc>
|
</npc>
|
||||||
</spawn>
|
</spawn>
|
||||||
<spawn name="rune10_mb2116_01m1" ai="ON_DAY_NIGHT_SPAWN">
|
|
||||||
<territories>
|
|
||||||
<territory name="rune10_mb2116_01" minZ="-3060" maxZ="-2810">
|
|
||||||
<node x="60056" y="-42856" />
|
|
||||||
<node x="60254" y="-42112" />
|
|
||||||
<node x="59393" y="-41412" />
|
|
||||||
<node x="58528" y="-42009" />
|
|
||||||
<node x="58969" y="-42638" />
|
|
||||||
</territory>
|
|
||||||
</territories>
|
|
||||||
<parameters>
|
|
||||||
<param name="IsNight" value="1" />
|
|
||||||
</parameters>
|
|
||||||
<npc id="25328" dbSave="true" dbName="raid_boss_von_helman" respawnTime="3hour" respawnRandom="1hour"> <!-- Eilhalder von Hellmann -->
|
|
||||||
<locations>
|
|
||||||
<location x="59331" y="-42403" z="-3003" chance="20" />
|
|
||||||
<location x="59709" y="-42310" z="-3003" chance="20" />
|
|
||||||
<location x="59717" y="-41974" z="-3003" chance="20" />
|
|
||||||
<location x="59333" y="-41858" z="-3003" chance="20" />
|
|
||||||
<location x="59047" y="-42165" z="-3003" chance="20" />
|
|
||||||
</locations>
|
|
||||||
</npc>
|
|
||||||
</spawn>
|
|
||||||
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
||||||
<territories>
|
<territories>
|
||||||
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* 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.areas.ForestOfTheDead;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.events.EventType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class EilhalderVonHellmann extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
private static final int EILHALDER_VON_HELLMANN = 25328;
|
||||||
|
private static final Location SPAWN_LOCATION = new Location(59090, -42188, -3003);
|
||||||
|
private static L2Npc npcInstance;
|
||||||
|
|
||||||
|
private EilhalderVonHellmann()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
if (npc != null)
|
||||||
|
{
|
||||||
|
if (npc.isInCombat())
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.deleteMe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
||||||
|
@RegisterType(ListenerRegisterType.GLOBAL)
|
||||||
|
public void onDayNightChange(OnDayNightChange event)
|
||||||
|
{
|
||||||
|
if (!event.isNight() && (npcInstance != null) && !npcInstance.isDead())
|
||||||
|
{
|
||||||
|
if (!npcInstance.isInCombat())
|
||||||
|
{
|
||||||
|
npcInstance.deleteMe();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((npcInstance == null) || npcInstance.isDead())
|
||||||
|
{
|
||||||
|
npcInstance = addSpawn(EILHALDER_VON_HELLMANN, SPAWN_LOCATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new EilhalderVonHellmann();
|
||||||
|
}
|
||||||
|
}
|
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* 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.others.Spawns;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.GameTimeController;
|
|
||||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.events.EventType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public final class EilhalderVonHellmann extends AbstractNpcAI
|
|
||||||
{
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(EilhalderVonHellmann.class.getName());
|
|
||||||
private static final int EILHALDER_VON_HELLMANN = 25328;
|
|
||||||
private NpcSpawnTemplate _template;
|
|
||||||
|
|
||||||
private EilhalderVonHellmann()
|
|
||||||
{
|
|
||||||
addSpawnId(EILHALDER_VON_HELLMANN);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
|
||||||
{
|
|
||||||
if (event.equals("delete") && (npc != null))
|
|
||||||
{
|
|
||||||
npc.deleteMe();
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onSpawn(L2Npc npc)
|
|
||||||
{
|
|
||||||
// Spawn that comes from RaidBossSpawnManager
|
|
||||||
if ((npc.getSpawn() == null) || (npc.getSpawn().getNpcSpawnTemplate() == null))
|
|
||||||
{
|
|
||||||
startQuestTimer("delete", 1000, npc, null);
|
|
||||||
}
|
|
||||||
return super.onSpawn(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Spawning Night Raid Boss " + npc.getName());
|
|
||||||
DBSpawnManager.getInstance().notifySpawnNightNpc(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnDespawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Despawning Night Raid Boss " + npc.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnActivate(SpawnTemplate template)
|
|
||||||
{
|
|
||||||
OUT: for (SpawnGroup group : template.getGroups())
|
|
||||||
{
|
|
||||||
for (NpcSpawnTemplate npc : group.getSpawns())
|
|
||||||
{
|
|
||||||
if (npc.getId() == EILHALDER_VON_HELLMANN)
|
|
||||||
{
|
|
||||||
_template = npc;
|
|
||||||
break OUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleBoss(GameTimeController.getInstance().isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
|
||||||
@RegisterType(ListenerRegisterType.GLOBAL)
|
|
||||||
public void onDayNightChange(OnDayNightChange event)
|
|
||||||
{
|
|
||||||
handleBoss(event.isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param isNight
|
|
||||||
*/
|
|
||||||
private void handleBoss(boolean isNight)
|
|
||||||
{
|
|
||||||
if (_template == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNight)
|
|
||||||
{
|
|
||||||
_template.spawn(null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_template.despawn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new EilhalderVonHellmann();
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,29 +142,6 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</npc>
|
</npc>
|
||||||
</spawn>
|
</spawn>
|
||||||
<spawn name="rune10_mb2116_01m1" ai="ON_DAY_NIGHT_SPAWN">
|
|
||||||
<territories>
|
|
||||||
<territory name="rune10_mb2116_01" minZ="-3060" maxZ="-2810">
|
|
||||||
<node x="60056" y="-42856" />
|
|
||||||
<node x="60254" y="-42112" />
|
|
||||||
<node x="59393" y="-41412" />
|
|
||||||
<node x="58528" y="-42009" />
|
|
||||||
<node x="58969" y="-42638" />
|
|
||||||
</territory>
|
|
||||||
</territories>
|
|
||||||
<parameters>
|
|
||||||
<param name="IsNight" value="1" />
|
|
||||||
</parameters>
|
|
||||||
<npc id="25328" dbSave="true" dbName="raid_boss_von_helman" respawnTime="3hour" respawnRandom="1hour"> <!-- Eilhalder von Hellmann -->
|
|
||||||
<locations>
|
|
||||||
<location x="59331" y="-42403" z="-3003" chance="20" />
|
|
||||||
<location x="59709" y="-42310" z="-3003" chance="20" />
|
|
||||||
<location x="59717" y="-41974" z="-3003" chance="20" />
|
|
||||||
<location x="59333" y="-41858" z="-3003" chance="20" />
|
|
||||||
<location x="59047" y="-42165" z="-3003" chance="20" />
|
|
||||||
</locations>
|
|
||||||
</npc>
|
|
||||||
</spawn>
|
|
||||||
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
||||||
<territories>
|
<territories>
|
||||||
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
||||||
|
85
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/ForestOfTheDead/EilhalderVonHellmann.java
vendored
Normal file
85
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/ForestOfTheDead/EilhalderVonHellmann.java
vendored
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* 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.areas.ForestOfTheDead;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.events.EventType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class EilhalderVonHellmann extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
private static final int EILHALDER_VON_HELLMANN = 25328;
|
||||||
|
private static final Location SPAWN_LOCATION = new Location(59090, -42188, -3003);
|
||||||
|
private static L2Npc npcInstance;
|
||||||
|
|
||||||
|
private EilhalderVonHellmann()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
if (npc != null)
|
||||||
|
{
|
||||||
|
if (npc.isInCombat())
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.deleteMe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
||||||
|
@RegisterType(ListenerRegisterType.GLOBAL)
|
||||||
|
public void onDayNightChange(OnDayNightChange event)
|
||||||
|
{
|
||||||
|
if (!event.isNight() && (npcInstance != null) && !npcInstance.isDead())
|
||||||
|
{
|
||||||
|
if (!npcInstance.isInCombat())
|
||||||
|
{
|
||||||
|
npcInstance.deleteMe();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((npcInstance == null) || npcInstance.isDead())
|
||||||
|
{
|
||||||
|
npcInstance = addSpawn(EILHALDER_VON_HELLMANN, SPAWN_LOCATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new EilhalderVonHellmann();
|
||||||
|
}
|
||||||
|
}
|
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* 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.others.Spawns;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.GameTimeController;
|
|
||||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.events.EventType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public final class EilhalderVonHellmann extends AbstractNpcAI
|
|
||||||
{
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(EilhalderVonHellmann.class.getName());
|
|
||||||
private static final int EILHALDER_VON_HELLMANN = 25328;
|
|
||||||
private NpcSpawnTemplate _template;
|
|
||||||
|
|
||||||
private EilhalderVonHellmann()
|
|
||||||
{
|
|
||||||
addSpawnId(EILHALDER_VON_HELLMANN);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
|
||||||
{
|
|
||||||
if (event.equals("delete") && (npc != null))
|
|
||||||
{
|
|
||||||
npc.deleteMe();
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onSpawn(L2Npc npc)
|
|
||||||
{
|
|
||||||
// Spawn that comes from RaidBossSpawnManager
|
|
||||||
if ((npc.getSpawn() == null) || (npc.getSpawn().getNpcSpawnTemplate() == null))
|
|
||||||
{
|
|
||||||
startQuestTimer("delete", 1000, npc, null);
|
|
||||||
}
|
|
||||||
return super.onSpawn(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Spawning Night Raid Boss " + npc.getName());
|
|
||||||
DBSpawnManager.getInstance().notifySpawnNightNpc(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnDespawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Despawning Night Raid Boss " + npc.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnActivate(SpawnTemplate template)
|
|
||||||
{
|
|
||||||
OUT: for (SpawnGroup group : template.getGroups())
|
|
||||||
{
|
|
||||||
for (NpcSpawnTemplate npc : group.getSpawns())
|
|
||||||
{
|
|
||||||
if (npc.getId() == EILHALDER_VON_HELLMANN)
|
|
||||||
{
|
|
||||||
_template = npc;
|
|
||||||
break OUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleBoss(GameTimeController.getInstance().isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
|
||||||
@RegisterType(ListenerRegisterType.GLOBAL)
|
|
||||||
public void onDayNightChange(OnDayNightChange event)
|
|
||||||
{
|
|
||||||
handleBoss(event.isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param isNight
|
|
||||||
*/
|
|
||||||
private void handleBoss(boolean isNight)
|
|
||||||
{
|
|
||||||
if (_template == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNight)
|
|
||||||
{
|
|
||||||
_template.spawn(null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_template.despawn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new EilhalderVonHellmann();
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,29 +142,6 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</npc>
|
</npc>
|
||||||
</spawn>
|
</spawn>
|
||||||
<spawn name="rune10_mb2116_01m1" ai="ON_DAY_NIGHT_SPAWN">
|
|
||||||
<territories>
|
|
||||||
<territory name="rune10_mb2116_01" minZ="-3060" maxZ="-2810">
|
|
||||||
<node x="60056" y="-42856" />
|
|
||||||
<node x="60254" y="-42112" />
|
|
||||||
<node x="59393" y="-41412" />
|
|
||||||
<node x="58528" y="-42009" />
|
|
||||||
<node x="58969" y="-42638" />
|
|
||||||
</territory>
|
|
||||||
</territories>
|
|
||||||
<parameters>
|
|
||||||
<param name="IsNight" value="1" />
|
|
||||||
</parameters>
|
|
||||||
<npc id="25328" dbSave="true" dbName="raid_boss_von_helman" respawnTime="3hour" respawnRandom="1hour"> <!-- Eilhalder von Hellmann -->
|
|
||||||
<locations>
|
|
||||||
<location x="59331" y="-42403" z="-3003" chance="20" />
|
|
||||||
<location x="59709" y="-42310" z="-3003" chance="20" />
|
|
||||||
<location x="59717" y="-41974" z="-3003" chance="20" />
|
|
||||||
<location x="59333" y="-41858" z="-3003" chance="20" />
|
|
||||||
<location x="59047" y="-42165" z="-3003" chance="20" />
|
|
||||||
</locations>
|
|
||||||
</npc>
|
|
||||||
</spawn>
|
|
||||||
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
||||||
<territories>
|
<territories>
|
||||||
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* 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.areas.ForestOfTheDead;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.events.EventType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class EilhalderVonHellmann extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
private static final int EILHALDER_VON_HELLMANN = 25328;
|
||||||
|
private static final Location SPAWN_LOCATION = new Location(59090, -42188, -3003);
|
||||||
|
private static L2Npc npcInstance;
|
||||||
|
|
||||||
|
private EilhalderVonHellmann()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
if (npc != null)
|
||||||
|
{
|
||||||
|
if (npc.isInCombat())
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.deleteMe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
||||||
|
@RegisterType(ListenerRegisterType.GLOBAL)
|
||||||
|
public void onDayNightChange(OnDayNightChange event)
|
||||||
|
{
|
||||||
|
if (!event.isNight() && (npcInstance != null) && !npcInstance.isDead())
|
||||||
|
{
|
||||||
|
if (!npcInstance.isInCombat())
|
||||||
|
{
|
||||||
|
npcInstance.deleteMe();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((npcInstance == null) || npcInstance.isDead())
|
||||||
|
{
|
||||||
|
npcInstance = addSpawn(EILHALDER_VON_HELLMANN, SPAWN_LOCATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new EilhalderVonHellmann();
|
||||||
|
}
|
||||||
|
}
|
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* 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.others.Spawns;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.GameTimeController;
|
|
||||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.events.EventType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public final class EilhalderVonHellmann extends AbstractNpcAI
|
|
||||||
{
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(EilhalderVonHellmann.class.getName());
|
|
||||||
private static final int EILHALDER_VON_HELLMANN = 25328;
|
|
||||||
private NpcSpawnTemplate _template;
|
|
||||||
|
|
||||||
private EilhalderVonHellmann()
|
|
||||||
{
|
|
||||||
addSpawnId(EILHALDER_VON_HELLMANN);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
|
||||||
{
|
|
||||||
if (event.equals("delete") && (npc != null))
|
|
||||||
{
|
|
||||||
npc.deleteMe();
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onSpawn(L2Npc npc)
|
|
||||||
{
|
|
||||||
// Spawn that comes from RaidBossSpawnManager
|
|
||||||
if ((npc.getSpawn() == null) || (npc.getSpawn().getNpcSpawnTemplate() == null))
|
|
||||||
{
|
|
||||||
startQuestTimer("delete", 1000, npc, null);
|
|
||||||
}
|
|
||||||
return super.onSpawn(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Spawning Night Raid Boss " + npc.getName());
|
|
||||||
DBSpawnManager.getInstance().notifySpawnNightNpc(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnDespawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Despawning Night Raid Boss " + npc.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnActivate(SpawnTemplate template)
|
|
||||||
{
|
|
||||||
OUT: for (SpawnGroup group : template.getGroups())
|
|
||||||
{
|
|
||||||
for (NpcSpawnTemplate npc : group.getSpawns())
|
|
||||||
{
|
|
||||||
if (npc.getId() == EILHALDER_VON_HELLMANN)
|
|
||||||
{
|
|
||||||
_template = npc;
|
|
||||||
break OUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleBoss(GameTimeController.getInstance().isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
|
||||||
@RegisterType(ListenerRegisterType.GLOBAL)
|
|
||||||
public void onDayNightChange(OnDayNightChange event)
|
|
||||||
{
|
|
||||||
handleBoss(event.isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param isNight
|
|
||||||
*/
|
|
||||||
private void handleBoss(boolean isNight)
|
|
||||||
{
|
|
||||||
if (_template == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNight)
|
|
||||||
{
|
|
||||||
_template.spawn(null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_template.despawn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new EilhalderVonHellmann();
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,29 +142,6 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</npc>
|
</npc>
|
||||||
</spawn>
|
</spawn>
|
||||||
<spawn name="rune10_mb2116_01m1" ai="ON_DAY_NIGHT_SPAWN">
|
|
||||||
<territories>
|
|
||||||
<territory name="rune10_mb2116_01" minZ="-3060" maxZ="-2810">
|
|
||||||
<node x="60056" y="-42856" />
|
|
||||||
<node x="60254" y="-42112" />
|
|
||||||
<node x="59393" y="-41412" />
|
|
||||||
<node x="58528" y="-42009" />
|
|
||||||
<node x="58969" y="-42638" />
|
|
||||||
</territory>
|
|
||||||
</territories>
|
|
||||||
<parameters>
|
|
||||||
<param name="IsNight" value="1" />
|
|
||||||
</parameters>
|
|
||||||
<npc id="25328" dbSave="true" dbName="raid_boss_von_helman" respawnTime="3hour" respawnRandom="1hour"> <!-- Eilhalder von Hellmann -->
|
|
||||||
<locations>
|
|
||||||
<location x="59331" y="-42403" z="-3003" chance="20" />
|
|
||||||
<location x="59709" y="-42310" z="-3003" chance="20" />
|
|
||||||
<location x="59717" y="-41974" z="-3003" chance="20" />
|
|
||||||
<location x="59333" y="-41858" z="-3003" chance="20" />
|
|
||||||
<location x="59047" y="-42165" z="-3003" chance="20" />
|
|
||||||
</locations>
|
|
||||||
</npc>
|
|
||||||
</spawn>
|
|
||||||
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
||||||
<territories>
|
<territories>
|
||||||
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* 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.areas.ForestOfTheDead;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.events.EventType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class EilhalderVonHellmann extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
private static final int EILHALDER_VON_HELLMANN = 25328;
|
||||||
|
private static final Location SPAWN_LOCATION = new Location(59090, -42188, -3003);
|
||||||
|
private static L2Npc npcInstance;
|
||||||
|
|
||||||
|
private EilhalderVonHellmann()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
if (npc != null)
|
||||||
|
{
|
||||||
|
if (npc.isInCombat())
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.deleteMe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
||||||
|
@RegisterType(ListenerRegisterType.GLOBAL)
|
||||||
|
public void onDayNightChange(OnDayNightChange event)
|
||||||
|
{
|
||||||
|
if (!event.isNight() && (npcInstance != null) && !npcInstance.isDead())
|
||||||
|
{
|
||||||
|
if (!npcInstance.isInCombat())
|
||||||
|
{
|
||||||
|
npcInstance.deleteMe();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((npcInstance == null) || npcInstance.isDead())
|
||||||
|
{
|
||||||
|
npcInstance = addSpawn(EILHALDER_VON_HELLMANN, SPAWN_LOCATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new EilhalderVonHellmann();
|
||||||
|
}
|
||||||
|
}
|
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* 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.others.Spawns;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.GameTimeController;
|
|
||||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.events.EventType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public final class EilhalderVonHellmann extends AbstractNpcAI
|
|
||||||
{
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(EilhalderVonHellmann.class.getName());
|
|
||||||
private static final int EILHALDER_VON_HELLMANN = 25328;
|
|
||||||
private NpcSpawnTemplate _template;
|
|
||||||
|
|
||||||
private EilhalderVonHellmann()
|
|
||||||
{
|
|
||||||
addSpawnId(EILHALDER_VON_HELLMANN);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
|
||||||
{
|
|
||||||
if (event.equals("delete") && (npc != null))
|
|
||||||
{
|
|
||||||
npc.deleteMe();
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onSpawn(L2Npc npc)
|
|
||||||
{
|
|
||||||
// Spawn that comes from RaidBossSpawnManager
|
|
||||||
if ((npc.getSpawn() == null) || (npc.getSpawn().getNpcSpawnTemplate() == null))
|
|
||||||
{
|
|
||||||
startQuestTimer("delete", 1000, npc, null);
|
|
||||||
}
|
|
||||||
return super.onSpawn(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Spawning Night Raid Boss " + npc.getName());
|
|
||||||
DBSpawnManager.getInstance().notifySpawnNightNpc(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnDespawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Despawning Night Raid Boss " + npc.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnActivate(SpawnTemplate template)
|
|
||||||
{
|
|
||||||
OUT: for (SpawnGroup group : template.getGroups())
|
|
||||||
{
|
|
||||||
for (NpcSpawnTemplate npc : group.getSpawns())
|
|
||||||
{
|
|
||||||
if (npc.getId() == EILHALDER_VON_HELLMANN)
|
|
||||||
{
|
|
||||||
_template = npc;
|
|
||||||
break OUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleBoss(GameTimeController.getInstance().isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
|
||||||
@RegisterType(ListenerRegisterType.GLOBAL)
|
|
||||||
public void onDayNightChange(OnDayNightChange event)
|
|
||||||
{
|
|
||||||
handleBoss(event.isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param isNight
|
|
||||||
*/
|
|
||||||
private void handleBoss(boolean isNight)
|
|
||||||
{
|
|
||||||
if (_template == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNight)
|
|
||||||
{
|
|
||||||
_template.spawn(null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_template.despawn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new EilhalderVonHellmann();
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,29 +142,6 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</npc>
|
</npc>
|
||||||
</spawn>
|
</spawn>
|
||||||
<spawn name="rune10_mb2116_01m1" ai="ON_DAY_NIGHT_SPAWN">
|
|
||||||
<territories>
|
|
||||||
<territory name="rune10_mb2116_01" minZ="-3060" maxZ="-2810">
|
|
||||||
<node x="60056" y="-42856" />
|
|
||||||
<node x="60254" y="-42112" />
|
|
||||||
<node x="59393" y="-41412" />
|
|
||||||
<node x="58528" y="-42009" />
|
|
||||||
<node x="58969" y="-42638" />
|
|
||||||
</territory>
|
|
||||||
</territories>
|
|
||||||
<parameters>
|
|
||||||
<param name="IsNight" value="1" />
|
|
||||||
</parameters>
|
|
||||||
<npc id="25328" dbSave="true" dbName="raid_boss_von_helman" respawnTime="3hour" respawnRandom="1hour"> <!-- Eilhalder von Hellmann -->
|
|
||||||
<locations>
|
|
||||||
<location x="59331" y="-42403" z="-3003" chance="20" />
|
|
||||||
<location x="59709" y="-42310" z="-3003" chance="20" />
|
|
||||||
<location x="59717" y="-41974" z="-3003" chance="20" />
|
|
||||||
<location x="59333" y="-41858" z="-3003" chance="20" />
|
|
||||||
<location x="59047" y="-42165" z="-3003" chance="20" />
|
|
||||||
</locations>
|
|
||||||
</npc>
|
|
||||||
</spawn>
|
|
||||||
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
||||||
<territories>
|
<territories>
|
||||||
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* 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.areas.ForestOfTheDead;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.events.EventType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||||
|
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||||
|
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
||||||
|
|
||||||
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public final class EilhalderVonHellmann extends AbstractNpcAI
|
||||||
|
{
|
||||||
|
private static final int EILHALDER_VON_HELLMANN = 25328;
|
||||||
|
private static final Location SPAWN_LOCATION = new Location(59090, -42188, -3003);
|
||||||
|
private static L2Npc npcInstance;
|
||||||
|
|
||||||
|
private EilhalderVonHellmann()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
|
{
|
||||||
|
if (npc != null)
|
||||||
|
{
|
||||||
|
if (npc.isInCombat())
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.deleteMe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
||||||
|
@RegisterType(ListenerRegisterType.GLOBAL)
|
||||||
|
public void onDayNightChange(OnDayNightChange event)
|
||||||
|
{
|
||||||
|
if (!event.isNight() && (npcInstance != null) && !npcInstance.isDead())
|
||||||
|
{
|
||||||
|
if (!npcInstance.isInCombat())
|
||||||
|
{
|
||||||
|
npcInstance.deleteMe();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startQuestTimer("despawn", 30000, npcInstance, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((npcInstance == null) || npcInstance.isDead())
|
||||||
|
{
|
||||||
|
npcInstance = addSpawn(EILHALDER_VON_HELLMANN, SPAWN_LOCATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
new EilhalderVonHellmann();
|
||||||
|
}
|
||||||
|
}
|
@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* 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.others.Spawns;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.GameTimeController;
|
|
||||||
import com.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.events.EventType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
|
||||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
|
||||||
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
|
||||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author UnAfraid
|
|
||||||
*/
|
|
||||||
public final class EilhalderVonHellmann extends AbstractNpcAI
|
|
||||||
{
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(EilhalderVonHellmann.class.getName());
|
|
||||||
private static final int EILHALDER_VON_HELLMANN = 25328;
|
|
||||||
private NpcSpawnTemplate _template;
|
|
||||||
|
|
||||||
private EilhalderVonHellmann()
|
|
||||||
{
|
|
||||||
addSpawnId(EILHALDER_VON_HELLMANN);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
|
||||||
{
|
|
||||||
if (event.equals("delete") && (npc != null))
|
|
||||||
{
|
|
||||||
npc.deleteMe();
|
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onSpawn(L2Npc npc)
|
|
||||||
{
|
|
||||||
// Spawn that comes from RaidBossSpawnManager
|
|
||||||
if ((npc.getSpawn() == null) || (npc.getSpawn().getNpcSpawnTemplate() == null))
|
|
||||||
{
|
|
||||||
startQuestTimer("delete", 1000, npc, null);
|
|
||||||
}
|
|
||||||
return super.onSpawn(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Spawning Night Raid Boss " + npc.getName());
|
|
||||||
DBSpawnManager.getInstance().notifySpawnNightNpc(npc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnDespawnNpc(SpawnTemplate template, SpawnGroup group, L2Npc npc)
|
|
||||||
{
|
|
||||||
LOGGER.info("Despawning Night Raid Boss " + npc.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpawnActivate(SpawnTemplate template)
|
|
||||||
{
|
|
||||||
OUT: for (SpawnGroup group : template.getGroups())
|
|
||||||
{
|
|
||||||
for (NpcSpawnTemplate npc : group.getSpawns())
|
|
||||||
{
|
|
||||||
if (npc.getId() == EILHALDER_VON_HELLMANN)
|
|
||||||
{
|
|
||||||
_template = npc;
|
|
||||||
break OUT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleBoss(GameTimeController.getInstance().isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RegisterEvent(EventType.ON_DAY_NIGHT_CHANGE)
|
|
||||||
@RegisterType(ListenerRegisterType.GLOBAL)
|
|
||||||
public void onDayNightChange(OnDayNightChange event)
|
|
||||||
{
|
|
||||||
handleBoss(event.isNight());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param isNight
|
|
||||||
*/
|
|
||||||
private void handleBoss(boolean isNight)
|
|
||||||
{
|
|
||||||
if (_template == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNight)
|
|
||||||
{
|
|
||||||
_template.spawn(null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_template.despawn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
new EilhalderVonHellmann();
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,29 +142,6 @@
|
|||||||
</parameters>
|
</parameters>
|
||||||
</npc>
|
</npc>
|
||||||
</spawn>
|
</spawn>
|
||||||
<spawn name="rune10_mb2116_01m1" ai="ON_DAY_NIGHT_SPAWN">
|
|
||||||
<territories>
|
|
||||||
<territory name="rune10_mb2116_01" minZ="-3060" maxZ="-2810">
|
|
||||||
<node x="60056" y="-42856" />
|
|
||||||
<node x="60254" y="-42112" />
|
|
||||||
<node x="59393" y="-41412" />
|
|
||||||
<node x="58528" y="-42009" />
|
|
||||||
<node x="58969" y="-42638" />
|
|
||||||
</territory>
|
|
||||||
</territories>
|
|
||||||
<parameters>
|
|
||||||
<param name="IsNight" value="1" />
|
|
||||||
</parameters>
|
|
||||||
<npc id="25328" dbSave="true" dbName="raid_boss_von_helman" respawnTime="3hour" respawnRandom="1hour"> <!-- Eilhalder von Hellmann -->
|
|
||||||
<locations>
|
|
||||||
<location x="59331" y="-42403" z="-3003" chance="20" />
|
|
||||||
<location x="59709" y="-42310" z="-3003" chance="20" />
|
|
||||||
<location x="59717" y="-41974" z="-3003" chance="20" />
|
|
||||||
<location x="59333" y="-41858" z="-3003" chance="20" />
|
|
||||||
<location x="59047" y="-42165" z="-3003" chance="20" />
|
|
||||||
</locations>
|
|
||||||
</npc>
|
|
||||||
</spawn>
|
|
||||||
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
<spawn name="schuttgart11_mb2313_01m1" ai="DEFAULT_USE_DB_MAKER">
|
||||||
<territories>
|
<territories>
|
||||||
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
<territory name="schuttgart11_mb2313_01" minZ="-1716" maxZ="-1016">
|
||||||
|
Loading…
Reference in New Issue
Block a user