Basic AI for Helios.
This commit is contained in:
@ -24,4 +24,5 @@ INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`
|
||||
(29118, 0, 0, 0, 0, 4109288, 1220547), -- Beleth
|
||||
(25286, 185080, -12613, -5499, 16550, 556345880, 86847), -- Anakim
|
||||
(25283, 185062, -9605, -5499, 15640, 486021997, 79600), -- Lilith
|
||||
(26124, 0, 0, 0, 0, 13945521, 50920); -- Kelbim
|
||||
(26124, 0, 0, 0, 0, 13945521, 50920), -- Kelbim
|
||||
(29305, 0, 0, 0, 0, 589355368, 51696); -- Helios
|
||||
|
@ -182,4 +182,23 @@ LindviorMinPlayers = 49
|
||||
LindviorMaxPlayers = 112
|
||||
|
||||
# Minimum players Level for enter to Lindvior. Retail: 99
|
||||
LindviorMinPlayerLvl = 99
|
||||
LindviorMinPlayerLvl = 99
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Helios
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Delay of appearance time of Helios. Value is minute. Range 3-60
|
||||
HeliosWaitTime = 10
|
||||
|
||||
# Interval time of Helios. Value is hour. Range 1-480
|
||||
IntervalOfHeliosSpawn = 264
|
||||
|
||||
# Random interval. Range 1-192
|
||||
RandomOfHeliosSpawn = 72
|
||||
|
||||
# Minimal count of players for enter to Helios. Retail: 70
|
||||
HeliosMinPlayers = 70
|
||||
|
||||
# Minimum players Level for enter to Helios. Retail: 102
|
||||
HeliosMinPlayerLvl = 99
|
||||
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-03.html
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-03.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Hierarch Kekropus:<br>
|
||||
There is an attack upon Superion Fortress!<br>
|
||||
At this time it's impossible to enter.
|
||||
</body></html>
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-04.html
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Giran/Kekropus/34222-04.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Hierarch Kekropus:<br>
|
||||
Helios? You're too late, friend.<br>
|
||||
A group of warriors drove him off not long ago.
|
||||
</body></html>
|
@ -18,14 +18,19 @@ package ai.areas.Giran.Kekropus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jmobius.gameserver.model.L2Party;
|
||||
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.quest.Quest;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
import ai.bosses.Helios.Helios;
|
||||
|
||||
/**
|
||||
* Kekropus AI
|
||||
@ -33,14 +38,15 @@ import ai.AbstractNpcAI;
|
||||
*/
|
||||
public final class Kekropus extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
// NPCs
|
||||
private static final int KEKROPUS = 34222;
|
||||
private static final int HELIOS = 29305;
|
||||
// Teleports
|
||||
private static final Location TELEPORT = new Location(79827, 152588, 2304);
|
||||
private static final Location ENTER_LOC = new Location(79313, 153617, 2307);
|
||||
// Config
|
||||
private static final int HELIOS_MIN_PLAYER = 70;
|
||||
private static final int HELIOS_MIN_PLAYER_LVL = 102;
|
||||
private static final Location NORMAL_TELEPORT = new Location(79827, 152588, 2304);
|
||||
private static final Location RAID_ENTER_LOC = new Location(79313, 153617, 2307);
|
||||
// Status
|
||||
private static final int ALIVE = 0;
|
||||
private static final int DEAD = 3;
|
||||
|
||||
private Kekropus()
|
||||
{
|
||||
@ -57,56 +63,73 @@ public final class Kekropus extends AbstractNpcAI
|
||||
{
|
||||
case "teleport":
|
||||
{
|
||||
player.teleToLocation(TELEPORT);
|
||||
player.teleToLocation(NORMAL_TELEPORT);
|
||||
break;
|
||||
}
|
||||
case "helios":
|
||||
{
|
||||
if (!player.isInParty())
|
||||
if (player.isGM())
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||
packet.replace("%min%", Integer.toString(HELIOS_MIN_PLAYER));
|
||||
packet.replace("%minlvl%", Integer.toString(HELIOS_MIN_PLAYER_LVL));
|
||||
player.sendPacket(packet);
|
||||
return null;
|
||||
player.teleToLocation(RAID_ENTER_LOC, true);
|
||||
}
|
||||
final L2Party party = player.getParty();
|
||||
final boolean isInCC = party.isInCommandChannel();
|
||||
final List<L2PcInstance> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||
final boolean isPartyLeader = (isInCC) ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
|
||||
if (!isPartyLeader)
|
||||
else
|
||||
{
|
||||
return "34222-02.html";
|
||||
}
|
||||
if (members.size() < HELIOS_MIN_PLAYER)
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||
packet.replace("%min%", Integer.toString(HELIOS_MIN_PLAYER));
|
||||
packet.replace("%minlvl%", Integer.toString(HELIOS_MIN_PLAYER_LVL));
|
||||
player.sendPacket(packet);
|
||||
return null;
|
||||
}
|
||||
for (L2PcInstance member : members)
|
||||
{
|
||||
if (member.getLevel() < HELIOS_MIN_PLAYER_LVL)
|
||||
final int status = GrandBossManager.getInstance().getBossStatus(HELIOS);
|
||||
if ((status > ALIVE) && (status < DEAD))
|
||||
{
|
||||
return "34222-03.html";
|
||||
}
|
||||
if (status == DEAD)
|
||||
{
|
||||
return "34222-04.html";
|
||||
}
|
||||
if (!player.isInParty())
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||
packet.replace("%min%", Integer.toString(HELIOS_MIN_PLAYER));
|
||||
packet.replace("%minlvl%", Integer.toString(HELIOS_MIN_PLAYER_LVL));
|
||||
packet.replace("%min%", Integer.toString(Config.HELIOS_MIN_PLAYER));
|
||||
packet.replace("%minlvl%", Integer.toString(Config.HELIOS_MIN_PLAYER_LVL));
|
||||
player.sendPacket(packet);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
for (L2PcInstance member : members)
|
||||
{
|
||||
if ((member.calculateDistance(npc, false, false) < 1000) && (npc.getId() == KEKROPUS))
|
||||
final L2Party party = player.getParty();
|
||||
final boolean isInCC = party.isInCommandChannel();
|
||||
final List<L2PcInstance> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||
final boolean isPartyLeader = (isInCC) ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
|
||||
if (!isPartyLeader)
|
||||
{
|
||||
member.teleToLocation(ENTER_LOC, true);
|
||||
return "34222-02.html";
|
||||
}
|
||||
if (members.size() < Config.HELIOS_MIN_PLAYER)
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||
packet.replace("%min%", Integer.toString(Config.HELIOS_MIN_PLAYER));
|
||||
packet.replace("%minlvl%", Integer.toString(Config.HELIOS_MIN_PLAYER_LVL));
|
||||
player.sendPacket(packet);
|
||||
return null;
|
||||
}
|
||||
for (L2PcInstance member : members)
|
||||
{
|
||||
if (member.getLevel() < Config.HELIOS_MIN_PLAYER_LVL)
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "34222-01.html"));
|
||||
packet.replace("%min%", Integer.toString(Config.HELIOS_MIN_PLAYER));
|
||||
packet.replace("%minlvl%", Integer.toString(Config.HELIOS_MIN_PLAYER_LVL));
|
||||
player.sendPacket(packet);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
for (L2PcInstance member : members)
|
||||
{
|
||||
if ((member.calculateDistance(npc, false, false) < 1000) && (npc.getId() == KEKROPUS))
|
||||
{
|
||||
member.teleToLocation(RAID_ENTER_LOC, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
heliosAI().startQuestTimer("beginning", Config.HELIOS_WAIT_TIME * 60000, null, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -136,6 +159,11 @@ public final class Kekropus extends AbstractNpcAI
|
||||
return "34222.html";
|
||||
}
|
||||
|
||||
private Quest heliosAI()
|
||||
{
|
||||
return QuestManager.getInstance().getQuest(Helios.class.getSimpleName());
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Kekropus();
|
||||
|
119
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Helios/Helios.java
vendored
Normal file
119
L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Helios/Helios.java
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* 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.bosses.Helios;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2NoSummonFriendZone;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Helios extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int HELIOS = 29305;
|
||||
// Location
|
||||
private static final Location HELIOS_SPAWN_LOC = new Location(92771, 161909, 3494, 38329);
|
||||
// Zone
|
||||
private final static int ZONE_ID = 210109;
|
||||
// Status
|
||||
private static final int ALIVE = 0;
|
||||
private static final int WAITING = 1;
|
||||
private static final int DEAD = 3;
|
||||
// Misc
|
||||
private static final int HELIOS_RAID_DURATION = 5; // hours
|
||||
private static L2Npc bossInstance;
|
||||
protected L2NoSummonFriendZone bossZone;
|
||||
|
||||
private Helios()
|
||||
{
|
||||
addAttackId(HELIOS);
|
||||
addKillId(HELIOS);
|
||||
// Unlock
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(HELIOS);
|
||||
final long time = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
if (time > 0)
|
||||
{
|
||||
startQuestTimer("unlock_helios", time, null, null);
|
||||
}
|
||||
// Zone
|
||||
bossZone = ZoneManager.getInstance().getZoneById(ZONE_ID, L2NoSummonFriendZone.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "unlock_helios":
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(HELIOS, ALIVE);
|
||||
break;
|
||||
}
|
||||
case "beginning":
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(HELIOS, WAITING);
|
||||
bossInstance = addSpawn(HELIOS, HELIOS_SPAWN_LOC.getX(), HELIOS_SPAWN_LOC.getY(), HELIOS_SPAWN_LOC.getZ(), HELIOS_SPAWN_LOC.getHeading(), false, 0, false);
|
||||
startQuestTimer("resetRaid", HELIOS_RAID_DURATION * 60 * 60 * 1000, bossInstance, null);
|
||||
break;
|
||||
}
|
||||
case "resetRaid":
|
||||
{
|
||||
final int status = GrandBossManager.getInstance().getBossStatus(HELIOS);
|
||||
if ((status > ALIVE) && (status < DEAD))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(HELIOS, ALIVE);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
if (npc.getId() == HELIOS)
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(HELIOS, DEAD);
|
||||
final long respawnTime = (Config.HELIOS_SPAWN_INTERVAL + getRandom(-Config.HELIOS_SPAWN_RANDOM, Config.LINDVIOR_SPAWN_RANDOM)) * 3600000;
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(HELIOS);
|
||||
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
|
||||
GrandBossManager.getInstance().setStatsSet(HELIOS, info);
|
||||
startQuestTimer("unlock_helios", respawnTime, null, null);
|
||||
bossZone.broadcastPacket(new ExShowScreenMessage(NpcStringId.HELIOS_DEFEATED_TAKES_FLIGHT_DEEP_IN_TO_THE_SUPERION_FORT_HIS_THRONE_IS_RENDERED_INACTIVE, ExShowScreenMessage.TOP_CENTER, 10000, true));
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Helios();
|
||||
}
|
||||
}
|
@ -291,14 +291,14 @@
|
||||
</lucky_drop>
|
||||
</drop_lists>
|
||||
</npc>
|
||||
<npc id="29305" level="105" type="L2Monster" name="Helios" title="Emperor of the Beginning">
|
||||
<npc id="29305" level="105" type="L2GrandBoss" name="Helios" title="Emperor of the Beginning">
|
||||
<race>GIANT</race>
|
||||
<acquire exp="6127016742000" sp="14704840180" />
|
||||
<stats>
|
||||
<vitals hp="589355368" hpRegen="11.5" mp="51696" mpRegen="3.9" />
|
||||
<speed>
|
||||
<walk ground="60" /> <!-- Need retail value -->
|
||||
<run ground="120" /> <!-- Need retail value -->
|
||||
<walk ground="0" />
|
||||
<run ground="0" />
|
||||
</speed>
|
||||
</stats>
|
||||
<skill_list>
|
||||
|
@ -190,4 +190,7 @@
|
||||
<zone name="Ramona_Room" id="210108" type="NoSummonFriendZone" shape="Cylinder" minZ="-10610" maxZ="-10050" rad="3000" >
|
||||
<node X="78023" Y="172262" />
|
||||
</zone>
|
||||
<zone name="Helios_Zone" id="210109" type="NoSummonFriendZone" shape="Cylinder" minZ="3400" maxZ="3600" rad="3100" >
|
||||
<node X="91076" Y="160788" />
|
||||
</zone>
|
||||
</list>
|
@ -934,6 +934,13 @@ public final class Config
|
||||
public static int LILITH_MIN_PLAYER_LVL;
|
||||
public static int LILITH_MAX_PLAYER_LVL;
|
||||
|
||||
// Helios
|
||||
public static int HELIOS_WAIT_TIME;
|
||||
public static int HELIOS_SPAWN_INTERVAL;
|
||||
public static int HELIOS_SPAWN_RANDOM;
|
||||
public static int HELIOS_MIN_PLAYER;
|
||||
public static int HELIOS_MIN_PLAYER_LVL;
|
||||
|
||||
// Gracia Seeds Settings
|
||||
public static int SOD_TIAT_KILL_COUNT;
|
||||
public static long SOD_STAGE_2_LENGTH;
|
||||
@ -2261,17 +2268,25 @@ public final class Config
|
||||
LILITH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLilithSpawn", 148);
|
||||
LILITH_MIN_PLAYER_LVL = GrandBossSettings.getInt("LilithMinPlayerLvl", 85);
|
||||
LILITH_MAX_PLAYER_LVL = GrandBossSettings.getInt("LilithMaxPlayerLvl", 89);
|
||||
|
||||
TRASKEN_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfTraskenSpawn", 264);
|
||||
TRASKEN_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfTraskenSpawn", 72);
|
||||
TRASKEN_MIN_PLAYERS = GrandBossSettings.getInt("TraskenMinPlayers", 49);
|
||||
TRASKEN_MAX_PLAYERS = GrandBossSettings.getInt("TraskenMaxPlayers", 112);
|
||||
TRASKEN_MIN_PLAYER_LVL = GrandBossSettings.getInt("TraskenMinPlayerLvl", 85);
|
||||
|
||||
LINDVIOR_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLindviorSpawn", 264);
|
||||
LINDVIOR_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLindviorSpawn", 72);
|
||||
LINDVIOR_MIN_PLAYERS = GrandBossSettings.getInt("LindviorMinPlayers", 49);
|
||||
LINDVIOR_MAX_PLAYERS = GrandBossSettings.getInt("LindviorMaxPlayers", 112);
|
||||
LINDVIOR_MIN_PLAYER_LVL = GrandBossSettings.getInt("LindviorMinPlayerLvl", 99);
|
||||
|
||||
HELIOS_WAIT_TIME = GrandBossSettings.getInt("HeliosWaitTime", 10);
|
||||
HELIOS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfHeliosSpawn", 264);
|
||||
HELIOS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfHeliosSpawn", 72);
|
||||
HELIOS_MIN_PLAYER = GrandBossSettings.getInt("HeliosMinPlayers", 70);
|
||||
HELIOS_MIN_PLAYER_LVL = GrandBossSettings.getInt("HeliosMinPlayerLvl", 102);
|
||||
|
||||
// Gracia Seeds
|
||||
final PropertiesParser GraciaSeedsSettings = new PropertiesParser(GRACIASEEDS_CONFIG_FILE);
|
||||
|
||||
|
@ -112,6 +112,8 @@ public enum Movie
|
||||
EPIC_TAUTI_SCENE(117, false),
|
||||
SC_RAMONA_TRANS_A(119, true),
|
||||
SC_RAMONA_TRANS_B(120, true),
|
||||
SC_HELIOS_TRANS_A(121, true),
|
||||
SC_HELIOS_TRANS_B(122, true),
|
||||
LAND_KSERTH_A(1000, true),
|
||||
LAND_KSERTH_B(1001, true),
|
||||
LAND_UNDEAD_A(1002, true),
|
||||
|
Reference in New Issue
Block a user