Addition of basic Zaken AI.
This commit is contained in:
parent
fe61a209f2
commit
f4c1e31208
@ -17,6 +17,7 @@ INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`
|
||||
(29006, 17726, 108915, -6480, 0, 622493.58388, 3793.536), -- Core
|
||||
(29014, 55024, 17368, -5412, 10126, 622493.58388, 3793.536), -- Orfen
|
||||
(29020, 116033, 17447, 10107, -25348, 4068372, 39960), -- Baium
|
||||
(29022, 52207, 217230, -3341, 0, 28531442, 12240), -- Zaken
|
||||
-- (29028, -105200, -253104, -15264, 0, 62041918, 2248572), -- Valakas
|
||||
(29068, 185708, 114298, -8221,32768, 62802301, 1998000); -- Antharas
|
||||
-- (25286, 185080, -12613, -5499, 16550, 556345880, 86847), -- Anakim
|
||||
|
@ -50,3 +50,13 @@ IntervalOfQueenAntSpawn = 36
|
||||
|
||||
# Random interval. Range 1-192
|
||||
RandomOfQueenAntSpawn = 17
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Zaken
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Interval time of Zaken. Value is hour. Range 1-480
|
||||
IntervalOfZakenSpawn = 168
|
||||
|
||||
# Random interval. Range 1-192
|
||||
RandomOfZakenSpawn = 48
|
||||
|
109
L2J_Mobius_Classic_2.0_Zaken/dist/game/data/scripts/ai/bosses/Zaken/Zaken.java
vendored
Normal file
109
L2J_Mobius_Classic_2.0_Zaken/dist/game/data/scripts/ai/bosses/Zaken/Zaken.java
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
/*
|
||||
* 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.Zaken;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Zaken AI<br>
|
||||
* TODO: Skill cast?<br>
|
||||
* TODO: Day/Night spawn? TODO: Boss message broadcast.
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Zaken extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int ZAKEN = 29022;
|
||||
// Location
|
||||
private static final int ZAKEN_X = 52207;
|
||||
private static final int ZAKEN_Y = 217230;
|
||||
private static final int ZAKEN_Z = -3341;
|
||||
// Misc
|
||||
private static final byte ALIVE = 0;
|
||||
private static final byte DEAD = 1;
|
||||
|
||||
private Zaken()
|
||||
{
|
||||
addKillId(ZAKEN);
|
||||
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
|
||||
final int status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
||||
if (status == DEAD)
|
||||
{
|
||||
// load the unlock date and time from DB
|
||||
final long temp = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
if (temp > 0)
|
||||
{
|
||||
startQuestTimer("zaken_unlock", temp, null, null);
|
||||
}
|
||||
else // the time has already expired while the server was offline
|
||||
{
|
||||
spawnBoss();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
spawnBoss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("zaken_unlock"))
|
||||
{
|
||||
spawnBoss();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
private void spawnBoss()
|
||||
{
|
||||
final L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, ZAKEN_X, ZAKEN_Y, ZAKEN_Z, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
||||
GrandBossManager.getInstance().addBoss(zaken);
|
||||
zaken.broadcastPacket(new PlaySound(1, "BS01_A", 1, zaken.getObjectId(), zaken.getX(), zaken.getY(), zaken.getZ()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
|
||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
||||
// Calculate Min and Max respawn times randomly.
|
||||
final long respawnTime = (Config.ZAKEN_SPAWN_INTERVAL + getRandom(-Config.ZAKEN_SPAWN_RANDOM, Config.ZAKEN_SPAWN_RANDOM)) * 3600000;
|
||||
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
||||
// also save the respawn time so that the info is maintained past reboots
|
||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
|
||||
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
|
||||
GrandBossManager.getInstance().setStatsSet(ZAKEN, info);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Zaken();
|
||||
}
|
||||
}
|
@ -1461,9 +1461,9 @@
|
||||
<sex>MALE</sex>
|
||||
<acquire exp="102487500" sp="3074625" />
|
||||
<stats str="60" int="76" dex="73" wit="70" con="57" men="80">
|
||||
<vitals hp="360722" hpRegen="336" mp="180000" mpRegen="2.4" />
|
||||
<attack physical="2009" magical="1520" random="30" critical="4" accuracy="40" attackSpeed="206" type="SWORD" range="40" distance="80" width="120" />
|
||||
<defence physical="362" magical="362" />
|
||||
<vitals hp="28531442" hpRegen="2649" mp="12240" mpRegen="240" />
|
||||
<attack physical="33864" magical="42273" random="30" critical="4" accuracy="40" attackSpeed="206" type="SWORD" range="40" distance="80" width="120" />
|
||||
<defence physical="3680" magical="4661" />
|
||||
<speed>
|
||||
<walk ground="42" />
|
||||
<run ground="190" />
|
||||
@ -1498,7 +1498,7 @@
|
||||
<drop_lists>
|
||||
<drop>
|
||||
<item id="6328" min="1" max="1" chance="52.5" /> <!-- Sealed Majestic Ring -->
|
||||
<!-- <item id="90763" min="1" max="1" chance="20.82" /> Zaken's Earring Not used Saviors client -->
|
||||
<item id="90763" min="1" max="1" chance="20.82" /> <!-- Zaken's Earring -->
|
||||
<item id="6327" min="1" max="1" chance="20.33" /> <!-- Sealed Majestic Earring -->
|
||||
<item id="6325" min="1" max="1" chance="14.7" /> <!-- Sealed Phoenix Ring -->
|
||||
<item id="6326" min="1" max="1" chance="8.048" /> <!-- Sealed Majestic Necklace -->
|
||||
|
@ -887,6 +887,10 @@ public final class Config
|
||||
public static int QUEEN_ANT_SPAWN_INTERVAL;
|
||||
public static int QUEEN_ANT_SPAWN_RANDOM;
|
||||
|
||||
// Zaken
|
||||
public static int ZAKEN_SPAWN_INTERVAL;
|
||||
public static int ZAKEN_SPAWN_RANDOM;
|
||||
|
||||
// Gracia Seeds Settings
|
||||
public static int SOD_TIAT_KILL_COUNT;
|
||||
public static long SOD_STAGE_2_LENGTH;
|
||||
@ -2247,6 +2251,9 @@ public final class Config
|
||||
QUEEN_ANT_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfQueenAntSpawn", 36);
|
||||
QUEEN_ANT_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfQueenAntSpawn", 17);
|
||||
|
||||
ZAKEN_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfZakenSpawn", 168);
|
||||
ZAKEN_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfZakenSpawn", 48);
|
||||
|
||||
// Gracia Seeds
|
||||
final PropertiesParser GraciaSeedsSettings = new PropertiesParser(GRACIASEEDS_CONFIG_FILE);
|
||||
|
||||
|
@ -55,7 +55,7 @@ Zaken: https://eu.4game.com/lineage2classic/play/zaken/
|
||||
-Parsed new items from client
|
||||
-Parsed new NPCs from L2Wiki
|
||||
-Added raidbosses according to map
|
||||
-TODO: Zaken boss
|
||||
-Zaken boss AI
|
||||
-TODO: Newbie quest changes
|
||||
|
||||
Customs:
|
||||
|
Loading…
Reference in New Issue
Block a user