Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 8453)
- +++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
- @@ -844,6 +845,9 @@
- private static final String TRAINING_CAMP_VAR = "TRAINING_CAMP";
- private static final String TRAINING_CAMP_DURATION = "TRAINING_CAMP_DURATION";
- + // Throne of Heroes
- + private static final String TOH_DONE = "TOH_DONE";
- +
- // Attendance Reward system
- private static final String ATTENDANCE_DATE_VAR = "ATTENDANCE_DATE";
- private static final String ATTENDANCE_INDEX_VAR = "ATTENDANCE_INDEX";
- @@ -14192,6 +14242,11 @@
- return (trainingHolder != null) && (trainingHolder.getEndTime() > Chronos.currentTimeMillis());
- }
- + public void resetThroneOfHeroesEntry()
- + {
- + getClan().getVariables().remove(TOH_DONE);
- + }
- +
- public AttendanceInfoHolder getAttendanceInfo()
- {
- // Get reset time.
- Index: java/org/l2jmobius/gameserver/network/NpcStringId.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/NpcStringId.java (revision 8453)
- +++ java/org/l2jmobius/gameserver/network/NpcStringId.java (working copy)
- @@ -38717,7 +38717,7 @@
- public static NpcStringId ANTHARAS_HAS_SUFFERED_CRITICAL_INJURIES;
- @ClientString(id = 1803449, message = "Zaken! Your time has come! Kill them all!")
- - public static NpcStringId MARY_REED_SUMMONS_ZAKEN;
- + public static NpcStringId ZAKEN_YOUR_TIME_HAS_COME;
- @ClientString(id = 1803450, message = "Mary Reed reveals her true power.")
- public static NpcStringId MARY_REED_REVEALS_HER_TRUE_POWER;
- @@ -39082,8 +39082,8 @@
- @ClientString(id = 1803599, message = "The fourth challenge begins.")
- public static NpcStringId THE_FOURTH_CHALLENGE_BEGINS;
- - @ClientString(id = 1803600, message = "The fourth challenge has been completed successfully.")
- - public static NpcStringId THE_FOURTH_CHALLENGE_HAS_BEEN_COMPLETED_SUCCESSFULLY;
- + @ClientString(id = 1803600, message = "Mary Reed summons Zaken.\nZaken will be here very soon.")
- + public static NpcStringId MARY_REED_SUMMONS_ZAKEN;
- @ClientString(id = 1803601, message = "Ekimus summons his minions.")
- public static NpcStringId EKIMUS_SUMMONS_HIS_MINIONS;
- Index: java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java (revision 8453)
- +++ java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java (working copy)
- @@ -67,6 +67,7 @@
- resetRecommends();
- resetWorldChatPoints();
- resetTrainingCamp();
- + resetThroneOfHeroes();
- }
- @ScheduleTarget
- @@ -252,6 +253,33 @@
- DailyMissionData.getInstance().getDailyMissionData().forEach(DailyMissionDataHolder::reset);
- }
- + public void resetThroneOfHeroes()
- + {
- + try (Connection con = DatabaseFactory.getConnection())
- + {
- + try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_variables WHERE var=?"))
- + {
- + ps.setString(1, "TOH_DONE");
- + ps.execute();
- + }
- + }
- + catch (Exception e)
- + {
- + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset Throne of Heroes Reenter: " + e);
- + }
- + // Update data for online players.
- + World.getInstance().getPlayers().stream().forEach(player ->
- + {
- + if (player.getClan() != null)
- + {
- + player.resetThroneOfHeroesEntry();
- + player.getClan().getVariables().storeMe();
- + }
- + });
- +
- + LOGGER.info("Throne of Heroes Entry has been resetted.");
- + }
- +
- public static DailyTaskManager getInstance()
- {
- return SingletonHolder.INSTANCE;
- Index: dist/game/data/stats/npcs/26200-26299.xml
- ===================================================================
- --- dist/game/data/stats/npcs/26200-26299.xml (revision 8453)
- +++ dist/game/data/stats/npcs/26200-26299.xml (working copy)
- @@ -3050,7 +3050,7 @@
- <height normal="35" />
- </collision>
- </npc>
- - <npc id="26255" level="108" type="RaidBoss" name="Zaken">
- + <npc id="26255" level="120" type="RaidBoss" name="Zaken">
- <race>UNDEAD</race>
- <sex>MALE</sex>
- <acquire exp="3766456368864" sp="3389803344" raidPoints="21" />
- @@ -3066,7 +3066,7 @@
- <status attackable="true" />
- <ai type="BALANCED" clanHelpRange="2000" aggroRange="2000">
- <clanList>
- - <clan>ZAKEN_TOH</clan>
- + <clan>MARY_REED_TOH</clan>
- </clanList>
- </ai>
- <collision>
- Index: dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesGoldberg.xml
- ===================================================================
- --- dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesGoldberg.xml (revision 8453)
- +++ dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesGoldberg.xml (working copy)
- @@ -4,8 +4,7 @@
- <time duration="60" empty="1" />
- <locations>
- <enter type="FIXED">
- - <location x="11722" y="-85014" z="-10972" /> <!-- battle location -->
- - <!-- <location x="11715" y="-84303" z="-11030" /> behind the door -->
- + <location x="11722" y="-85014" z="-10972" heading="52300" /> <!-- battle location -->
- </enter>
- <exit type="ORIGIN" />
- </locations>
- @@ -39,10 +37,10 @@
- <npc id="26250" x="11704" y="-86511" z="-10929" heading="0" /> <!-- Goldberg -->
- </group>
- <group name="GOLDBERG_MINIONS" spawnByDefault="false">
- - <npc id="26251" x="11797" y="-86046" z="-10964" heading="0" respawnTime="1min" /> <!-- Handy Cannon Gunner -->
- - <npc id="26252" x="11704" y="-86904" z="-10964" heading="0" respawnTime="1min" /> <!-- Anchor Warrior -->
- - <npc id="26253" x="11303" y="-86510" z="-10964" heading="0" respawnTime="1min" /> <!-- Operator -->
- - <npc id="26254" x="12136" y="-86488" z="-10964" heading="0" respawnTime="1min" /> <!-- Axe Warrior -->
- + <npc id="26251" x="11797" y="-86046" z="-10964" heading="0" /> <!-- Handy Cannon Gunner -->
- + <npc id="26252" x="11704" y="-86904" z="-10964" heading="0" /> <!-- Anchor Warrior -->
- + <npc id="26253" x="11303" y="-86510" z="-10964" heading="0" /> <!-- Operator -->
- + <npc id="26254" x="12136" y="-86488" z="-10964" heading="0" /> <!-- Axe Warrior -->
- </group>
- </spawnlist>
- </instance>
- \ No newline at end of file
- Index: dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesMaryReed.xml
- ===================================================================
- --- dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesMaryReed.xml (revision 8453)
- +++ dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesMaryReed.xml (working copy)
- @@ -4,8 +4,7 @@
- <time duration="60" empty="1" />
- <locations>
- <enter type="FIXED">
- - <location x="11722" y="-85014" z="-10972" /> <!-- battle location -->
- - <!-- <location x="11715" y="-84303" z="-11030" /> behind the door -->
- + <location x="11722" y="-85014" z="-10972" heading="52300" /> <!-- battle location -->
- </enter>
- <exit type="ORIGIN" />
- </locations>
- @@ -38,11 +36,8 @@
- <group name="MARY_REED" spawnByDefault="false">
- <npc id="26267" x="11704" y="-86511" z="-10929" heading="0" /> <!-- Mary Reed -->
- </group>
- - <group name="MARY_REED_MINIONS" spawnByDefault="false">
- - <npc id="26268" x="11797" y="-86046" z="-10964" heading="0" respawnTime="1min" /> <!-- Shield Master -->
- - <npc id="26269" x="11704" y="-86904" z="-10964" heading="0" respawnTime="1min" /> <!-- Spear Master -->
- - <npc id="26270" x="11303" y="-86510" z="-10964" heading="0" respawnTime="1min" /> <!-- Bow Master -->
- - <npc id="26271" x="12136" y="-86488" z="-10964" heading="0" respawnTime="1min" /> <!-- Magic Master -->
- + <group name="MARY_REED_MINION_ZAKEN" spawnByDefault="false">
- + <npc id="26255" x="11797" y="-86046" z="-10964" heading="0" /> <!-- Zaken -->
- </group>
- </spawnlist>
- </instance>
- \ No newline at end of file
- Index: dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesTauti.xml
- ===================================================================
- --- dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesTauti.xml (revision 8453)
- +++ dist/game/data/instances/ThroneOfHeroes/ThroneOfHeroesTauti.xml (working copy)
- @@ -4,8 +4,7 @@
- <time duration="60" empty="1" />
- <locations>
- <enter type="FIXED">
- - <location x="11722" y="-85014" z="-10972" /> <!-- battle location -->
- - <!-- <location x="11715" y="-84303" z="-11030" /> behind the door -->
- + <location x="11722" y="-85014" z="-10972" heading="52300" /> <!-- battle location -->
- </enter>
- <exit type="ORIGIN" />
- </locations>
- Index: dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesGoldberg.java
- ===================================================================
- --- dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesGoldberg.java (revision 8453)
- +++ dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesGoldberg.java (working copy)
- @@ -152,18 +152,17 @@
- if (isInInstance(world))
- {
- final int hpPer = npc.getCurrentHpPercent();
- - final int maxHp = npc.getMaxHp();
- if (npc.getId() == GOLDBERG)
- {
- - if ((hpPer < (maxHp * 0.50)) && npc.isScriptValue(0))
- + if ((hpPer <= 50) && world.isStatus(0))
- {
- startQuestTimer("SPAWN_GOLDBERG_MINIONS", 10000, npc, null);
- - npc.setScriptValue(1);
- + world.setStatus(1);
- }
- - else if ((hpPer < (maxHp * 0.30)) && npc.isScriptValue(1))
- + else if ((hpPer <= 30) && world.isStatus(1))
- {
- showOnScreenMsg(world, NpcStringId.GOLDBERG_BRINGS_OUT_ALL_OF_THE_POWER_WITHIN_HIM, ExShowScreenMessage.TOP_CENTER, 5000, true);
- - npc.setScriptValue(2);
- + world.setStatus(2);
- }
- }
- }
- @@ -186,18 +185,21 @@
- boolean eightCCMembersOrMore = ((killer.getCommandChannel() != null) && (killer.getCommandChannel().getMemberCount() >= 8));
- if (killer.isGM() || eightCCMembersOrMore)
- {
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- }
- else
- {
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- }
- // Finish instance
- world.finishInstance(2);
- - // Set clan variable
- - killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis());
- - killer.getClan().getVariables().storeMe();
- + if (!killer.isGM())
- + {
- + // Set clan variable
- + killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis());
- + killer.getClan().getVariables().storeMe();
- + }
- }
- }
- return super.onKill(npc, killer, isSummon);
- Index: dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesMaryReed.java
- ===================================================================
- --- dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesMaryReed.java (revision 8453)
- +++ dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesMaryReed.java (working copy)
- @@ -17,7 +17,6 @@
- package instances.ThroneOfHeroes;
- import org.l2jmobius.commons.util.Chronos;
- -import org.l2jmobius.commons.util.CommonUtil;
- import org.l2jmobius.gameserver.model.actor.Npc;
- import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- import org.l2jmobius.gameserver.model.instancezone.Instance;
- @@ -36,14 +35,8 @@
- private static final int ROIENTAL = 34571;
- // Monsters
- private static final int MARY_REED = 26267;
- - private static final int[] MARY_REED_MINIONS =
- - {
- - // add Zaken as minion
- - 26268, // Shield Master -->
- - 26269, // Spear Master -->
- - 26270, // Bow Master -->
- - 26271 // Magic Master -->
- - };
- + private static final int MARY_REED_MINION_ZAKEN = 26255;
- +
- // Throne's Treasure Chest Mary Reed
- private static final int TREASURE_CHEST = 26456;
- @@ -54,7 +47,7 @@
- private static final int TEMPLATE_ID = 308;
- // Npc Dialogs
- - private static final NpcStringId[] MINIONS_MESSAGES =
- + private static final NpcStringId[] ZAKEN_MESSAGES =
- {
- NpcStringId.MARY_REED_THEY_ARE_JUST_INSECTS_HAHA_SHOW_THEM_YOUR_TRUE_POWER,
- NpcStringId.MARY_REED_THESE_BRATS_ARE_PRETTY_STRONG_I_SHALL_REST_UP_A_BIT,
- @@ -68,7 +61,7 @@
- addInstanceCreatedId(TEMPLATE_ID);
- addStartNpc(ROIENTAL);
- addTalkId(ROIENTAL);
- - addAttackId(MARY_REED);
- + addAttackId(MARY_REED, MARY_REED_MINION_ZAKEN);
- addKillId(MARY_REED);
- }
- @@ -114,31 +107,31 @@
- case "ANNOUNCE_5":
- {
- showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_4", 2000, null, player);
- + startQuestTimer("ANNOUNCE_4", 1000, null, player);
- break;
- }
- case "ANNOUNCE_4":
- {
- showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_3", 2000, null, player);
- + startQuestTimer("ANNOUNCE_3", 1000, null, player);
- break;
- }
- case "ANNOUNCE_3":
- {
- showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_2", 2000, null, player);
- + startQuestTimer("ANNOUNCE_2", 1000, null, player);
- break;
- }
- case "ANNOUNCE_2":
- {
- showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_1", 2000, null, player);
- + startQuestTimer("ANNOUNCE_1", 1000, null, player);
- break;
- }
- case "ANNOUNCE_1":
- {
- showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("SPAWN_MARY_REED", 2000, null, player);
- + startQuestTimer("SPAWN_MARY_REED", 1000, null, player);
- break;
- }
- case "SPAWN_MARY_REED":
- @@ -147,12 +140,18 @@
- world.spawnGroup("MARY_REED");
- break;
- }
- - case "SPAWN_MARY_REED_MINIONS":
- + case "ANNOUNCE_MARY_REED_SPAWNS_ZAKEN":
- {
- showOnScreenMsg(world, NpcStringId.MARY_REED_SUMMONS_ZAKEN, ExShowScreenMessage.TOP_CENTER, 5000, true);
- - world.spawnGroup("MARY_REED_MINIONS");
- + startQuestTimer("MARY_REED_SPAWNS_ZAKEN", 10000, null, player);
- break;
- }
- + case "MARY_REED_SPAWNS_ZAKEN":
- + {
- + showOnScreenMsg(world, NpcStringId.ZAKEN_YOUR_TIME_HAS_COME, ExShowScreenMessage.TOP_CENTER, 5000, true);
- + world.spawnGroup("MARY_REED_MINION_ZAKEN");
- + break;
- + }
- }
- return super.onAdvEvent(event, npc, player);
- }
- @@ -164,23 +163,22 @@
- if (isInInstance(world))
- {
- final int hpPer = npc.getCurrentHpPercent();
- - final int maxHp = npc.getMaxHp();
- if (npc.getId() == MARY_REED)
- {
- - if ((hpPer < (maxHp * 0.50)) && npc.isScriptValue(0))
- + if ((hpPer <= 50) && world.isStatus(0))
- {
- - startQuestTimer("SPAWN_MARY_REED_MINIONS", 10000, npc, null);
- - npc.setScriptValue(1);
- + startQuestTimer("ANNOUNCE_MARY_REED_SPAWNS_ZAKEN", 10000, npc, null);
- + world.setStatus(1);
- }
- - else if ((hpPer < (maxHp * 0.30)) && npc.isScriptValue(1))
- + else if ((hpPer <= 30) && world.isStatus(1))
- {
- showOnScreenMsg(world, NpcStringId.DO_YOU_THINK_YOU_CAN_EVADE_MY_STRIKE_TAKE_THAT, ExShowScreenMessage.TOP_CENTER, 5000, true);
- - npc.setScriptValue(2);
- + world.setStatus(2);
- }
- }
- - else if (CommonUtil.contains(MARY_REED_MINIONS, npc.getId()) && world.getNpc(MARY_REED).isScriptValue(2))
- + else if ((npc.getId() == MARY_REED_MINION_ZAKEN) && world.isStatus(2))
- {
- - showOnScreenMsg(world, MINIONS_MESSAGES[getRandom(4)], ExShowScreenMessage.TOP_CENTER, 5000, true);
- + showOnScreenMsg(world, ZAKEN_MESSAGES[getRandom(4)], ExShowScreenMessage.TOP_CENTER, 5000, true);
- }
- }
- return super.onAttack(npc, attacker, damage, isSummon);
- @@ -195,25 +193,28 @@
- if (npc.getId() == MARY_REED)
- {
- // Despawn minions and stop timer
- - cancelQuestTimer("SPAWN_MARY_REED_MINIONS", npc, killer);
- - world.getAliveNpcs(MARY_REED_MINIONS).forEach(beast -> beast.doDie(null));
- + cancelQuestTimer("ANNOUNCE_MARY_REED_SPAWNS_ZAKEN", npc, killer);
- + world.getAliveNpcs(MARY_REED_MINION_ZAKEN).forEach(beast -> beast.doDie(null));
- // Spawn treasure chests
- boolean eightCCMembersOrMore = ((killer.getCommandChannel() != null) && (killer.getCommandChannel().getMemberCount() >= 8));
- if (killer.isGM() || eightCCMembersOrMore)
- {
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- }
- else
- {
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- }
- // Finish instance
- world.finishInstance(2);
- - // Set clan variable
- - killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis());
- - killer.getClan().getVariables().storeMe();
- + if (!killer.isGM())
- + {
- + // Set clan variable
- + killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis());
- + killer.getClan().getVariables().storeMe();
- + }
- }
- }
- return super.onKill(npc, killer, isSummon);
- Index: dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesTauti.java
- ===================================================================
- --- dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesTauti.java (revision 8453)
- +++ dist/game/data/scripts/instances/ThroneOfHeroes/ThroneOfHeroesTauti.java (working copy)
- @@ -104,31 +104,31 @@
- case "ANNOUNCE_5":
- {
- showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_4", 2000, null, player);
- + startQuestTimer("ANNOUNCE_4", 1000, null, player);
- break;
- }
- case "ANNOUNCE_4":
- {
- showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_3", 2000, null, player);
- + startQuestTimer("ANNOUNCE_3", 1000, null, player);
- break;
- }
- case "ANNOUNCE_3":
- {
- showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_2", 2000, null, player);
- + startQuestTimer("ANNOUNCE_2", 1000, null, player);
- break;
- }
- case "ANNOUNCE_2":
- {
- showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("ANNOUNCE_1", 2000, null, player);
- + startQuestTimer("ANNOUNCE_1", 1000, null, player);
- break;
- }
- case "ANNOUNCE_1":
- {
- showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
- - startQuestTimer("SPAWN_TAUTI", 2000, null, player);
- + startQuestTimer("SPAWN_TAUTI", 1000, null, player);
- break;
- }
- case "SPAWN_TAUTI":
- @@ -137,12 +137,6 @@
- world.spawnGroup("TAUTI");
- break;
- }
- - // case "SPAWN_TAUTI_MINIONS":
- - // {
- - // showOnScreenMsg(world, NpcStringId.TAUTI_SUMMONS_HIS_MECHANICAL_CONTRAPTION, ExShowScreenMessage.TOP_CENTER, 5000, true);
- - // world.spawnGroup("TAUTI_MINIONS");
- - // break;
- - // }
- }
- return super.onAdvEvent(event, npc, player);
- }
- @@ -154,19 +148,17 @@
- if (isInInstance(world))
- {
- final int hpPer = npc.getCurrentHpPercent();
- - final int maxHp = npc.getMaxHp();
- if (npc.getId() == TAUTI)
- {
- - if ((hpPer < (maxHp * 0.50)) && npc.isScriptValue(0))
- + if ((hpPer <= 50) && world.isStatus(0))
- {
- - // startQuestTimer("SPAWN_TAUTI_MINIONS", 10000, npc, null);
- showOnScreenMsg(world, TAUTI_MESSAGES[getRandom(2)], ExShowScreenMessage.TOP_CENTER, 5000, true);
- - npc.setScriptValue(1);
- + world.setStatus(1);
- }
- - else if ((hpPer < (maxHp * 0.30)) && npc.isScriptValue(1))
- + else if ((hpPer <= 30) && world.isStatus(1))
- {
- showOnScreenMsg(world, TAUTI_MESSAGES[getRandom(2)], ExShowScreenMessage.TOP_CENTER, 5000, true);
- - npc.setScriptValue(2);
- + world.setStatus(2);
- }
- }
- }
- @@ -181,26 +173,25 @@
- {
- if (npc.getId() == TAUTI)
- {
- - // Despawn minions and stop timer
- - // cancelQuestTimer("SPAWN_TAUTI_MINIONS", npc, killer);
- - // world.getAliveNpcs(TAUTI_MINIONS).forEach(beast -> beast.doDie(null));
- -
- // Spawn treasure chests
- boolean eightCCMembersOrMore = ((killer.getCommandChannel() != null) && (killer.getCommandChannel().getMemberCount() >= 8));
- if (killer.isGM() || eightCCMembersOrMore)
- {
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- }
- else
- {
- - addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true);
- + addSpawn(TREASURE_CHEST, killer.getX() + getRandom(-150, 150), killer.getY() + getRandom(-150, 150), killer.getZ() + 10, 0, false, 0, true, world.getId());
- }
- // Finish instance
- world.finishInstance(2);
- - // Set clan variable
- - killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis());
- - killer.getClan().getVariables().storeMe();
- + if (!killer.isGM())
- + {
- + // Set clan variable
- + killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis());
- + killer.getClan().getVariables().storeMe();
- + }
- }
- }
- return super.onKill(npc, killer, isSummon);
Add Comment
Please, Sign In to add comment