diff --git a/trunk/dist/game/data/scripts/ai/individual/Baium/Baium.java b/trunk/dist/game/data/scripts/ai/individual/Baium/Baium.java
index c08c045abc..25b5cab9df 100644
--- a/trunk/dist/game/data/scripts/ai/individual/Baium/Baium.java
+++ b/trunk/dist/game/data/scripts/ai/individual/Baium/Baium.java
@@ -100,7 +100,6 @@ public final class Baium extends AbstractNpcAI
// Misc
private L2GrandBossInstance _baium = null;
private static long _lastAttack = 0;
- private static L2PcInstance _standbyPlayer = null;
private Baium()
{
@@ -213,6 +212,7 @@ public final class Baium extends AbstractNpcAI
_lastAttack = System.currentTimeMillis();
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, null);
+ startQuestTimer("SOCIAL_ACTION", 10000, _baium, player);
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
}
break;
@@ -231,7 +231,6 @@ public final class Baium extends AbstractNpcAI
{
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;
}
@@ -253,10 +252,18 @@ public final class Baium extends AbstractNpcAI
player.teleToLocation(BAIUM_GIFT_LOC);
startQuestTimer("PLAYER_KILL", 3000, npc, player);
}
- else if ((_standbyPlayer != null) && _standbyPlayer.isInsideRadius(npc, 16000, true, false))
+ else
{
- _standbyPlayer.teleToLocation(BAIUM_GIFT_LOC);
- startQuestTimer("PLAYER_KILL", 3000, npc, _standbyPlayer);
+ L2PcInstance randomPlayer = getRandomPlayer(npc);
+ if (randomPlayer != null)
+ {
+ randomPlayer.teleToLocation(BAIUM_GIFT_LOC);
+ startQuestTimer("PLAYER_KILL", 3000, npc, randomPlayer);
+ }
+ else
+ {
+ startQuestTimer("PLAYER_KILL", 3000, npc, null);
+ }
}
}
break;
@@ -266,20 +273,20 @@ public final class Baium extends AbstractNpcAI
if ((player != null) && player.isInsideRadius(npc, 16000, true, false))
{
zone.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
- broadcastNpcSay(npc, ChatType.NPC_GENERAL, player.getName() + ", How dare you wake me! Now you shall die!"); // TODO: replace with NpcStringId when are done core support
+ broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HOW_DARE_YOU_WAKE_ME_NOW_YOU_SHALL_DIE, player.getName());
npc.setTarget(player);
npc.doCast(BAIUM_PRESENT.getSkill());
}
- for (L2PcInstance players : zone.getPlayersInside())
+ for (L2PcInstance insidePlayer : zone.getPlayersInside())
{
- if (players.isHero())
+ if (insidePlayer.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()));
+ zone.broadcastPacket(new ExShowScreenMessage(NpcStringId.NOT_EVEN_THE_GODS_THEMSELVES_COULD_TOUCH_ME_BUT_YOU_S1_YOU_DARE_CHALLENGE_ME_IGNORANT_MORTAL, 2, 4000, insidePlayer.getName()));
break;
}
}
- startQuestTimer("SPAWN_ARCHANGEL", 8000, npc, null);
+ startQuestTimer("SPAWN_ARCHANGEL", 8000, npc, player);
break;
}
case "SPAWN_ARCHANGEL":
@@ -296,19 +303,12 @@ public final class Baium extends AbstractNpcAI
{
addAttackPlayerDesire(npc, player);
}
- else if ((_standbyPlayer != null) && !_standbyPlayer.isDead())
- {
- addAttackPlayerDesire(npc, _standbyPlayer);
- }
else
{
- for (L2Character creature : npc.getKnownList().getKnownCharactersInRadius(2000))
+ L2PcInstance randomPlayer = getRandomPlayer(npc);
+ if (randomPlayer != null)
{
- if ((creature != null) && creature.isPlayer() && zone.isInsideZone(creature) && !creature.isDead())
- {
- addAttackPlayerDesire(npc, (L2Playable) creature);
- break;
- }
+ addAttackPlayerDesire(npc, randomPlayer);
}
}
break;
@@ -377,6 +377,7 @@ public final class Baium extends AbstractNpcAI
{
if ((npc != null) && ((_lastAttack + 1800000) < System.currentTimeMillis()))
{
+ cancelQuestTimers("SELECT_TARGET");
notifyEvent("CLEAR_ZONE", null, null);
addSpawn(BAIUM_STONE, BAIUM_LOC, false, 0);
setStatus(ALIVE);
@@ -560,6 +561,7 @@ public final class Baium extends AbstractNpcAI
startQuestTimer("CLEAR_STATUS", respawnTime, null, null);
startQuestTimer("CLEAR_ZONE", 900000, null, null);
cancelQuestTimer("CHECK_ATTACK", npc, null);
+ cancelQuestTimers("SELECT_TARGET");
}
return super.onKill(npc, killer, isSummon);
}
@@ -572,11 +574,6 @@ public final class Baium extends AbstractNpcAI
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))
@@ -785,6 +782,18 @@ public final class Baium extends AbstractNpcAI
}
}
+ private L2PcInstance getRandomPlayer(L2Npc npc)
+ {
+ for (L2Character creature : npc.getKnownList().getKnownCharactersInRadius(2000))
+ {
+ if ((creature != null) && creature.isPlayer() && zone.isInsideZone(creature) && !creature.isDead())
+ {
+ return (L2PcInstance) creature;
+ }
+ }
+ return null;
+ }
+
public static void main(String[] args)
{
new Baium();
diff --git a/trunk/dist/game/data/scripts/gracia/instances/SeedOfInfinity/HallOfSuffering/32530-00.htm b/trunk/dist/game/data/scripts/gracia/instances/SeedOfInfinity/HallOfSuffering/32530-00.htm
index 0202fb4f98..e600211cbb 100644
--- a/trunk/dist/game/data/scripts/gracia/instances/SeedOfInfinity/HallOfSuffering/32530-00.htm
+++ b/trunk/dist/game/data/scripts/gracia/instances/SeedOfInfinity/HallOfSuffering/32530-00.htm
@@ -3,5 +3,5 @@ I'm very impressed.
No one has ever broken through this fast to the Hall of Suffering. Extraordinary! In recognition of your achievement, I will give you a Jeweled Battle Supply.
It is granted only to those who achieve an especially impressive feat in battle.
Your leader may receive it on your behalf.
-Receive the supply.
+Receive the supply.