diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/TimeLimitedZones.ini b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/TimeLimitedZones.ini index 2f4bda576d..8a134aece4 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/TimeLimitedZones.ini +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/TimeLimitedZones.ini @@ -6,9 +6,33 @@ # Default: 3600000 (1 hour) InitialTime = 3600000 -# Maximum added time. -# Default: 18000000 (5 hours) -MaximumAddedTime = 18000000 +# Initial free time Primeval Isle. +# Default: 7200000 (1 hour) +PrimevalStart = 7200000 + +# Maximum Added time Primeval Isle. +# Default: 46800000 (13 hours) +PrimevalMaxTime = 46800000 + +# Maximum Added time Alligator Island. +# Default: 10800000 (3 hours) +AlligatorMaxTime = 10800000 + +# Maximum Added time Forgotten Primeval Garden. +# Default: 21600000 (6 hours) +PrimevalGardenMaxTime = 21600000 + +# Initial free time Antharas Lair. +# Default: 25200000 (7 hours) +AntharasLairStart = 25200000 + +# Maximum Added time Antharas Lair. +# Default: 151200000 (42 hours) +AntharasLairMaxTime = 151200000 + +# Reset delay Only Antharas Lair (Weekly). +# Default: 604800000 (7 Days) +AntharasLairResetDelay = 604800000 # Reset delay. # Default: 36000000 (10 hours) @@ -17,3 +41,8 @@ ResetDelay = 36000000 # Teleport fee. # Default: 10000 TeleportFee = 10000 + +# TODO: NOT USED +# Maximum added time. +# Default: 18000000 (5 hours) +# MaximumAddedTime = 18000000 diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/InstanceNames.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/InstanceNames.xml index 58c0d64a1a..3eb0402142 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/InstanceNames.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/InstanceNames.xml @@ -31,4 +31,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddHuntingTime.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddHuntingTime.java index bfe0c1ce4b..bdf8fcf15c 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddHuntingTime.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddHuntingTime.java @@ -63,6 +63,30 @@ public class AddHuntingTime extends AbstractEffect player.sendMessage("You cannot exceed the time zone limit."); return; } + else if ((endTime > currentTime) && (((endTime - currentTime) + _time) >= Config.TIME_LIMITED_MAX_ADDED_PRIMEVAL)) + { + player.getInventory().addItem("AddHuntingTime effect refund", item.getId(), 1, player, player); + player.sendMessage("You cannot exceed the time zone limit."); + return; + } + else if ((endTime > currentTime) && (((endTime - currentTime) + _time) >= Config.TIME_LIMITED_MAX_ADDED_ALLIGATOR)) + { + player.getInventory().addItem("AddHuntingTime effect refund", item.getId(), 1, player, player); + player.sendMessage("You cannot exceed the time zone limit."); + return; + } + else if ((endTime > currentTime) && (((endTime - currentTime) + _time) >= Config.TIME_LIMITED_MAX_ADDED_GARDEN)) + { + player.getInventory().addItem("AddHuntingTime effect refund", item.getId(), 1, player, player); + player.sendMessage("You cannot exceed the time zone limit."); + return; + } + else if ((endTime > currentTime) && (((endTime - currentTime) + _time) >= Config.TIME_LIMITED_MAX_ADDED_ANTHARAS)) + { + player.getInventory().addItem("AddHuntingTime effect refund", item.getId(), 1, player, player); + player.sendMessage("You cannot exceed the time zone limit."); + return; + } if (player.isInTimedHuntingZone(_zoneId)) { @@ -76,6 +100,14 @@ public class AddHuntingTime extends AbstractEffect { endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; } + else if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_PRIMEVAL; + } + else if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY_ANTHARAS) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_ANTHARAS; + } else if (endTime < currentTime) { endTime = currentTime; diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Aden/Aden.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Aden/Aden.xml index 13442fff0a..76b96bfe9c 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Aden/Aden.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Aden/Aden.xml @@ -134,6 +134,8 @@ + + diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Others/ThirdClassQuests.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Others/ThirdClassQuests.xml deleted file mode 100644 index 35ec71e488..0000000000 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/spawns/Others/ThirdClassQuests.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/92400-92499.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/92400-92499.xml index 6cd2d7bfb8..1c51bb472c 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/92400-92499.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/92400-92499.xml @@ -3,13 +3,18 @@ - + + + + + + diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/93700-93799.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/93700-93799.xml index 6e81526abb..5d8bf8395b 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/93700-93799.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/items/93700-93799.xml @@ -45,13 +45,18 @@ - + + + + + + diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/npcs/34100-34199.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/npcs/34100-34199.xml index d9bbaed04d..04b2bb76ac 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/npcs/34100-34199.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/npcs/34100-34199.xml @@ -153,7 +153,6 @@ - ETC FEMALE @@ -347,7 +346,6 @@ - ELF FEMALE @@ -404,7 +402,6 @@ - ETC FEMALE @@ -423,7 +420,6 @@ - ETC FEMALE @@ -442,7 +438,6 @@ - ETC FEMALE @@ -461,7 +456,6 @@ - ETC FEMALE @@ -480,7 +474,6 @@ - ETC FEMALE @@ -499,7 +492,6 @@ - ETC FEMALE @@ -518,7 +510,6 @@ - ETC FEMALE diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40000-40099.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40000-40099.xml index a58caa6310..aaf449bab1 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40000-40099.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40000-40099.xml @@ -508,9 +508,28 @@ - icon.skill0000 + 1 A1 + 5 + 0 + SELF + SINGLE + 1 + 92400 + + + 76 + 999 + CASTER + + + + + 4 + + + diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40100-40199.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40100-40199.xml index bf4921b6fa..18c04bd5ed 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40100-40199.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/40100-40199.xml @@ -374,9 +374,27 @@ A1 - - icon.skill0000 + 1 A1 + 5 + 0 + SELF + SINGLE + 1 + 93704 + + + 60 + 999 + CASTER + + + + + 11 + + + diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml index 383cb1dabc..6b6f5cb982 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml @@ -707,7 +707,7 @@ 91983 - 78 + 40 diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/pvp.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/pvp.xml index 6635dfc635..5841cf20c5 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/pvp.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/pvp.xml @@ -39,7 +39,6 @@ - @@ -51,4 +50,22 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/timed_hunting.xml b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/timed_hunting.xml index 7a87e57440..d98f7cfcc8 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/timed_hunting.xml +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/zones/timed_hunting.xml @@ -5,4 +5,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java index 26c97b88fb..6c544911de 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java @@ -846,8 +846,15 @@ public class Config public static List TELNET_HOSTS; public static int TELNET_PORT; public static long TIME_LIMITED_ZONE_INITIAL_TIME; + public static long TIME_LIMITED_ZONE_PRIMEVAL; + public static long TIME_LIMITED_ZONE_ANTHARAS; + public static long TIME_LIMITED_MAX_ADDED_PRIMEVAL; + public static long TIME_LIMITED_MAX_ADDED_ALLIGATOR; + public static long TIME_LIMITED_MAX_ADDED_GARDEN; + public static long TIME_LIMITED_MAX_ADDED_ANTHARAS; public static long TIME_LIMITED_MAX_ADDED_TIME; public static long TIME_LIMITED_ZONE_RESET_DELAY; + public static long TIME_LIMITED_ZONE_RESET_DELAY_ANTHARAS; public static long TIME_LIMITED_ZONE_TELEPORT_FEE; public static boolean TRAINING_CAMP_ENABLE; public static boolean TRAINING_CAMP_PREMIUM_ONLY; @@ -1906,9 +1913,16 @@ public class Config // Load Time Limited Zone config file (if exists) final PropertiesParser timeLimitedZoneSettings = new PropertiesParser(TIME_LIMITED_ZONE_CONFIG_FILE); + TIME_LIMITED_ZONE_PRIMEVAL = timeLimitedZoneSettings.getLong("PrimevalStart", 7200000); + TIME_LIMITED_ZONE_ANTHARAS = timeLimitedZoneSettings.getLong("AntharasLairStart", 25200000); + TIME_LIMITED_MAX_ADDED_PRIMEVAL = timeLimitedZoneSettings.getLong("PrimevalMaxTime", 46800000); + TIME_LIMITED_MAX_ADDED_ALLIGATOR = timeLimitedZoneSettings.getLong("AlligatorMaxTime", 10800000); + TIME_LIMITED_MAX_ADDED_GARDEN = timeLimitedZoneSettings.getLong("PrimevalGardenMaxTime", 21600000); + TIME_LIMITED_MAX_ADDED_ANTHARAS = timeLimitedZoneSettings.getLong("AntharasLairMaxTime", 151200000); TIME_LIMITED_ZONE_INITIAL_TIME = timeLimitedZoneSettings.getLong("InitialTime", 3600000); TIME_LIMITED_MAX_ADDED_TIME = timeLimitedZoneSettings.getLong("MaximumAddedTime", 18000000); TIME_LIMITED_ZONE_RESET_DELAY = timeLimitedZoneSettings.getLong("ResetDelay", 36000000); + TIME_LIMITED_ZONE_RESET_DELAY_ANTHARAS = timeLimitedZoneSettings.getLong("AntharasLairResetDelay", 604800000); TIME_LIMITED_ZONE_TELEPORT_FEE = timeLimitedZoneSettings.getLong("TeleportFee", 10000); // Load Magic Lamp config file (if exists) diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index d8c19f06ba..b681823d4a 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14368,7 +14368,16 @@ public class PlayerInstance extends Playable public boolean isInTimedHuntingZone(int x, int y) { - return isInTimedHuntingZone(1, x, y); // Primeval Isle + return isInTimedHuntingZone(1, x, y) // Primeval Isle + || isInTimedHuntingZone(4, x, y) // Primeval Garden + || isInTimedHuntingZone(11, x, y) // Aligator Island + || isInTimedHuntingZone(12, x, y) // Antharas Lair + || isInTimedHuntingZone(101, x, y) // Transcendent Instance Zone 1 + || isInTimedHuntingZone(102, x, y) // Transcendent Instance Zone 2 + || isInTimedHuntingZone(103, x, y) // Transcendent Instance Zone 3 + || isInTimedHuntingZone(104, x, y) // Transcendent Instance Zone 4 + || isInTimedHuntingZone(106, x, y) // Transcendent Instance Zone 6 + || isInTimedHuntingZone(107, x, y); // Transcendent Instance Zone 7 } public boolean isInTimedHuntingZone(int zoneId) @@ -14387,6 +14396,42 @@ public class PlayerInstance extends Playable { return (x == 20) && (y == 17); } + case 4: // Primeval Garden + { + return (x == 24) && (y == 19); + } + case 11: // Primeval Garden + { + return (x == 23) && (y == 23); + } + case 12: // Antharas Lair + { + return (x == 25) && (y == 21); + } + case 101: // Transcendent Instance Zone 1 + { + return (x == 21) && (y == 18); + } + case 102: // Transcendent Instance Zone 2 + { + return (x == 23) && (y == 19); + } + case 103: // Transcendent Instance Zone 3 + { + return (x == 24) && (y == 17); + } + case 104: // Transcendent Instance Zone 4 + { + return (x == 24) && (y == 18); + } + case 106: // Transcendent Instance Zone 6 + { + return (x == 23) && (y == 21); + } + case 107: // Transcendent Instance Zone 7 + { + return (x == 18) && (y == 22); + } } return false; } diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/zone/type/TimedHuntingZone.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/zone/type/TimedHuntingZone.java index fd82de053a..84d7403aff 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/zone/type/TimedHuntingZone.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/zone/type/TimedHuntingZone.java @@ -45,10 +45,56 @@ public class TimedHuntingZone extends ZoneType final long currentTime = System.currentTimeMillis(); final long primevalIsleExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 1, 0); + final long PrimevalGardenExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 4, 0); + final long AlligatorIslandExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 11, 0); + final long AntharasLairExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 12, 0); + final long Transcendent1ExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 101, 0); + final long Transcendent2ExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 102, 0); + final long Transcendent3ExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 103, 0); + final long Transcendent4ExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 104, 0); + final long Transcendent6ExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 106, 0); + final long Transcendent7ExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 107, 0); + if ((primevalIsleExitTime > currentTime) && player.isInTimedHuntingZone(1)) { player.startTimedHuntingZone(1, primevalIsleExitTime - currentTime); } + else if ((PrimevalGardenExitTime > currentTime) && player.isInTimedHuntingZone(4)) + { + player.startTimedHuntingZone(4, PrimevalGardenExitTime - currentTime); + } + else if ((AlligatorIslandExitTime > currentTime) && player.isInTimedHuntingZone(11)) + { + player.startTimedHuntingZone(11, AlligatorIslandExitTime - currentTime); + } + else if ((AntharasLairExitTime > currentTime) && player.isInTimedHuntingZone(12)) + { + player.startTimedHuntingZone(12, AntharasLairExitTime - currentTime); + } + else if ((Transcendent1ExitTime > currentTime) && player.isInTimedHuntingZone(101)) + { + player.startTimedHuntingZone(101, Transcendent1ExitTime - currentTime); + } + else if ((Transcendent2ExitTime > currentTime) && player.isInTimedHuntingZone(102)) + { + player.startTimedHuntingZone(102, Transcendent2ExitTime - currentTime); + } + else if ((Transcendent3ExitTime > currentTime) && player.isInTimedHuntingZone(103)) + { + player.startTimedHuntingZone(103, Transcendent3ExitTime - currentTime); + } + else if ((Transcendent4ExitTime > currentTime) && player.isInTimedHuntingZone(104)) + { + player.startTimedHuntingZone(104, Transcendent4ExitTime - currentTime); + } + else if ((Transcendent6ExitTime > currentTime) && player.isInTimedHuntingZone(106)) + { + player.startTimedHuntingZone(106, Transcendent6ExitTime - currentTime); + } + else if ((Transcendent7ExitTime > currentTime) && player.isInTimedHuntingZone(107)) + { + player.startTimedHuntingZone(107, Transcendent7ExitTime - currentTime); + } else if (!player.isGM()) { player.teleToLocation(MapRegionManager.getInstance().getTeleToLocation(player, TeleportWhereType.TOWN)); diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/sessionzones/ExTimedHuntingZoneEnter.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/sessionzones/ExTimedHuntingZoneEnter.java index 9ff760bc0c..8637b7afd4 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/sessionzones/ExTimedHuntingZoneEnter.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/sessionzones/ExTimedHuntingZoneEnter.java @@ -83,7 +83,12 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket return; } - if ((_zoneId == 1) && (player.getLevel() < 78)) + if (((_zoneId == 1) && (player.getLevel() < 40)) // + || ((_zoneId == 4) && (player.getLevel() < 76)) // + || ((_zoneId == 11) && (player.getLevel() < 60)) // + || ((_zoneId == 12) && (player.getLevel() < 80)) // + || ((_zoneId == 101) && (player.getLevel() < 40)) // + ) { player.sendMessage("Your level does not correspond the zone equivalent."); } @@ -116,6 +121,51 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket player.teleToLocation(9400, -21720, -3634); break; } + case 4: // Forgotten Primeval Garden + { + player.teleToLocation(-112937, 213590, -13248); + break; + } + case 11: // Aligator Island + { + player.teleToLocation(115528, 191580, -3371); + break; + } + case 12: // Antharas Lair + { + player.teleToLocation(133247, 114445, -3724); + break; + } + case 101: // Transcendent Instance Zone 1 + { + player.teleToLocation(63443, 26304, -3755); + break; + } + case 102: // Transcendent Instance Zone 2 + { + player.teleToLocation(125277, 70262, -4408); + break; + } + case 103: // Transcendent Instance Zone 3 + { + player.teleToLocation(148724, -22366, -3436); + break; + } + case 104: // Transcendent Instance Zone 4 + { + player.teleToLocation(167965, 28800, -3606); + break; + } + case 106: // Transcendent Instance Zone 6 + { + player.teleToLocation(99797, 110524, -3702); + break; + } + case 107: // Transcendent Instance Zone 7 + { + player.teleToLocation(-50416, 145363, -2825); + break; + } } } else diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/sessionzones/TimedHuntingZoneList.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/sessionzones/TimedHuntingZoneList.java index 6c189ba05d..89138c9efa 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/sessionzones/TimedHuntingZoneList.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/sessionzones/TimedHuntingZoneList.java @@ -45,7 +45,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket final long currentTime = System.currentTimeMillis(); long endTime; - packet.writeD(1); // zone count + packet.writeD(10); // zone count // Primeval Isle packet.writeD(1); // required item count @@ -53,10 +53,94 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count packet.writeD(1); // reset cycle packet.writeD(1); // zone id - packet.writeD(78); // min level + packet.writeD(40); // min level packet.writeD(999); // max level packet.writeD(0); // remain time base? - endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 2, 0); + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 1, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_PRIMEVAL; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_PRIMEVAL / 1000)); + packet.writeD(43200); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Forgotten Primeval Garden + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(4); // zone id + packet.writeD(76); // min level + packet.writeD(999); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 4, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_GARDEN / 1000)); + packet.writeD(18000); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Alligator Island + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(11); // zone id + packet.writeD(60); // min level + packet.writeD(999); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 11, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_ALLIGATOR / 1000)); + packet.writeD(7200); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Antharas Lair + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(0); // reset cycle + packet.writeD(12); // zone id + packet.writeD(80); // min level + packet.writeD(999); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 12, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY_ANTHARAS) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_ANTHARAS; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_ANTHARAS / 1000)); + packet.writeD(126000); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Transcendent Instance Zone 1 + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(101); // zone id + packet.writeD(40); // min level + packet.writeD(49); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 101, 0); if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) { endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; @@ -66,6 +150,112 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket packet.writeD(3600); // remain refill time packet.writeD(3600); // refill time max packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Transcendent Instance Zone 2 + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(102); // zone id + packet.writeD(50); // min level + packet.writeD(59); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 102, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000)); + packet.writeD(3600); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Transcendent Instance Zone 3 + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(103); // zone id + packet.writeD(60); // min level + packet.writeD(69); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 103, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000)); + packet.writeD(3600); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Transcendent Instance Zone 4 + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(104); // zone id + packet.writeD(70); // min level + packet.writeD(79); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 104, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000)); + packet.writeD(3600); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Transcendent Instance Zone 6 + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(106); // zone id + packet.writeD(80); // min level + packet.writeD(999); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 106, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000)); + packet.writeD(3600); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); + + // Transcendent Instance Zone 7 + packet.writeD(1); // required item count + packet.writeD(57); // item id + packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count + packet.writeD(1); // reset cycle + packet.writeD(107); // zone id + packet.writeD(85); // min level + packet.writeD(999); // max level + packet.writeD(0); // remain time base? + endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 107, 0); + if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime) + { + endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME; + } + packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time + packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000)); + packet.writeD(3600); // remain refill time + packet.writeD(3600); // refill time max + packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D) + packet.writeH(0); return true; }