From dff182baa9026dd37896cc823408223e8443b361 Mon Sep 17 00:00:00 2001
From: St3eT <St3eT@users.noreply.github.com>
Date: Thu, 23 Jan 2014 20:41:44 +0000
Subject: [PATCH] BETA: Reworking '''Baium''' AI. * Tested by: St3eT,
 malyelfik, d!g0 * Thanks to: malyelfik * Reviewed by: malyelfik, Adry_85,
 Zoey76, jurchiks

---
 .../game/data/html/admin/grandboss_baium.htm  |   7 +
 .../dist/game/data/html/default/29025.htm     |   2 +-
 .../dist/game/data/html/default/31842.htm     |   4 +
 .../dist/game/data/html/teleporter/31842.htm  |   4 -
 L2J_DataPack_BETA/dist/game/data/scripts.cfg  |   2 +-
 .../data/scripts/ai/individual/Baium.java     | 704 ----------------
 .../scripts/ai/individual/Baium/31862-01.html |   3 +
 .../scripts/ai/individual/Baium/31862-02.html |   5 +
 .../scripts/ai/individual/Baium/31862-03.html |   5 +
 .../scripts/ai/individual/Baium/31862-04.html |   7 +
 .../scripts/ai/individual/Baium/31862.html    |   4 +
 .../scripts/ai/individual/Baium/Baium.java    | 792 ++++++++++++++++++
 .../admincommandhandlers/AdminGrandBoss.java  | 261 +++---
 .../game/data/stats/skills/04100-04199.xml    |   1 -
 .../dist/game/data/zones/custom_boss.xml      |   7 -
 .../dist/game/data/zones/no_restart.xml       |   2 +-
 L2J_DataPack_BETA/dist/sql/game/npc.sql       |   2 +-
 L2J_DataPack_BETA/dist/sql/game/npcaidata.sql |   4 +-
 L2J_DataPack_BETA/dist/sql/game/npcskills.sql |   2 +-
 19 files changed, 942 insertions(+), 876 deletions(-)
 create mode 100644 L2J_DataPack_BETA/dist/game/data/html/default/31842.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/html/teleporter/31842.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium.java
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-01.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-02.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-03.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-04.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/Baium.java

diff --git a/L2J_DataPack_BETA/dist/game/data/html/admin/grandboss_baium.htm b/L2J_DataPack_BETA/dist/game/data/html/admin/grandboss_baium.htm
index a58056c38c..234cbebc4c 100644
--- a/L2J_DataPack_BETA/dist/game/data/html/admin/grandboss_baium.htm
+++ b/L2J_DataPack_BETA/dist/game/data/html/admin/grandboss_baium.htm
@@ -19,9 +19,16 @@
 			<td>Respawn time:</td>
 			<td>%respawnTime%</td>
 		</tr>
+		<tr>
+			<td>Players inside:</td>
+			<td>%playersInside%</td>
+		</tr>
 	</table>
 <br>
 <br>
+<button value="Respawn Baium" action="bypass -h admin_grandboss_respawn 29020" width=200 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td><br1>
+<button value="Abort Fight" action="bypass -h admin_grandboss_abort 29020" width=200 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td><br1>
+<button value="Despawn Archangels" action="bypass -h admin_grandboss_minions 29020" width=200 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td><br1>
 <button value="Teleport to Angelic Vortex" action="bypass -h admin_move_to 112683 14101 10077" width=200 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td><br1>
 <button value="Teleport to Baium Nest" action="bypass -h admin_move_to 115199 16621 10077" width=200 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td><br1>
 </center>
diff --git a/L2J_DataPack_BETA/dist/game/data/html/default/29025.htm b/L2J_DataPack_BETA/dist/game/data/html/default/29025.htm
index 8a110483c7..a3ca9180eb 100644
--- a/L2J_DataPack_BETA/dist/game/data/html/default/29025.htm
+++ b/L2J_DataPack_BETA/dist/game/data/html/default/29025.htm
@@ -1,5 +1,5 @@
 <html><body>
 As you approach the statue, you hear a familiar voice whispering in your ear. It says,<br>
 <font color="LEVEL">All right. It's almost completed... If you wish to possess the secret of immortality, ancient treasures, and the secret of the seal, then call his name...</font><br>
-<a action="bypass -h npc_%objectId%_Quest Baium">Wake Baium</a>
+<a action="bypass -h npc_%objectId%_Quest Baium wakeUp">Wake Baium</a>
 </body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/html/default/31842.htm b/L2J_DataPack_BETA/dist/game/data/html/default/31842.htm
new file mode 100644
index 0000000000..7c6cf35452
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/html/default/31842.htm
@@ -0,0 +1,4 @@
+<html><body>Teleportation Cubic:<br>
+<a action="bypass -h npc_%objectId%_Quest Baium teleportOut">Return to the surface.</a><br>
+<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/html/teleporter/31842.htm b/L2J_DataPack_BETA/dist/game/data/html/teleporter/31842.htm
deleted file mode 100644
index fd7146ec91..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/html/teleporter/31842.htm
+++ /dev/null
@@ -1,4 +0,0 @@
-<html><body>Teleportation Cubic:<br>
-<a action="bypass -h npc_%objectId%_Quest Baium">Return to the surface.</a><br>
-<a action="bypass -h npc_%objectId% Quest">Quest.</a>
-</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg
index 241d9207fa..7797abd817 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg
+++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg
@@ -126,11 +126,11 @@ ai/group_template/WarriorFishingBlock.java
 
 # Individual
 ai/individual/Antharas/Antharas.java
+ai/individual/Baium/Baium.java
 ai/individual/Sailren/Sailren.java
 ai/individual/Venom/Venom.java
 ai/individual/Amaskari.java
 ai/individual/Anais.java
-ai/individual/Baium.java
 ai/individual/Beleth.java
 ai/individual/CatsEyeBandit.java
 ai/individual/CrimsonHatuOtis.java
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium.java
deleted file mode 100644
index d11f16e785..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium.java
+++ /dev/null
@@ -1,704 +0,0 @@
-/*
- * Copyright (C) 2004-2013 L2J DataPack
- * 
- * This file is part of L2J DataPack.
- * 
- * L2J DataPack 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.
- * 
- * L2J DataPack 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.individual;
-
-import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
-import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.logging.Level;
-
-import javolution.util.FastList;
-import ai.npc.AbstractNpcAI;
-
-import com.l2jserver.Config;
-import com.l2jserver.gameserver.GeoData;
-import com.l2jserver.gameserver.ThreadPoolManager;
-import com.l2jserver.gameserver.enums.MountType;
-import com.l2jserver.gameserver.instancemanager.GrandBossManager;
-import com.l2jserver.gameserver.model.L2Object;
-import com.l2jserver.gameserver.model.Location;
-import com.l2jserver.gameserver.model.StatsSet;
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.model.actor.L2Npc;
-import com.l2jserver.gameserver.model.actor.instance.L2DecoyInstance;
-import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.model.holders.SkillHolder;
-import com.l2jserver.gameserver.model.quest.QuestTimer;
-import com.l2jserver.gameserver.model.skills.L2Skill;
-import com.l2jserver.gameserver.model.zone.type.L2BossZone;
-import com.l2jserver.gameserver.network.serverpackets.Earthquake;
-import com.l2jserver.gameserver.network.serverpackets.MoveToPawn;
-import com.l2jserver.gameserver.network.serverpackets.PlaySound;
-import com.l2jserver.gameserver.util.Util;
-
-/**
- * Baium's AI.
- * @author Fulminus
- */
-public final class Baium extends AbstractNpcAI
-{
-	// NPCs
-	private static final int STONE_BAIUM = 29025;
-	private static final int ANGELIC_VORTEX = 31862;
-	private static final int LIVE_BAIUM = 29020;
-	private static final int ARCHANGEL = 29021;
-	private static final int TELEPORT_CUBIC = 31842;
-	// Item
-	private static final int BLOODED_FABRIC = 4295;
-	// Baium status tracking
-	private static final byte ASLEEP = 0; // baium is in the stone version, waiting to be woken up. Entry is unlocked
-	private static final byte AWAKE = 1; // baium is awake and fighting. Entry is locked.
-	private static final byte DEAD = 2; // baium has been killed and has not yet spawned. Entry is locked
-	// Fixed archangel spawn location
-	private static final Location[] ANGEL_LOCATION =
-	{
-		new Location(114239, 17168, 10080, 63544),
-		new Location(115780, 15564, 10080, 13620),
-		new Location(114880, 16236, 10080, 5400),
-		new Location(115168, 17200, 10080, 0),
-		new Location(115792, 16608, 10080, 0)
-	};
-	private static final Location[] TELEPORT_CUBIC_LOCATION = new Location[]
-	{
-		new Location(108784, 16000, -4928),
-		new Location(113824, 10448, -5164),
-		new Location(115488, 22096, -5168),
-	};
-	private static final Location BAIUM_DESPAWN = new Location(116033, 17447, 10104);
-	private static final Location BAIUM_ENTER = new Location(113100, 14500, 10077);
-	// Skills
-	private static final SkillHolder GENERAL_ATTACK = new SkillHolder(4127, 1);
-	private static final SkillHolder WIND_OF_FORCE = new SkillHolder(4128, 1);
-	private static final SkillHolder EARTHQUAKE = new SkillHolder(4129, 1);
-	private static final SkillHolder STRIKING_OF_THUNDERBOLT = new SkillHolder(4130, 1);
-	private static final SkillHolder STUN = new SkillHolder(4131, 1);
-	private static final SkillHolder BAIUM_HEAL = new SkillHolder(4135, 1);
-	private static final SkillHolder HINDER_STRIDER = new SkillHolder(4258, 1);
-	// private static final SkillHolder PRESENT_FROM_BAIUM = new SkillHolder(4136, 1);
-	
-	private long _LastAttackVsBaiumTime = 0;
-	protected final List<L2Npc> _Minions = new ArrayList<>(5);
-	private L2BossZone _Zone;
-	
-	private L2Character _target;
-	private SkillHolder _skill;
-	
-	private Baium()
-	{
-		super(Baium.class.getSimpleName(), "ai/individual");
-		registerMobs(LIVE_BAIUM);
-		// Quest NPC starter initialization
-		addStartNpc(STONE_BAIUM, ANGELIC_VORTEX, TELEPORT_CUBIC);
-		addTalkId(STONE_BAIUM, ANGELIC_VORTEX, TELEPORT_CUBIC);
-		
-		_Zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
-		StatsSet info = GrandBossManager.getInstance().getStatsSet(LIVE_BAIUM);
-		int status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
-		if (status == DEAD)
-		{
-			// load the unlock date and time for baium from DB
-			long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
-			if (temp > 0)
-			{
-				// the unlock time has not yet expired. Mark Baium as currently locked (dead). Setup a timer
-				// to fire at the correct time (calculate the time between now and the unlock time,
-				// setup a timer to fire after that many msec)
-				startQuestTimer("baium_unlock", temp, null, null);
-			}
-			else
-			{
-				// the time has already expired while the server was offline. Delete the saved time and
-				// immediately spawn the stone-baium. Also the state need not be changed from ASLEEP
-				addSpawn(STONE_BAIUM, 116033, 17447, 10107, -25348, false, 0);
-				GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
-			}
-		}
-		else if (status == AWAKE)
-		{
-			int loc_x = info.getInt("loc_x");
-			int loc_y = info.getInt("loc_y");
-			int loc_z = info.getInt("loc_z");
-			int heading = info.getInt("heading");
-			final int hp = info.getInt("currentHP");
-			final int mp = info.getInt("currentMP");
-			L2GrandBossInstance baium = (L2GrandBossInstance) addSpawn(LIVE_BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
-			GrandBossManager.getInstance().addBoss(baium);
-			final L2Npc _baium = baium;
-			ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
-			{
-				@Override
-				public void run()
-				{
-					try
-					{
-						_baium.setCurrentHpMp(hp, mp);
-						_baium.setIsInvul(true);
-						_baium.setIsImmobilized(true);
-						_baium.setRunning();
-						_baium.broadcastSocialAction(2);
-						startQuestTimer("baium_wakeup", 15000, _baium, null);
-					}
-					catch (Exception e)
-					{
-						e.printStackTrace();
-					}
-				}
-			}, 100L);
-		}
-		else
-		{
-			addSpawn(STONE_BAIUM, 116033, 17447, 10107, -25348, false, 0);
-		}
-	}
-	
-	@Override
-	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
-	{
-		switch (event)
-		{
-			case "baium_unlock":
-			{
-				GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
-				addSpawn(STONE_BAIUM, 116033, 17447, 10107, -25348, false, 0);
-				break;
-			}
-			case "skill_range":
-			{
-				if (npc != null)
-				{
-					callSkillAI(npc);
-				}
-				break;
-			}
-			case "clean_player":
-			{
-				_target = getRandomTarget(npc);
-				break;
-			}
-			case "baium_wakeup":
-			{
-				if ((npc != null) && (npc.getId() == LIVE_BAIUM))
-				{
-					npc.broadcastSocialAction(1);
-					npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
-					npc.broadcastPacket(new PlaySound(1, "BS02_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
-					// start monitoring baium's inactivity
-					_LastAttackVsBaiumTime = System.currentTimeMillis();
-					startQuestTimer("baium_despawn", 60000, npc, null, true);
-					startQuestTimer("skill_range", 500, npc, null, true);
-					final L2Npc baium = npc;
-					ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
-					{
-						@Override
-						public void run()
-						{
-							try
-							{
-								baium.setIsInvul(false);
-								baium.setIsImmobilized(false);
-								for (L2Npc minion : _Minions)
-								{
-									minion.setShowSummonAnimation(false);
-								}
-							}
-							catch (Exception e)
-							{
-								_log.log(Level.WARNING, "", e);
-							}
-						}
-					}, 11100L);
-					
-					// TODO: Player that wake up Baium take damage.
-					
-					for (Location loc : ANGEL_LOCATION)
-					{
-						L2Npc angel = addSpawn(ARCHANGEL, loc, false, 0, true);
-						angel.setIsInvul(true);
-						_Minions.add(angel);
-					}
-				}
-				// despawn the live baium after 30 minutes of inactivity
-				// also check if the players are cheating, having pulled Baium outside his zone...
-				break;
-			}
-			case "baium_despawn":
-			{
-				if ((npc != null) && (npc.getId() == LIVE_BAIUM))
-				{
-					// just in case the zone reference has been lost (somehow...), restore the reference
-					if (_Zone == null)
-					{
-						_Zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
-					}
-					if ((_LastAttackVsBaiumTime + 1800000) < System.currentTimeMillis())
-					{
-						npc.deleteMe(); // despawn the live-baium
-						for (L2Npc minion : _Minions)
-						{
-							if (minion != null)
-							{
-								minion.getSpawn().stopRespawn();
-								minion.deleteMe();
-							}
-						}
-						_Minions.clear();
-						addSpawn(STONE_BAIUM, 116033, 17447, 10107, -25348, false, 0); // spawn stone-baium
-						GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // mark that Baium is not awake any more
-						_Zone.oustAllPlayers();
-						cancelQuestTimer("baium_despawn", npc, null);
-					}
-					else if (((_LastAttackVsBaiumTime + 300000) < System.currentTimeMillis()) && (npc.getCurrentHp() < ((npc.getMaxHp() * 3) / 4.0)))
-					{
-						npc.setIsCastingNow(false); // just in case
-						npc.setTarget(npc);
-						if (npc.isPhysicalMuted())
-						{
-							return super.onAdvEvent(event, npc, player);
-						}
-						npc.doCast(BAIUM_HEAL.getSkill());
-						npc.setIsCastingNow(true);
-					}
-					else if (!_Zone.isInsideZone(npc))
-					{
-						npc.teleToLocation(BAIUM_DESPAWN);
-					}
-				}
-				break;
-			}
-		}
-		return super.onAdvEvent(event, npc, player);
-	}
-	
-	@Override
-	public String onTalk(L2Npc npc, L2PcInstance player)
-	{
-		String htmltext = "";
-		if (_Zone == null)
-		{
-			_Zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
-		}
-		if (_Zone == null)
-		{
-			return "<html><body>Angelic Vortex:<br>You may not enter while admin disabled this zone</body></html>";
-		}
-		
-		switch (npc.getId())
-		{
-			case STONE_BAIUM:
-			{
-				if (GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM) == ASLEEP)
-				{
-					if (_Zone.isPlayerAllowed(player))
-					{
-						// once Baium is awaken, no more people may enter until he dies, the server reboots, or
-						// 30 minutes pass with no attacks made against Baium.
-						GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
-						npc.deleteMe();
-						L2GrandBossInstance baium = (L2GrandBossInstance) addSpawn(LIVE_BAIUM, npc, true);
-						GrandBossManager.getInstance().addBoss(baium);
-						final L2Npc _baium = baium;
-						ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
-						{
-							@Override
-							public void run()
-							{
-								try
-								{
-									_baium.setIsInvul(true);
-									_baium.setRunning();
-									_baium.broadcastSocialAction(2);
-									startQuestTimer("baium_wakeup", 15000, _baium, null);
-									_baium.setShowSummonAnimation(false);
-								}
-								catch (Throwable e)
-								{
-									_log.log(Level.WARNING, "", e);
-								}
-							}
-						}, 100L);
-					}
-					else
-					{
-						htmltext = "Conditions are not right to wake up Baium";
-					}
-				}
-				break;
-			}
-			case ANGELIC_VORTEX:
-			{
-				if (player.isFlying())
-				{
-					// print "Player "+player.getName()+" attempted to enter Baium's lair while flying!";
-					return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern</body></html>";
-				}
-				
-				if ((GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM) == ASLEEP) && hasQuestItems(player, BLOODED_FABRIC))
-				{
-					takeItems(player, BLOODED_FABRIC, 1);
-					// allow entry for the player for the next 30 secs (more than enough time for the TP to happen)
-					// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
-					_Zone.allowPlayerEntry(player, 30);
-					player.teleToLocation(BAIUM_ENTER);
-				}
-				else
-				{
-					npc.showChatWindow(player, 1);
-				}
-				break;
-			}
-			case TELEPORT_CUBIC:
-			{
-				final Location loc = TELEPORT_CUBIC_LOCATION[getRandom(TELEPORT_CUBIC_LOCATION.length)];
-				player.teleToLocation(loc.getX() + getRandom(100), loc.getY() + getRandom(100), loc.getZ());
-				break;
-			}
-		}
-		return htmltext;
-	}
-	
-	@Override
-	public String onSpellFinished(L2Npc npc, L2PcInstance player, L2Skill skill)
-	{
-		if (npc.isInvul())
-		{
-			npc.getAI().setIntention(AI_INTENTION_IDLE);
-			return null;
-		}
-		callSkillAI(npc);
-		return super.onSpellFinished(npc, player, skill);
-	}
-	
-	@Override
-	public String onSpawn(L2Npc npc)
-	{
-		npc.disableCoreAI(true);
-		return super.onSpawn(npc);
-	}
-	
-	@Override
-	public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
-	{
-		if (!_Zone.isInsideZone(attacker))
-		{
-			attacker.reduceCurrentHp(attacker.getCurrentHp(), attacker, false, false, null);
-			return super.onAttack(npc, attacker, damage, isSummon);
-		}
-		if (npc.isInvul())
-		{
-			npc.getAI().setIntention(AI_INTENTION_IDLE);
-			return super.onAttack(npc, attacker, damage, isSummon);
-		}
-		
-		if (attacker.getMountType() == MountType.STRIDER)
-		{
-			if (!attacker.isAffectedBySkill(HINDER_STRIDER.getSkillId()))
-			{
-				npc.setTarget(attacker);
-				if (npc.isMuted())
-				{
-					return super.onAttack(npc, attacker, damage, isSummon);
-				}
-				npc.doCast(HINDER_STRIDER.getSkill());
-			}
-		}
-		// update a variable with the last action against baium
-		_LastAttackVsBaiumTime = System.currentTimeMillis();
-		callSkillAI(npc);
-		return super.onAttack(npc, attacker, damage, isSummon);
-	}
-	
-	@Override
-	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
-	{
-		cancelQuestTimer("baium_despawn", npc, null);
-		npc.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
-		// spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair)
-		addSpawn(TELEPORT_CUBIC, 115017, 15549, 10090, 0, false, 900000);
-		// Calculate Min and Max respawn times randomly.
-		long respawnTime = Config.BAIUM_SPAWN_INTERVAL + getRandom(-Config.BAIUM_SPAWN_RANDOM, Config.BAIUM_SPAWN_RANDOM);
-		respawnTime *= 3600000;
-		
-		GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
-		startQuestTimer("baium_unlock", respawnTime, null, null);
-		// also save the respawn time so that the info is maintained past reboots
-		StatsSet info = GrandBossManager.getInstance().getStatsSet(LIVE_BAIUM);
-		info.set("respawn_time", (System.currentTimeMillis()) + respawnTime);
-		GrandBossManager.getInstance().setStatsSet(LIVE_BAIUM, info);
-		for (L2Npc minion : _Minions)
-		{
-			if (minion != null)
-			{
-				minion.getSpawn().stopRespawn();
-				minion.deleteMe();
-			}
-		}
-		_Minions.clear();
-		final QuestTimer timer = getQuestTimer("skill_range", npc, null);
-		if (timer != null)
-		{
-			timer.cancelAndRemove();
-		}
-		return super.onKill(npc, killer, isSummon);
-	}
-	
-	public L2Character getRandomTarget(L2Npc npc)
-	{
-		FastList<L2Character> result = FastList.newInstance();
-		Collection<L2Object> objs = npc.getKnownList().getKnownObjects().values();
-		{
-			for (L2Object obj : objs)
-			{
-				if (obj.isPlayable() || (obj instanceof L2DecoyInstance))
-				{
-					if (obj.isPlayer())
-					{
-						if (obj.getActingPlayer().getAppearance().getInvisible())
-						{
-							continue;
-						}
-					}
-					
-					if (((((L2Character) obj).getZ() < (npc.getZ() - 100)) && (((L2Character) obj).getZ() > (npc.getZ() + 100))) || !(GeoData.getInstance().canSeeTarget(((L2Character) obj).getX(), ((L2Character) obj).getY(), ((L2Character) obj).getZ(), npc.getX(), npc.getY(), npc.getZ())))
-					{
-						continue;
-					}
-				}
-				if (obj.isPlayable() || (obj instanceof L2DecoyInstance))
-				{
-					if (Util.checkIfInRange(9000, npc, obj, true) && !((L2Character) obj).isDead())
-					{
-						result.add((L2Character) obj);
-					}
-				}
-			}
-		}
-		if (result.isEmpty())
-		{
-			for (L2Npc minion : _Minions)
-			{
-				if (minion != null)
-				{
-					result.add(minion);
-				}
-			}
-		}
-		
-		if (result.isEmpty())
-		{
-			FastList.recycle(result);
-			return null;
-		}
-		
-		Object[] characters = result.toArray();
-		QuestTimer timer = getQuestTimer("clean_player", npc, null);
-		if (timer != null)
-		{
-			timer.cancelAndRemove();
-		}
-		startQuestTimer("clean_player", 20000, npc, null);
-		L2Character target = (L2Character) characters[getRandom(characters.length)];
-		FastList.recycle(result);
-		return target;
-		
-	}
-	
-	public synchronized void callSkillAI(L2Npc npc)
-	{
-		if (npc.isInvul() || npc.isCastingNow())
-		{
-			return;
-		}
-		
-		if ((_target == null) || _target.isDead() || !(_Zone.isInsideZone(_target)))
-		{
-			_target = getRandomTarget(npc);
-			if (_target != null)
-			{
-				_skill = getRandomSkill(npc);
-			}
-		}
-		
-		L2Character target = _target;
-		SkillHolder skill = _skill;
-		if (skill == null)
-		{
-			skill = (getRandomSkill(npc));
-		}
-		
-		if (npc.isPhysicalMuted())
-		{
-			return;
-		}
-		
-		if ((target == null) || target.isDead() || !(_Zone.isInsideZone(target)))
-		{
-			npc.setIsCastingNow(false);
-			return;
-		}
-		
-		if (Util.checkIfInRange(skill.getSkill().getCastRange(), npc, target, true))
-		{
-			npc.getAI().setIntention(AI_INTENTION_IDLE);
-			npc.setTarget(target);
-			npc.setIsCastingNow(true);
-			_target = null;
-			_skill = null;
-			if (getDist(skill.getSkill().getCastRange()) > 0)
-			{
-				npc.broadcastPacket(new MoveToPawn(npc, target, getDist(skill.getSkill().getCastRange())));
-			}
-			try
-			{
-				Thread.sleep(1000);
-				npc.stopMove(null);
-				npc.doCast(skill.getSkill());
-			}
-			catch (Exception e)
-			{
-				e.printStackTrace();
-			}
-		}
-		else
-		{
-			npc.getAI().setIntention(AI_INTENTION_FOLLOW, target, null);
-			npc.setIsCastingNow(false);
-		}
-	}
-	
-	public SkillHolder getRandomSkill(L2Npc npc)
-	{
-		SkillHolder skill;
-		if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
-		{
-			if (getRandom(100) < 10)
-			{
-				skill = WIND_OF_FORCE;
-			}
-			else if (getRandom(100) < 10)
-			{
-				skill = EARTHQUAKE;
-			}
-			else
-			{
-				skill = GENERAL_ATTACK;
-			}
-		}
-		else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
-		{
-			if (getRandom(100) < 10)
-			{
-				skill = STUN;
-			}
-			else if (getRandom(100) < 10)
-			{
-				skill = WIND_OF_FORCE;
-			}
-			else if (getRandom(100) < 10)
-			{
-				skill = EARTHQUAKE;
-			}
-			else
-			{
-				skill = GENERAL_ATTACK;
-			}
-		}
-		else if (npc.getCurrentHp() > (npc.getMaxHp() / 4.0))
-		{
-			if (getRandom(100) < 10)
-			{
-				skill = STRIKING_OF_THUNDERBOLT;
-			}
-			else if (getRandom(100) < 10)
-			{
-				skill = STUN;
-			}
-			else if (getRandom(100) < 10)
-			{
-				skill = WIND_OF_FORCE;
-			}
-			else if (getRandom(100) < 10)
-			{
-				skill = EARTHQUAKE;
-			}
-			else
-			{
-				skill = GENERAL_ATTACK;
-			}
-		}
-		else if (getRandom(100) < 10)
-		{
-			skill = STRIKING_OF_THUNDERBOLT;
-		}
-		else if (getRandom(100) < 10)
-		{
-			skill = STUN;
-		}
-		else if (getRandom(100) < 10)
-		{
-			skill = WIND_OF_FORCE;
-		}
-		else if (getRandom(100) < 10)
-		{
-			skill = EARTHQUAKE;
-		}
-		else
-		{
-			skill = GENERAL_ATTACK;
-		}
-		return skill;
-	}
-	
-	@Override
-	public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isSummon)
-	{
-		if (npc.isInvul())
-		{
-			npc.getAI().setIntention(AI_INTENTION_IDLE);
-			return null;
-		}
-		npc.setTarget(caster);
-		return super.onSkillSee(npc, caster, skill, targets, isSummon);
-	}
-	
-	public int getDist(int range)
-	{
-		int dist = 0;
-		switch (range)
-		{
-			case -1:
-				break;
-			case 100:
-				dist = 85;
-				break;
-			default:
-				dist = range - 85;
-				break;
-		}
-		return dist;
-	}
-	
-	public static void main(String[] args)
-	{
-		new Baium();
-	}
-}
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-01.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-01.html
new file mode 100644
index 0000000000..ecaf8fdb0a
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-01.html
@@ -0,0 +1,3 @@
+<html><head><body>Angelic Vortex:<br>
+The Angelic Vortex emits a faint light which twinkles out. The vortex becomes inactive. It seems like, in order to go to the place where the Angelic Vortex is leading, you will need some special object.
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-02.html
new file mode 100644
index 0000000000..aea888d00c
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-02.html
@@ -0,0 +1,5 @@
+<html><body>Angelic Vortex:<br>
+The Angelic Vortex emits a faint light, in the midst of which an image appears. A giant that normally appears as a stone statue has come alive and is fighting with many people. Even angels have joined the fray. It seems that the angels are angry at the humans who have broken the seal of the stone statue.<br>
+It appears impossible to cross over to that place right now. You have no choice but to wait until the fight is over.<br>
+<a action="bypass -h npc_%objectId%_Quest Baium 31862-04.html">Ask about the stone statue that has come alive.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-03.html
new file mode 100644
index 0000000000..c95dd97a30
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-03.html
@@ -0,0 +1,5 @@
+<html><body>Angelic Vortex:<br>
+The Angelic Vortex emits a faint light, in the midst of which an image appears. A large, open space... but the gigantic, human-like stone statue is no longer there.<br>
+It seems that while the statue is not visible, one could cross over to that place.<br>
+<a action="bypass -h npc_%objectId%_Quest Baium 31862-04.html">Ask about the stone statue.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-04.html
new file mode 100644
index 0000000000..4116b3bc49
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862-04.html
@@ -0,0 +1,7 @@
+<html><body>Angelic Vortex:<br>
+In ancient times a mighty emperor named Baium became so enamored of his own power that he began to fancy himself a god. He conscripted all of his people to build an awesome tower that reached almost to heaven.<br>
+The gods were not amused. They struck him down, cursed him with immortality and imprisoned him in his own tower for eternity! A statue of the foolish emperor stands there to this day.<br>
+Occasionally, the old emperor himself is woken up by those who seek his power. Unfortunately, when Baium is disturbed, so are the angels who guard him.<br>
+Although the angels are certainly no friend of Baium, they regard Humans with equal disdain.<font color="LEVEL"> Ultimate success against Baium depends upon the defeat of the guardian angels.</font><br>
+This is all I can tell you. Good luck!
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862.html
new file mode 100644
index 0000000000..0488068d09
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/31862.html
@@ -0,0 +1,4 @@
+<html><body>Angelic Vortex:<br>
+The Angelic Vortex emits a faint light, and in the midst of the light an image appears. In the deepest part of a spacious area, a gigantic stone statue is visible. The statue has a human-like appearance and is in a seated position, as though it was being held by some invisible force against its will.<br>
+<a action="bypass -h npc_%objectId%_Quest Baium enter">Go where the Angelic Vortex leads.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/Baium.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/Baium.java
new file mode 100644
index 0000000000..15782c5ab1
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Baium/Baium.java
@@ -0,0 +1,792 @@
+/*
+ * Copyright (C) 2004-2014 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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.
+ *
+ * L2J DataPack 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.individual.Baium;
+
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.enums.CategoryType;
+import com.l2jserver.gameserver.enums.MountType;
+import com.l2jserver.gameserver.instancemanager.GrandBossManager;
+import com.l2jserver.gameserver.instancemanager.ZoneManager;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.StatsSet;
+import com.l2jserver.gameserver.model.actor.L2Attackable;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.L2Playable;
+import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.SkillHolder;
+import com.l2jserver.gameserver.model.skills.L2Skill;
+import com.l2jserver.gameserver.model.variables.NpcVariables;
+import com.l2jserver.gameserver.model.zone.type.L2NoRestartZone;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.clientpackets.Say2;
+import com.l2jserver.gameserver.network.serverpackets.Earthquake;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+import com.l2jserver.gameserver.network.serverpackets.PlaySound;
+import com.l2jserver.gameserver.network.serverpackets.SocialAction;
+import com.l2jserver.gameserver.util.Util;
+
+/**
+ * Baium AI.
+ * @author St3eT
+ */
+public final class Baium extends AbstractNpcAI
+{
+	// NPCs
+	private static final int BAIUM = 29020; // Baium
+	private static final int BAIUM_STONE = 29025; // Baium
+	private static final int ANG_VORTEX = 31862; // Angelic Vortex
+	private static final int ARCHANGEL = 29021; // Archangel
+	private static final int TELE_CUBE = 31842; // Teleportation Cubic
+	// Skills
+	private static final SkillHolder BAIUM_ATTACK = new SkillHolder(4127, 1); // Baium: General Attack
+	private static final SkillHolder ENERGY_WAVE = new SkillHolder(4128, 1); // Wind Of Force
+	private static final SkillHolder EARTH_QUAKE = new SkillHolder(4129, 1); // Earthquake
+	private static final SkillHolder THUNDERBOLT = new SkillHolder(4130, 1); // Striking of Thunderbolt
+	private static final SkillHolder GROUP_HOLD = new SkillHolder(4131, 1); // Stun
+	private static final SkillHolder SPEAR_ATTACK = new SkillHolder(4132, 1); // Spear: Pound the Ground
+	private static final SkillHolder ANGEL_HEAL = new SkillHolder(4133, 1); // Angel Heal
+	private static final SkillHolder HEAL_OF_BAIUM = new SkillHolder(4135, 1); // Baium Heal
+	private static final SkillHolder BAIUM_PRESENT = new SkillHolder(4136, 1); // Baium's Gift
+	private static final SkillHolder ANTI_STRIDER = new SkillHolder(4258, 1); // Hinder Strider
+	// Items
+	private static final int FABRIC = 4295; // Blooded Fabric
+	// Zone
+	private static final L2NoRestartZone zone = ZoneManager.getInstance().getZoneById(70051, L2NoRestartZone.class); // Baium zone
+	// Status
+	private static final int ALIVE = 0;
+	private static final int WAITING = 1;
+	private static final int IN_FIGHT = 2;
+	private static final int DEAD = 3;
+	// Locations
+	private static final Location BAIUM_GIFT_LOC = new Location(115910, 17337, 10105);
+	private static final Location BAIUM_LOC = new Location(116033, 17447, 10107, -25348);
+	private static final Location TELEPORT_CUBIC_LOC = new Location(115017, 15549, 10090);
+	private static final Location TELEPORT_IN_LOC = new Location(114077, 15882, 10078);
+	private static final Location[] TELEPORT_OUT_LOC =
+	{
+		new Location(108784, 16000, -4928),
+		new Location(113824, 10448, -5164),
+		new Location(115488, 22096, -5168),
+	};
+	private static final Location[] ARCHANGEL_LOC =
+	{
+		new Location(115792, 16608, 10136, 0),
+		new Location(115168, 17200, 10136, 0),
+		new Location(115780, 15564, 10136, 13620),
+		new Location(114880, 16236, 10136, 5400),
+		new Location(114239, 17168, 10136, -1992)
+	};
+	// Misc
+	private L2GrandBossInstance _baium = null;
+	private static long _lastAttack = 0;
+	private static L2PcInstance _standbyPlayer = null;
+	
+	private Baium()
+	{
+		super(Baium.class.getSimpleName(), "ai/individual");
+		addFirstTalkId(ANG_VORTEX);
+		addTalkId(ANG_VORTEX, TELE_CUBE, BAIUM_STONE);
+		addStartNpc(ANG_VORTEX, TELE_CUBE, BAIUM_STONE);
+		addAttackId(BAIUM, ARCHANGEL);
+		addKillId(BAIUM);
+		addSeeCreatureId(BAIUM);
+		addSpellFinishedId(BAIUM);
+		
+		final StatsSet info = GrandBossManager.getInstance().getStatsSet(BAIUM);
+		final int curr_hp = info.getInt("currentHP");
+		final int curr_mp = info.getInt("currentMP");
+		final int loc_x = info.getInt("loc_x");
+		final int loc_y = info.getInt("loc_y");
+		final int loc_z = info.getInt("loc_z");
+		final int heading = info.getInt("heading");
+		final long respawnTime = info.getLong("respawn_time");
+		
+		switch (getStatus())
+		{
+			case WAITING:
+			{
+				setStatus(ALIVE);
+			}
+			case ALIVE:
+			{
+				addSpawn(BAIUM_STONE, BAIUM_LOC, false, 0);
+				break;
+			}
+			case IN_FIGHT:
+			{
+				_baium = (L2GrandBossInstance) addSpawn(BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
+				_baium.setCurrentHpMp(curr_hp, curr_mp);
+				_lastAttack = System.currentTimeMillis();
+				addBoss(_baium);
+				
+				for (Location loc : ARCHANGEL_LOC)
+				{
+					final L2Npc archangel = addSpawn(ARCHANGEL, loc, false, 0, true);
+					startQuestTimer("SELECT_TARGET", 5000, archangel, null);
+				}
+				startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
+				break;
+			}
+			case DEAD:
+			{
+				final long remain = respawnTime - System.currentTimeMillis();
+				if (remain > 0)
+				{
+					startQuestTimer("CLEAR_STATUS", remain, null, null);
+				}
+				else
+				{
+					notifyEvent("CLEAR_STATUS", null, null);
+				}
+				break;
+			}
+		}
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		switch (event)
+		{
+			case "31862-04.html":
+			{
+				return event;
+			}
+			case "enter":
+			{
+				String htmltext = null;
+				if (getStatus() == DEAD)
+				{
+					htmltext = "31862-03.html";
+				}
+				else if (getStatus() == IN_FIGHT)
+				{
+					htmltext = "31862-02.html";
+				}
+				else if (!hasQuestItems(player, FABRIC))
+				{
+					htmltext = "31862-01.html";
+				}
+				else
+				{
+					takeItems(player, FABRIC, 1);
+					player.teleToLocation(TELEPORT_IN_LOC);
+				}
+				return htmltext;
+			}
+			case "teleportOut":
+			{
+				final Location destination = TELEPORT_OUT_LOC[getRandom(TELEPORT_OUT_LOC.length)];
+				player.teleToLocation(destination.getX() + getRandom(100), destination.getY() + getRandom(100), destination.getZ());
+				break;
+			}
+			case "wakeUp":
+			{
+				if (getStatus() == ALIVE)
+				{
+					npc.deleteMe();
+					setStatus(IN_FIGHT);
+					_baium = (L2GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
+					_baium.disableCoreAI(true);
+					addBoss(_baium);
+					_lastAttack = System.currentTimeMillis();
+					startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
+					startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, null);
+					startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
+				}
+				break;
+			}
+			case "WAKEUP_ACTION":
+			{
+				if (npc != null)
+				{
+					zone.broadcastPacket(new SocialAction(_baium.getObjectId(), 2));
+				}
+				break;
+			}
+			case "MANAGE_EARTHQUAKE":
+			{
+				if (npc != null)
+				{
+					zone.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 10));
+					zone.broadcastPacket(new PlaySound("BS02_A"));
+					startQuestTimer("SOCIAL_ACTION", 8000, npc, player);
+				}
+				break;
+			}
+			case "SOCIAL_ACTION":
+			{
+				if (npc != null)
+				{
+					zone.broadcastPacket(new SocialAction(npc.getObjectId(), 3));
+					startQuestTimer("PLAYER_PORT", 6000, npc, player);
+				}
+				break;
+			}
+			case "PLAYER_PORT":
+			{
+				if (npc != null)
+				{
+					if ((player != null) && player.isInsideRadius(npc, 16000, true, false))
+					{
+						player.teleToLocation(BAIUM_GIFT_LOC);
+						startQuestTimer("PLAYER_KILL", 3000, npc, player);
+					}
+					else if ((_standbyPlayer != null) && _standbyPlayer.isInsideRadius(npc, 16000, true, false))
+					{
+						_standbyPlayer.teleToLocation(BAIUM_GIFT_LOC);
+						startQuestTimer("PLAYER_KILL", 3000, npc, _standbyPlayer);
+					}
+				}
+				break;
+			}
+			case "PLAYER_KILL":
+			{
+				if ((player != null) && player.isInsideRadius(npc, 16000, true, false))
+				{
+					zone.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
+					broadcastNpcSay(npc, Say2.NPC_ALL, player.getName() + ", How dare you wake me! Now you shall die!"); // TODO: replace with NpcStringId when are done core support
+					npc.setTarget(player);
+					npc.doCast(BAIUM_PRESENT.getSkill());
+				}
+				
+				for (L2PcInstance players : zone.getPlayersInside())
+				{
+					if (players.isHero())
+					{
+						zone.broadcastPacket(new ExShowScreenMessage(NpcStringId.NOT_EVEN_THE_GODS_THEMSELVES_COULD_TOUCH_ME_BUT_YOU_S1_YOU_DARE_CHALLENGE_ME_IGNORANT_MORTAL, 2, 4000, players.getName()));
+						break;
+					}
+				}
+				startQuestTimer("SPAWN_ARCHANGEL", 8000, npc, null);
+				break;
+			}
+			case "SPAWN_ARCHANGEL":
+			{
+				_baium.disableCoreAI(false);
+				
+				for (Location loc : ARCHANGEL_LOC)
+				{
+					final L2Npc archangel = addSpawn(ARCHANGEL, loc, false, 0, true);
+					startQuestTimer("SELECT_TARGET", 5000, archangel, null);
+				}
+				
+				if ((player != null) && !player.isDead())
+				{
+					attackPlayer((L2Attackable) npc, player);
+				}
+				else if ((_standbyPlayer != null) && !_standbyPlayer.isDead())
+				{
+					attackPlayer((L2Attackable) npc, _standbyPlayer);
+				}
+				else
+				{
+					for (L2Character characters : npc.getKnownList().getKnownCharactersInRadius(2000))
+					{
+						if ((characters != null) && characters.isPlayer() && zone.isInsideZone(characters) && !characters.isDead())
+						{
+							attackPlayer((L2Attackable) npc, (L2Playable) characters);
+							break;
+						}
+					}
+				}
+				break;
+			}
+			case "SELECT_TARGET":
+			{
+				if (npc != null)
+				{
+					final L2Attackable mob = (L2Attackable) npc;
+					final L2Character mostHated = mob.getMostHated();
+					
+					if ((_baium == null) || _baium.isDead())
+					{
+						mob.deleteMe();
+						break;
+					}
+					
+					if ((mostHated != null) && mostHated.isPlayer() && zone.isInsideZone(mostHated))
+					{
+						if (mob.getTarget() != mostHated)
+						{
+							mob.clearAggroList();
+						}
+						attackPlayer(mob, (L2Playable) mostHated);
+					}
+					else
+					{
+						boolean found = false;
+						for (L2Character characters : mob.getKnownList().getKnownCharactersInRadius(1000))
+						{
+							if ((characters != null) && characters.isPlayable() && zone.isInsideZone(characters) && !characters.isDead())
+							{
+								if (mob.getTarget() != characters)
+								{
+									mob.clearAggroList();
+								}
+								attackPlayer(mob, (L2Playable) characters);
+								found = true;
+								break;
+							}
+						}
+						
+						if (!found)
+						{
+							if (mob.isInsideRadius(_baium, 40, true, false))
+							{
+								if (mob.getTarget() != _baium)
+								{
+									mob.clearAggroList();
+								}
+								mob.setIsRunning(true);
+								mob.addDamageHate(_baium, 0, 999);
+								mob.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, _baium);
+							}
+							else
+							{
+								mob.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, _baium);
+							}
+						}
+					}
+					startQuestTimer("SELECT_TARGET", 5000, npc, null);
+				}
+				break;
+			}
+			case "CHECK_ATTACK":
+			{
+				if ((npc != null) && ((_lastAttack + 1800000) < System.currentTimeMillis()))
+				{
+					notifyEvent("CLEAR_ZONE", null, null);
+					addSpawn(BAIUM_STONE, BAIUM_LOC, false, 0);
+					setStatus(ALIVE);
+				}
+				else if (npc != null)
+				{
+					if (((_lastAttack + 300000) < System.currentTimeMillis()) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.75)))
+					{
+						npc.setTarget(npc);
+						npc.doCast(HEAL_OF_BAIUM.getSkill());
+					}
+					startQuestTimer("CHECK_ATTACK", 60000, npc, null);
+				}
+				break;
+			}
+			case "CLEAR_STATUS":
+			{
+				setStatus(ALIVE);
+				addSpawn(BAIUM_STONE, BAIUM_LOC, false, 0);
+				break;
+			}
+			case "CLEAR_ZONE":
+			{
+				for (L2Character charInside : zone.getCharactersInside())
+				{
+					if (charInside != null)
+					{
+						if (charInside.isNpc())
+						{
+							charInside.deleteMe();
+						}
+						else if (charInside.isPlayer())
+						{
+							notifyEvent("teleportOut", null, (L2PcInstance) charInside);
+						}
+					}
+				}
+				break;
+			}
+			case "RESPAWN_BAIUM":
+			{
+				if (getStatus() == DEAD)
+				{
+					setRespawn(0);
+					cancelQuestTimer("CLEAR_STATUS", null, null);
+					notifyEvent("CLEAR_STATUS", null, null);
+				}
+				else
+				{
+					player.sendMessage(getClass().getSimpleName() + ": You cant respawn Baium while Baium is alive!");
+				}
+				break;
+			}
+			case "ABORT_FIGHT":
+			{
+				if (getStatus() == IN_FIGHT)
+				{
+					_baium = null;
+					notifyEvent("CLEAR_ZONE", null, null);
+					notifyEvent("CLEAR_STATUS", null, null);
+					player.sendMessage(getClass().getSimpleName() + ": Aborting fight!");
+				}
+				else
+				{
+					player.sendMessage(getClass().getSimpleName() + ": You cant abort attack right now!");
+				}
+				cancelQuestTimers("CHECK_ATTACK");
+				cancelQuestTimers("SELECT_TARGET");
+				break;
+			}
+			case "DESPAWN_MINIONS":
+			{
+				if (getStatus() == IN_FIGHT)
+				{
+					for (L2Character charInside : zone.getCharactersInside())
+					{
+						if ((charInside != null) && charInside.isNpc() && (charInside.getId() == ARCHANGEL))
+						{
+							charInside.deleteMe();
+						}
+					}
+					if (player != null)
+					{
+						player.sendMessage(getClass().getSimpleName() + ": All archangels has been deleted!");
+					}
+				}
+				else if (player != null)
+				{
+					player.sendMessage(getClass().getSimpleName() + ": You cant despawn archangels right now!");
+				}
+				break;
+			}
+			case "MANAGE_SKILLS":
+			{
+				if (npc != null)
+				{
+					manageSkills(npc);
+				}
+				break;
+			}
+		}
+		return super.onAdvEvent(event, npc, player);
+	}
+	
+	@Override
+	public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, L2Skill skill)
+	{
+		_lastAttack = System.currentTimeMillis();
+		
+		if (npc.getId() == BAIUM)
+		{
+			if ((attacker.getMountType() == MountType.STRIDER) && !attacker.isAffectedBySkill(ANTI_STRIDER.getSkillId()))
+			{
+				if (!npc.isSkillDisabled(ANTI_STRIDER.getSkill()))
+				{
+					npc.setTarget(attacker);
+					npc.doCast(ANTI_STRIDER.getSkill());
+				}
+			}
+			
+			if (skill == null)
+			{
+				refreshAiParams(attacker, npc, (damage * 1000));
+			}
+			else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.25))
+			{
+				refreshAiParams(attacker, npc, ((damage / 3) * 100));
+			}
+			else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.5))
+			{
+				refreshAiParams(attacker, npc, (damage * 20));
+			}
+			else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.75))
+			{
+				refreshAiParams(attacker, npc, (damage * 10));
+			}
+			else
+			{
+				refreshAiParams(attacker, npc, ((damage / 3) * 20));
+			}
+			manageSkills(npc);
+		}
+		else
+		{
+			final L2Attackable mob = (L2Attackable) npc;
+			final L2Character mostHated = mob.getMostHated();
+			
+			if ((getRandom(100) < 10) && mob.checkDoCastConditions(SPEAR_ATTACK.getSkill()))
+			{
+				if ((mostHated != null) && (npc.calculateDistance(mostHated, true, false) < 1000) && zone.isCharacterInZone(mostHated))
+				{
+					mob.setTarget(mostHated);
+					mob.doCast(SPEAR_ATTACK.getSkill());
+				}
+				else if (zone.isCharacterInZone(attacker))
+				{
+					mob.setTarget(attacker);
+					mob.doCast(SPEAR_ATTACK.getSkill());
+				}
+			}
+			
+			if ((getRandom(100) < 5) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && mob.checkDoCastConditions(ANGEL_HEAL.getSkill()))
+			{
+				npc.setTarget(npc);
+				npc.doCast(ANGEL_HEAL.getSkill());
+			}
+		}
+		return super.onAttack(npc, attacker, damage, isSummon, skill);
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+	{
+		if (zone.isCharacterInZone(killer))
+		{
+			setStatus(DEAD);
+			addSpawn(TELE_CUBE, TELEPORT_CUBIC_LOC, false, 900000);
+			zone.broadcastPacket(new PlaySound("BS01_D"));
+			long respawnTime = (Config.BAIUM_SPAWN_INTERVAL + getRandom(-Config.BAIUM_SPAWN_RANDOM, Config.BAIUM_SPAWN_RANDOM)) * 3600000;
+			setRespawn(respawnTime);
+			startQuestTimer("CLEAR_STATUS", respawnTime, null, null);
+			startQuestTimer("CLEAR_ZONE", 900000, null, null);
+			cancelQuestTimer("CHECK_ATTACK", npc, null);
+		}
+		return super.onKill(npc, killer, isSummon);
+	}
+	
+	@Override
+	public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
+	{
+		if (!zone.isInsideZone(creature) || (creature.isNpc() && (creature.getId() == BAIUM_STONE)))
+		{
+			return super.onSeeCreature(npc, creature, isSummon);
+		}
+		
+		if (creature.isPlayer() && !creature.isDead() && (_standbyPlayer == null))
+		{
+			_standbyPlayer = (L2PcInstance) creature;
+		}
+		
+		if (creature.isInCategory(CategoryType.CLERIC_GROUP))
+		{
+			if (npc.getCurrentHp() < (npc.getMaxHp() * 0.25))
+			{
+				refreshAiParams(creature, npc, 10000);
+			}
+			else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.5))
+			{
+				refreshAiParams(creature, npc, 10000, 6000);
+			}
+			else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.75))
+			{
+				refreshAiParams(creature, npc, 10000, 3000);
+			}
+			else
+			{
+				refreshAiParams(creature, npc, 10000, 2000);
+			}
+		}
+		else
+		{
+			refreshAiParams(creature, npc, 10000, 1000);
+		}
+		manageSkills(npc);
+		return super.onSeeCreature(npc, creature, isSummon);
+	}
+	
+	@Override
+	public String onSpellFinished(L2Npc npc, L2PcInstance player, L2Skill skill)
+	{
+		startQuestTimer("MANAGE_SKILLS", 1000, npc, null);
+		
+		if (!zone.isCharacterInZone(npc) && (_baium != null))
+		{
+			_baium.teleToLocation(BAIUM_LOC);
+		}
+		return super.onSpellFinished(npc, player, skill);
+	}
+	
+	@Override
+	public boolean unload(boolean removeFromList)
+	{
+		if (_baium != null)
+		{
+			_baium.deleteMe();
+		}
+		return super.unload(removeFromList);
+	}
+	
+	private final void refreshAiParams(L2Character attacker, L2Npc npc, int damage)
+	{
+		refreshAiParams(attacker, npc, damage, damage);
+	}
+	
+	private final void refreshAiParams(L2Character attacker, L2Npc npc, int damage, int aggro)
+	{
+		final int newAggroVal = damage + getRandom(3000);
+		final int aggroVal = aggro + 1000;
+		final NpcVariables vars = npc.getVariables();
+		for (int i = 0; i < 3; i++)
+		{
+			if (attacker == vars.getObject("c_quest" + i, L2Character.class))
+			{
+				if (vars.getInt("i_quest" + i) < aggroVal)
+				{
+					vars.set("i_quest" + i, newAggroVal);
+				}
+				return;
+			}
+		}
+		final int index = Util.getIndexOfMinValue(vars.getInt("i_quest0"), vars.getInt("i_quest1"), vars.getInt("i_quest2"));
+		vars.set("i_quest" + index, newAggroVal);
+		vars.set("c_quest" + index, attacker);
+	}
+	
+	private int getStatus()
+	{
+		return GrandBossManager.getInstance().getBossStatus(BAIUM);
+	}
+	
+	private void addBoss(L2GrandBossInstance grandboss)
+	{
+		GrandBossManager.getInstance().addBoss(grandboss);
+	}
+	
+	private void setStatus(int status)
+	{
+		GrandBossManager.getInstance().setBossStatus(BAIUM, status);
+	}
+	
+	private void setRespawn(long respawnTime)
+	{
+		GrandBossManager.getInstance().getStatsSet(BAIUM).set("respawn_time", (System.currentTimeMillis() + respawnTime));
+	}
+	
+	private void manageSkills(L2Npc npc)
+	{
+		if (npc.isCastingNow() || npc.isCoreAIDisabled() || !npc.isInCombat())
+		{
+			return;
+		}
+		
+		final NpcVariables vars = npc.getVariables();
+		for (int i = 0; i < 3; i++)
+		{
+			final L2Character attacker = vars.getObject("c_quest" + i, L2Character.class);
+			if ((attacker != null) && ((npc.calculateDistance(attacker, true, false) > 9000) || attacker.isDead()))
+			{
+				vars.set("i_quest" + i, 0);
+			}
+		}
+		final int index = Util.getIndexOfMaxValue(vars.getInt("i_quest0"), vars.getInt("i_quest1"), vars.getInt("i_quest2"));
+		final L2Character player = vars.getObject("c_quest" + index, L2Character.class);
+		final int i2 = vars.getInt("i_quest" + index);
+		if ((i2 > 0) && (getRandom(100) < 70))
+		{
+			vars.set("i_quest" + index, 500);
+		}
+		
+		SkillHolder skillToCast = null;
+		if ((player != null) && !player.isDead())
+		{
+			if (npc.getCurrentHp() > (npc.getMaxHp() * 0.75))
+			{
+				if (getRandom(100) < 10)
+				{
+					skillToCast = ENERGY_WAVE;
+				}
+				else if (getRandom(100) < 10)
+				{
+					skillToCast = EARTH_QUAKE;
+				}
+				else
+				{
+					skillToCast = BAIUM_ATTACK;
+				}
+			}
+			else if (npc.getCurrentHp() > (npc.getMaxHp() * 0.5))
+			{
+				if (getRandom(100) < 10)
+				{
+					skillToCast = GROUP_HOLD;
+				}
+				else if (getRandom(100) < 10)
+				{
+					skillToCast = ENERGY_WAVE;
+				}
+				else if (getRandom(100) < 10)
+				{
+					skillToCast = EARTH_QUAKE;
+				}
+				else
+				{
+					skillToCast = BAIUM_ATTACK;
+				}
+			}
+			else if (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))
+			{
+				if (getRandom(100) < 10)
+				{
+					skillToCast = THUNDERBOLT;
+				}
+				else if (getRandom(100) < 10)
+				{
+					skillToCast = GROUP_HOLD;
+				}
+				else if (getRandom(100) < 10)
+				{
+					skillToCast = ENERGY_WAVE;
+				}
+				else if (getRandom(100) < 10)
+				{
+					skillToCast = EARTH_QUAKE;
+				}
+				else
+				{
+					skillToCast = BAIUM_ATTACK;
+				}
+			}
+			else if (getRandom(100) < 10)
+			{
+				skillToCast = THUNDERBOLT;
+			}
+			else if (getRandom(100) < 10)
+			{
+				skillToCast = GROUP_HOLD;
+			}
+			else if (getRandom(100) < 10)
+			{
+				skillToCast = ENERGY_WAVE;
+			}
+			else if (getRandom(100) < 10)
+			{
+				skillToCast = EARTH_QUAKE;
+			}
+			else
+			{
+				skillToCast = BAIUM_ATTACK;
+			}
+		}
+		
+		if ((skillToCast != null) && npc.checkDoCastConditions(skillToCast.getSkill()))
+		{
+			npc.setTarget(player);
+			npc.doCast(skillToCast.getSkill());
+		}
+	}
+	
+	public static void main(String[] args)
+	{
+		new Baium();
+	}
+}
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminGrandBoss.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminGrandBoss.java
index 03f1d8037c..6f1e8a14e7 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminGrandBoss.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminGrandBoss.java
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.StringTokenizer;
 
 import ai.individual.Antharas.Antharas;
+import ai.individual.Baium.Baium;
 
 import com.l2jserver.gameserver.cache.HtmCache;
 import com.l2jserver.gameserver.handler.IAdminCommandHandler;
@@ -44,6 +45,7 @@ public class AdminGrandBoss implements IAdminCommandHandler
 	private static final int ANTHARAS_ZONE = 70050; // Antharas Nest
 	private static final int VALAKAS = 29028; // Valakas
 	private static final int BAIUM = 29020; // Baium
+	private static final int BAIUM_ZONE = 70051; // Baium Nest
 	private static final int QUEENANT = 29001; // Queen Ant
 	private static final int ORFEN = 29014; // Orfen
 	private static final int CORE = 29006; // Core
@@ -108,14 +110,24 @@ public class AdminGrandBoss implements IAdminCommandHandler
 				{
 					final int grandBossId = Integer.parseInt(st.nextToken());
 					
-					if (grandBossId == ANTHARAS)
-					{
-						antharasAi().notifyEvent("RESPAWN_ANTHARAS", null, activeChar);
-						manageHtml(activeChar, grandBossId);
-					}
-					else
+					switch (grandBossId)
 					{
-						activeChar.sendMessage("Wrong ID!");
+						case ANTHARAS:
+						{
+							antharasAi().notifyEvent("RESPAWN_ANTHARAS", null, activeChar);
+							manageHtml(activeChar, grandBossId);
+							break;
+						}
+						case BAIUM:
+						{
+							baiumAi().notifyEvent("RESPAWN_BAIUM", null, activeChar);
+							manageHtml(activeChar, grandBossId);
+							break;
+						}
+						default:
+						{
+							activeChar.sendMessage("Wrong ID!");
+						}
 					}
 				}
 				else
@@ -130,14 +142,22 @@ public class AdminGrandBoss implements IAdminCommandHandler
 				{
 					final int grandBossId = Integer.parseInt(st.nextToken());
 					
-					if (grandBossId == ANTHARAS)
-					{
-						antharasAi().notifyEvent("DESPAWN_MINIONS", null, activeChar);
-						manageHtml(activeChar, grandBossId);
-					}
-					else
+					switch (grandBossId)
 					{
-						activeChar.sendMessage("Wrong ID!");
+						case ANTHARAS:
+						{
+							antharasAi().notifyEvent("DESPAWN_MINIONS", null, activeChar);
+							break;
+						}
+						case BAIUM:
+						{
+							baiumAi().notifyEvent("DESPAWN_MINIONS", null, activeChar);
+							break;
+						}
+						default:
+						{
+							activeChar.sendMessage("Wrong ID!");
+						}
 					}
 				}
 				else
@@ -152,14 +172,24 @@ public class AdminGrandBoss implements IAdminCommandHandler
 				{
 					final int grandBossId = Integer.parseInt(st.nextToken());
 					
-					if (grandBossId == ANTHARAS)
-					{
-						antharasAi().notifyEvent("ABORT_FIGHT", null, activeChar);
-						manageHtml(activeChar, grandBossId);
-					}
-					else
+					switch (grandBossId)
 					{
-						activeChar.sendMessage("Wrong ID!");
+						case ANTHARAS:
+						{
+							antharasAi().notifyEvent("ABORT_FIGHT", null, activeChar);
+							manageHtml(activeChar, grandBossId);
+							break;
+						}
+						case BAIUM:
+						{
+							baiumAi().notifyEvent("ABORT_FIGHT", null, activeChar);
+							manageHtml(activeChar, grandBossId);
+							break;
+						}
+						default:
+						{
+							activeChar.sendMessage("Wrong ID!");
+						}
 					}
 				}
 				else
@@ -189,167 +219,87 @@ public class AdminGrandBoss implements IAdminCommandHandler
 				{
 					bossZone = ZoneManager.getInstance().getZoneById(ANTHARAS_ZONE, L2NoRestartZone.class);
 					htmlPatch = "data/html/admin/grandboss_antharas.htm";
-					deadStatus = 3;
-					
-					switch (bossStatus)
-					{
-						case 0:
-						{
-							textColor = "00FF00"; // Green
-							text = "Alive";
-							break;
-						}
-						case 1:
-						{
-							textColor = "FFFF00"; // Yellow
-							text = "Waiting";
-							break;
-						}
-						case 2:
-						{
-							textColor = "FF9900"; // Orange
-							text = "In Fight";
-							break;
-						}
-						case 3:
-						{
-							textColor = "FF0000"; // Red
-							text = "Dead";
-							break;
-						}
-					}
 					break;
 				}
 				case VALAKAS:
 				{
 					htmlPatch = "data/html/admin/grandboss_valakas.htm";
-					deadStatus = 3;
-					
-					switch (bossStatus)
-					{
-						case 0:
-						{
-							textColor = "00FF00"; // Green
-							text = "Alive";
-							break;
-						}
-						case 1:
-						{
-							textColor = "FFFF00"; // Yellow
-							text = "Waiting";
-							break;
-						}
-						case 2:
-						{
-							textColor = "FF9900"; // Orange
-							text = "In Fight";
-							break;
-						}
-						case 3:
-						{
-							textColor = "FF0000"; // Red
-							text = "Dead";
-							break;
-						}
-					}
 					break;
 				}
 				case BAIUM:
 				{
+					bossZone = ZoneManager.getInstance().getZoneById(BAIUM_ZONE, L2NoRestartZone.class);
 					htmlPatch = "data/html/admin/grandboss_baium.htm";
-					deadStatus = 2;
-					
-					switch (bossStatus)
-					{
-						case 0:
-						{
-							textColor = "00FF00"; // Green
-							text = "Alive";
-							break;
-						}
-						case 1:
-						{
-							textColor = "FF9900"; // Orange
-							text = "In Fight";
-							break;
-						}
-						case 2:
-						{
-							textColor = "FF0000"; // Red
-							text = "Dead";
-							break;
-						}
-					}
 					break;
 				}
 				case QUEENANT:
 				{
 					htmlPatch = "data/html/admin/grandboss_queenant.htm";
-					deadStatus = 1;
-					
-					switch (bossStatus)
-					{
-						case 0:
-						{
-							textColor = "00FF00"; // Green
-							text = "Alive";
-							break;
-						}
-						case 1:
-						{
-							textColor = "FF0000"; // Red
-							text = "Dead";
-							break;
-						}
-					}
-					
 					break;
 				}
 				case ORFEN:
 				{
 					htmlPatch = "data/html/admin/grandboss_orfen.htm";
-					deadStatus = 1;
-					
-					switch (bossStatus)
-					{
-						case 0:
-						{
-							textColor = "00FF00"; // Green
-							text = "Alive";
-							break;
-						}
-						case 1:
-						{
-							textColor = "FF0000"; // Red
-							text = "Dead";
-							break;
-						}
-					}
 					break;
 				}
 				case CORE:
 				{
 					htmlPatch = "data/html/admin/grandboss_core.htm";
-					deadStatus = 1;
-					
-					switch (bossStatus)
+					break;
+				}
+			}
+			
+			if (Arrays.asList(ANTHARAS, VALAKAS, BAIUM).contains(grandBossId))
+			{
+				deadStatus = 3;
+				switch (bossStatus)
+				{
+					case 0:
 					{
-						case 0:
-						{
-							textColor = "00FF00"; // Green
-							text = "Alive";
-							break;
-						}
-						case 1:
-						{
-							textColor = "FF0000"; // Red
-							text = "Dead";
-							break;
-						}
+						textColor = "00FF00"; // Green
+						text = "Alive";
+						break;
+					}
+					case 1:
+					{
+						textColor = "FFFF00"; // Yellow
+						text = "Waiting";
+						break;
+					}
+					case 2:
+					{
+						textColor = "FF9900"; // Orange
+						text = "In Fight";
+						break;
+					}
+					case 3:
+					{
+						textColor = "FF0000"; // Red
+						text = "Dead";
+						break;
+					}
+				}
+			}
+			else
+			{
+				deadStatus = 1;
+				switch (bossStatus)
+				{
+					case 0:
+					{
+						textColor = "00FF00"; // Green
+						text = "Alive";
+						break;
+					}
+					case 1:
+					{
+						textColor = "FF0000"; // Red
+						text = "Dead";
+						break;
 					}
-					break;
 				}
 			}
+			
 			final StatsSet info = GrandBossManager.getInstance().getStatsSet(grandBossId);
 			final String bossRespawn = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.getLong("respawn_time"));
 			
@@ -372,6 +322,11 @@ public class AdminGrandBoss implements IAdminCommandHandler
 		return QuestManager.getInstance().getQuest(Antharas.class.getSimpleName());
 	}
 	
+	private Quest baiumAi()
+	{
+		return QuestManager.getInstance().getQuest(Baium.class.getSimpleName());
+	}
+	
 	@Override
 	public String[] getAdminCommandList()
 	{
diff --git a/L2J_DataPack_BETA/dist/game/data/stats/skills/04100-04199.xml b/L2J_DataPack_BETA/dist/game/data/stats/skills/04100-04199.xml
index 61f9385df3..0c5863897b 100644
--- a/L2J_DataPack_BETA/dist/game/data/stats/skills/04100-04199.xml
+++ b/L2J_DataPack_BETA/dist/game/data/stats/skills/04100-04199.xml
@@ -632,7 +632,6 @@
 		<set name="magicLvl" val="75" />
 		<set name="operateType" val="A1" />
 		<set name="power" val="0" />
-		<set name="reuseDelay" val="2500" />
 		<set name="targetType" val="AREA" />
 		<for>
 			<effect name="PhysicalAttack" />
diff --git a/L2J_DataPack_BETA/dist/game/data/zones/custom_boss.xml b/L2J_DataPack_BETA/dist/game/data/zones/custom_boss.xml
index 7bd364ff35..3ddeeaaad5 100644
--- a/L2J_DataPack_BETA/dist/game/data/zones/custom_boss.xml
+++ b/L2J_DataPack_BETA/dist/game/data/zones/custom_boss.xml
@@ -9,13 +9,6 @@
 		<node X="57669" Y="221683" />
 		<node X="50773" Y="221632" />
 	</zone>
-	<zone name="Baium Boss" id="12002" type="BossZone" shape="NPoly" minZ="10061" maxZ="11061">
-		<stat name="InvadeTime" val="1800000" />
-		<node X="111022" Y="16177" />
-		<node X="114510" Y="12623" />
-		<node X="118142" Y="15790" />
-		<node X="114773" Y="19589" />
-	</zone>
 	<zone name="Anakim and Lilith Boss" id="12003" type="BossZone" shape="NPoly" minZ="-5504" maxZ="-5104">
 		<stat name="default_enabled" val="false" />
 		<stat name="InvadeTime" val="1800000" />
diff --git a/L2J_DataPack_BETA/dist/game/data/zones/no_restart.xml b/L2J_DataPack_BETA/dist/game/data/zones/no_restart.xml
index 217859293b..43143cb311 100644
--- a/L2J_DataPack_BETA/dist/game/data/zones/no_restart.xml
+++ b/L2J_DataPack_BETA/dist/game/data/zones/no_restart.xml
@@ -17,7 +17,7 @@
 		<node X="188132" Y="119249" />
 		<node X="173386" Y="119391" />
 	</zone>
-	<zone name="baium_no_restart" type="NoRestartZone" shape="NPoly" minZ="10061" maxZ="11061"> <!-- 23_18 -->
+	<zone name="baium_no_restart" id="70051" type="NoRestartZone" shape="NPoly" minZ="10061" maxZ="11061"> <!-- 23_18 -->
 		<stat name="restartTime" val="1800" />
 		<stat name="restartAllowedTime" val="600" />
 		<node X="111074" Y="16177" />
diff --git a/L2J_DataPack_BETA/dist/sql/game/npc.sql b/L2J_DataPack_BETA/dist/sql/game/npc.sql
index 553228c0e6..a1c3ad63ea 100644
--- a/L2J_DataPack_BETA/dist/sql/game/npc.sql
+++ b/L2J_DataPack_BETA/dist/sql/game/npc.sql
@@ -7896,7 +7896,7 @@ INSERT INTO `npc` VALUES
 (31839, 31839, "Adventure Guildsman", 0, "", 0, "LineageNPC.a_common_people_MElf", 6, 21, 70, "male", "L2Adventurer", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 130, 0, 0, 50, 120, 0, 1),
 (31840, 31840, "Adventure Guildsman", 0, "", 0, "LineageNPC.e_common_people_MOrc", 8, 26, 70, "male", "L2Adventurer", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
 (31841, 31841, "Adventure Guildsman", 0, "", 0, "LineageNPC.a_fighterguild_teacher_FHuman", 9.5, 22.4, 70, "female", "L2Adventurer", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 129, 102, 0, 50, 120, 0, 1),
-(31842, 31842, "Teleportation Cubic", 0, "", 0, "LineageNPC.teleport_npc", 40, 80, 70, "etc", "L2Teleporter", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 1, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
+(31842, 31842, "Teleportation Cubic", 0, "", 0, "LineageNPC.teleport_npc", 40, 80, 70, "etc", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 1, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
 (31843, 31843, "Teleportation Cubic", 0, "", 0, "LineageNPC.teleport_npc", 40, 80, 70, "etc", "L2Teleporter", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 490, 1, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),
 (31844, 31844, "Aracna", 0, "", 0, "LineageMonster.aracne", 15, 26, 50, "female", "L2Monster", 40, 1421.00103, 747.8, 5.5, 2.1, 40, 43, 30, 21, 20, 20, 3000, 226, 305.54906, 200.23844, 208.6504, 146.5258, 253, 4, 333, 0, 0, 0, 64, 120, 0, 1),
 (31845, 31845, "Bloody Pixy", 0, "", 0, "LineageMonster.pixy", 5, 25, 80, "female", "L2FriendlyMob", 40, 3290.113069, 1674.8, 8.5, 3, 40, 43, 30, 21, 20, 20, 7680, 226, 970.53755, 341.375, 662.75133, 249.80341, 253, 4, 333, 0, 0, 0, 80, 120, 0, 1),
diff --git a/L2J_DataPack_BETA/dist/sql/game/npcaidata.sql b/L2J_DataPack_BETA/dist/sql/game/npcaidata.sql
index b616b7d643..b1970684de 100644
--- a/L2J_DataPack_BETA/dist/sql/game/npcaidata.sql
+++ b/L2J_DataPack_BETA/dist/sql/game/npcaidata.sql
@@ -6155,8 +6155,8 @@ INSERT INTO `npcaidata` VALUES
 (29017, 7, 15, 0, 1100, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "orfen_clan", 2700, "null", 0, 0, "fighter"), -- Riba
 (29018, 7, 15, 0, 1500, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "orfen_clan", 2900, "null", 0, 0, "balanced"), -- Riba Iren
 (29019, 7, 15, 0, 4096, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 300, "null", 0, 0, "balanced"), -- Antharas
-(29020, 7, 15, 0, 1000, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "baium", 300, "null", 0, 0, "balanced"), -- Baium
-(29021, 7, 15, 0, 1000, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 500, 0, "archangel_clan", 300, "baium_clan", 300, 0, "balanced"), -- Archangel
+(29020, 7, 15, 4127, 1000, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "baium_clan", 300, "archangel_clan", 50, 0, "balanced"), -- Baium
+(29021, 7, 15, 0, 1000, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 500, 0, "archangel_clan", 300, "null", 0, 0, "balanced"), -- Archangel
 (29022, 7, 15, 0, 1000, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 300, "null", 0, 0, "balanced"), -- Zaken
 (29023, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, "null", 300, "null", 0, 0, "fighter"), -- Doll Blader
 (29024, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, "null", 300, "null", 0, 0, "fighter"), -- Veil Master
diff --git a/L2J_DataPack_BETA/dist/sql/game/npcskills.sql b/L2J_DataPack_BETA/dist/sql/game/npcskills.sql
index b258f5904b..d95d567959 100644
--- a/L2J_DataPack_BETA/dist/sql/game/npcskills.sql
+++ b/L2J_DataPack_BETA/dist/sql/game/npcskills.sql
@@ -75456,10 +75456,10 @@ INSERT INTO `npcskills` VALUES
 (29020, 4414, 2), -- Armor Type
 (29020, 4415, 3), -- Weapon Type
 (29020, 4416, 1), -- Races
+(29020, 4127, 1), -- Baium: General Attack
 -- Archangel
 (29021, 4045, 1), -- Resist Full Magic Attack
 (29021, 4132, 1), -- Spear: Pound the Ground
-(29021, 4133, 1), -- Angel Heal
 (29021, 4408, 1), -- HP Modifiers
 (29021, 4409, 1), -- MP Modifiers
 (29021, 4410, 11), -- P. Atk. Modifiers
-- 
GitLab