Sync with L2jServer HighFive Jul 3rd 2015.
This commit is contained in:
@@ -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();
|
||||
|
@@ -3,5 +3,5 @@ I'm very impressed.<br>
|
||||
No one has ever broken through this fast to the Hall of Suffering. Extraordinary! In recognition of your achievement, I will give you a <font color="LEVEL">Jeweled Battle Supply</font>.<br>
|
||||
It is granted only to those who achieve an especially impressive feat in battle.<br>
|
||||
Your leader may receive it on your behalf.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Mother-of-Pearl Ornamented Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Gold-Ornamented Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Silver-Ornamented Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Bronze-Ornamented Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Non-Ornamented Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Weak-Looking Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Sad-Looking Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
Unknown Text!<br>
|
||||
The reward is <font color="LEVEL">Poor-Looking Duel Supplies</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
I'm very disappointed.<br>
|
||||
If I had known your skills were this embarrasingly poor, I would not have assigned you this mission. You're lucky to still be alive! Still, a promise is a promise, so I will give you this <font color="LEVEL">Worthless Battle Supply</font>.<br>
|
||||
I'll grant this reward to the leader who represents all of you.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest SeedOfInfinity">Receive the supply.</a>
|
||||
<a action="bypass -h npc_%objectId%_Quest HallOfSuffering">Receive the supply.</a>
|
||||
</body></html>
|
@@ -188,7 +188,7 @@ public final class HallOfSuffering extends AbstractNpcAI
|
||||
|
||||
public HallOfSuffering()
|
||||
{
|
||||
super(HallOfSuffering.class.getSimpleName(), "gracia/instances/SeedOfInfinity/HallOfSuffering");
|
||||
super(HallOfSuffering.class.getSimpleName(), "gracia/instances/SeedOfInfinity");
|
||||
addStartNpc(MOUTHOFEKIMUS, TEPIOS);
|
||||
addTalkId(MOUTHOFEKIMUS, TEPIOS);
|
||||
addFirstTalkId(TEPIOS);
|
||||
@@ -449,7 +449,7 @@ public final class HallOfSuffering extends AbstractNpcAI
|
||||
|
||||
private String getPtLeaderText(L2PcInstance player, HSWorld world)
|
||||
{
|
||||
String htmltext = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "/scripts/instances/SeedOfInfinity/HallOfSuffering/32530-10.htm");
|
||||
String htmltext = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "/scripts/gracia/instances/SeedOfInfinity/HallOfSuffering/32530-10.htm");
|
||||
htmltext = htmltext.replaceAll("%ptLeader%", String.valueOf(world.ptLeaderName));
|
||||
return htmltext;
|
||||
}
|
||||
|
Reference in New Issue
Block a user