From e44b7b25072732e50c6dc89114c6a2aec3408a8a Mon Sep 17 00:00:00 2001 From: Zoey76 <zoey_76@msn.com> Date: Fri, 11 Jul 2014 03:38:45 +0000 Subject: [PATCH] BETA: Rainbow Springs Chateau fixes: * Clan hall script enabled. * Allows Game Masters to give the hall to a clan. * More retail text passages. * Fixed registration ends format. * Fixed NPC types. * Added buy lists. Patch by: Pandragon Reviewed by: jurchiks, Zoey76 --- .../dist/game/data/buylists/0135605.xml | 9 ++++ .../dist/game/data/buylists/0235605.xml | 17 ++++++ .../dist/game/data/buylists/0335605.xml | 52 +++++++++++++++++++ L2J_DataPack_BETA/dist/game/data/scripts.cfg | 2 +- .../DevastatedCastle/DevastatedCastle.java | 2 +- .../FortressOfResistance.java | 2 +- .../FortressOfTheDead/FortressOfTheDead.java | 2 +- .../RainbowSpringsChateau.java | 48 ++++++++--------- .../conquerablehalls/flagwar/FlagWar.java | 26 ++++------ .../dist/game/data/stats/npcs/35600-35700.xml | 6 +-- 10 files changed, 118 insertions(+), 48 deletions(-) create mode 100644 L2J_DataPack_BETA/dist/game/data/buylists/0135605.xml create mode 100644 L2J_DataPack_BETA/dist/game/data/buylists/0235605.xml create mode 100644 L2J_DataPack_BETA/dist/game/data/buylists/0335605.xml diff --git a/L2J_DataPack_BETA/dist/game/data/buylists/0135605.xml b/L2J_DataPack_BETA/dist/game/data/buylists/0135605.xml new file mode 100644 index 0000000000..603ee17dcc --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/buylists/0135605.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/buylist.xsd"> + <npcs> + <npc>35605</npc> <!-- Angout (Steward) --> + </npcs> + <item id="6902" /> <!-- Pledge Shield --> + <item id="1829" count="5" restock_delay="60" /> <!-- Scroll of Escape: Clan Hall --> + <item id="5169" count="5" restock_delay="60" /> <!-- Deluxe Food for Strider --> +</list> diff --git a/L2J_DataPack_BETA/dist/game/data/buylists/0235605.xml b/L2J_DataPack_BETA/dist/game/data/buylists/0235605.xml new file mode 100644 index 0000000000..6117b533c9 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/buylists/0235605.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/buylist.xsd"> + <npcs> + <npc>35605</npc> <!-- Angout (Steward) --> + </npcs> + <item id="6902" /> <!-- Pledge Shield --> + <item id="1829" count="5" restock_delay="60" /> <!-- Scroll of Escape: Clan Hall --> + <item id="5858" count="2" restock_delay="60" /> <!-- Blessed Scroll of Escape: Clan Hall --> + <item id="5169" count="10" restock_delay="60" /> <!-- Deluxe Food for Strider --> + <item id="952" count="1" restock_delay="240" /> <!-- Scroll: Enchant Armor (C-Grade) --> + <item id="7133" count="1" restock_delay="60" /> <!-- Scroll of Escape: Town of Goddard --> + <item id="7132" count="1" restock_delay="60" /> <!-- Scroll of Escape: Town of Aden --> + <item id="8644" count="1" restock_delay="120" /> <!-- Recipe: Elixir of Life (A-Grade) (100%) --> + <item id="8650" count="1" restock_delay="120" /> <!-- Recipe: Elixir of Mental Strength (A-Grade) (100%) --> + <item id="9952" count="2" restock_delay="120" /> <!-- Orange Talisman - Hot Springs CP Potion --> + <item id="10166" count="1" restock_delay="120" /> <!-- Hot Springs CP Potion --> +</list> diff --git a/L2J_DataPack_BETA/dist/game/data/buylists/0335605.xml b/L2J_DataPack_BETA/dist/game/data/buylists/0335605.xml new file mode 100644 index 0000000000..cebbc79f15 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/buylists/0335605.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/buylist.xsd"> + <npcs> + <npc>35605</npc> <!-- Angout (Steward) --> + </npcs> + <item id="6902" /> <!-- Pledge Shield --> + <item id="1829" count="5" restock_delay="60" /> <!-- Scroll of Escape: Clan Hall --> + <item id="5858" count="2" restock_delay="60" /> <!-- Blessed Scroll of Escape: Clan Hall --> + <item id="5169" count="10" restock_delay="60" /> <!-- Deluxe Food for Strider --> + <item id="952" count="1" restock_delay="240" /> <!-- Scroll: Enchant Armor (C-Grade) --> + <item id="7133" count="1" restock_delay="60" /> <!-- Scroll of Escape: Town of Goddard --> + <item id="7132" count="1" restock_delay="60" /> <!-- Scroll of Escape: Town of Aden --> + <item id="7583" count="1" restock_delay="120" /> <!-- Pet Exchange Ticket: Buffalo --> + <item id="6927" count="1" restock_delay="60" /> <!-- Recipe: Healing Potion (100%) --> + <item id="6933" count="1" restock_delay="60" /> <!-- Recipe: Haste Potion (100%) --> + <item id="6934" count="1" restock_delay="60" /> <!-- Recipe: Alacrity Potion (100%) --> + <item id="6930" count="1" restock_delay="60" /> <!-- Recipe: Greater Antidote (100%) --> + <item id="6932" count="1" restock_delay="60" /> <!-- Recipe: Emergency Dressing (100%) --> + <item id="6937" count="1" restock_delay="60" /> <!-- Recipe: Magic Haste Potion (100%) --> + <item id="6930" count="1" restock_delay="60" /> <!-- Recipe: Greater Antidote (100%) --> + <item id="6920" count="1" restock_delay="60" /> <!-- Recipe: Greater Fish Oil (100%) --> + <item id="8364" count="1" restock_delay="60" /> <!-- Recipe: Party Hat (100%) --> + <item id="6925" count="1" restock_delay="60" /> <!-- Recipe: Monocle (100%) --> + <item id="6943" count="1" restock_delay="60" /> <!-- Recipe: Dye Potion - A (100%) --> + <item id="6944" count="1" restock_delay="60" /> <!-- Recipe: Dye Potion - B (100%) --> + <item id="6945" count="1" restock_delay="60" /> <!-- Recipe: Dye Potion - C (100%) --> + <item id="6946" count="1" restock_delay="60" /> <!-- Recipe: Dye Potion - D (100%) --> + <item id="6990" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of STR (100%) --> + <item id="6991" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of STR (100%) --> + <item id="6992" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of CON (100%) --> + <item id="6993" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of CON (100%) --> + <item id="6994" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of DEX (100%) --> + <item id="6995" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of DEX (100%) --> + <item id="6996" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of INT (100%) --> + <item id="6997" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of INT (100%) --> + <item id="6998" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of MEN (100%) --> + <item id="6999" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of MEN (100%) --> + <item id="7000" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of WIT (100%) --> + <item id="7001" count="1" restock_delay="60" /> <!-- Recipe: Greater Dye of WIT (100%) --> + <item id="8645" count="1" restock_delay="60" /> <!-- Recipe: Elixir of Life (S-Grade) (100%) --> + <item id="8651" count="1" restock_delay="60" /> <!-- Recipe: Elixir of Mental Strength (S-Grade) (100%) --> + <item id="9605" count="1" restock_delay="60" /> <!-- Agathion Seal Bracelet - Rainbow Clan Hall --> + <item id="10141" count="1" restock_delay="60" /> <!-- Grey Talisman - Yeti Transform --> + <item id="9952" count="2" restock_delay="120" /> <!-- Orange Talisman - Hot Springs CP Potion --> + <item id="8751" count="1" restock_delay="120" /> <!-- High-Grade Life Stone - Level 70 --> + <item id="8762" count="1" restock_delay="720" /> <!-- Top-Grade Life Stone - Level 76 --> + <item id="16117" /> <!-- Recipe - Refined Penguin Hat (10%) --> + <item id="16120" /> <!-- Recipe - Refined Turtle Hat (10%) --> + <item id="16129" count="10" restock_delay="60" /> <!-- Fabric of Refined Penguin Hat --> + <item id="16132" count="10" restock_delay="60" /> <!-- Fabric of Refined Turtle Hat --> + <item id="10166" count="1" restock_delay="120" /> <!-- Hot Springs CP Potion --> +</list> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 9fea1d3fb7..b758fbe18c 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -348,7 +348,7 @@ conquerablehalls/flagwar/WildBeastReserve/WildBeastReserve.java conquerablehalls/DevastatedCastle/DevastatedCastle.java conquerablehalls/FortressOfResistance/FortressOfResistance.java conquerablehalls/FortressOfTheDead/FortressOfTheDead.java -#conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java +conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java # Events events/CharacterBirthday/CharacterBirthday.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/DevastatedCastle/DevastatedCastle.java b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/DevastatedCastle/DevastatedCastle.java index d9746106c1..be20e69498 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/DevastatedCastle/DevastatedCastle.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/DevastatedCastle/DevastatedCastle.java @@ -48,7 +48,7 @@ public final class DevastatedCastle extends ClanHallSiegeEngine private DevastatedCastle() { - super(-1, DevastatedCastle.class.getSimpleName(), "conquerablehalls", DEVASTATED_CASTLE); + super(DevastatedCastle.class.getSimpleName(), "conquerablehalls", DEVASTATED_CASTLE); addKillId(GUSTAV); addSpawnId(MIKHAIL); addSpawnId(DIETRICH); diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java index 4e2aa63449..2d2658fcb6 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java @@ -57,7 +57,7 @@ public final class FortressOfResistance extends ClanHallSiegeEngine private FortressOfResistance() { - super(-1, FortressOfResistance.class.getSimpleName(), "conquerablehalls", FORTRESS_RESSISTANCE); + super(FortressOfResistance.class.getSimpleName(), "conquerablehalls", FORTRESS_RESSISTANCE); addFirstTalkId(MESSENGER); addKillId(BLOODY_LORD_NURKA); addAttackId(BLOODY_LORD_NURKA); diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfTheDead/FortressOfTheDead.java b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfTheDead/FortressOfTheDead.java index ee0d365877..bed602ae5c 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfTheDead/FortressOfTheDead.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/FortressOfTheDead/FortressOfTheDead.java @@ -46,7 +46,7 @@ public final class FortressOfTheDead extends ClanHallSiegeEngine public FortressOfTheDead() { - super(-1, FortressOfTheDead.class.getSimpleName(), "conquerablehalls", FORTRESS_OF_DEAD); + super(FortressOfTheDead.class.getSimpleName(), "conquerablehalls", FORTRESS_OF_DEAD); addKillId(LIDIA); addKillId(ALFRED); addKillId(GISELLE); diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java index 5ace20f622..6cd3210e8f 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java @@ -29,7 +29,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ScheduledFuture; -import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; @@ -38,7 +37,6 @@ import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.datatables.ClanTable; import com.l2jserver.gameserver.datatables.NpcData; -import com.l2jserver.gameserver.datatables.SkillData; import com.l2jserver.gameserver.datatables.SpawnTable; import com.l2jserver.gameserver.instancemanager.CHSiegeManager; import com.l2jserver.gameserver.instancemanager.ZoneManager; @@ -51,11 +49,11 @@ import com.l2jserver.gameserver.model.TeleportWhereType; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.entity.clanhall.ClanHallSiegeEngine; import com.l2jserver.gameserver.model.entity.clanhall.SiegableHall; import com.l2jserver.gameserver.model.entity.clanhall.SiegeStatus; import com.l2jserver.gameserver.model.items.L2Item; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.skills.Skill; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.NpcSay; @@ -65,10 +63,8 @@ import com.l2jserver.gameserver.util.Util; * Rainbow Springs Chateau clan hall siege script. * @author BiggBoss */ -public final class RainbowSpringsChateau extends Quest +public final class RainbowSpringsChateau extends ClanHallSiegeEngine { - private static final Logger _log = Logger.getLogger(RainbowSpringsChateau.class.getName()); - protected static class SetFinalAttackers implements Runnable { @Override @@ -151,6 +147,14 @@ public final class RainbowSpringsChateau extends Quest } } + public static L2Clan _winner; + + @Override + public L2Clan getWinner() + { + return _winner; + } + private static class SiegeEnd implements Runnable { private final L2Clan _winner; @@ -250,22 +254,12 @@ public final class RainbowSpringsChateau extends Quest private static final String[] _textPassages = { - "Text Passage 1", - "Passage Text 2", - "Im getting out of ideas", - "But i can write few more", - "Are five sentences", - "enough for this f*** siege?", - "i think ill add few more", - "like this one", - "Please, if you know the true passages", - "Contact me at L2JForum =)" + "Fight for Rainbow Springs!", + "Are you a match for the Yetti?", + "Did somebody order a knuckle sandwich?" }; - private static final Skill[] DEBUFFS = - { - SkillData.getInstance().getSkill(0, 1) - }; + private static final Skill[] DEBUFFS = {}; protected static Map<Integer, Long> _warDecreesCount = new HashMap<>(); protected static List<L2Clan> _acceptedClans = new ArrayList<>(4); @@ -276,9 +270,9 @@ public final class RainbowSpringsChateau extends Quest protected static ScheduledFuture<?> _nextSiege, _siegeEnd; private static String _registrationEnds; - private RainbowSpringsChateau() + public RainbowSpringsChateau() { - super(-1, RainbowSpringsChateau.class.getSimpleName(), "conquerablehalls"); + super(RainbowSpringsChateau.class.getSimpleName(), "conquerablehalls", RAINBOW_SPRINGS); addFirstTalkId(MESSENGER); addTalkId(MESSENGER); @@ -686,7 +680,7 @@ public final class RainbowSpringsChateau extends Quest return null; } - private static void portToArena(L2PcInstance leader, int arena) + private void portToArena(L2PcInstance leader, int arena) { if ((arena < 0) || (arena > 3)) { @@ -867,7 +861,8 @@ public final class RainbowSpringsChateau extends Quest } } - private static void loadAttackers() + @Override + public void loadAttackers() { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { @@ -898,7 +893,7 @@ public final class RainbowSpringsChateau extends Quest int hour = c.get(Calendar.HOUR); int mins = c.get(Calendar.MINUTE); - _registrationEnds = year + "-" + month + "-" + day + " " + hour + ":" + mins; + _registrationEnds = year + "-" + month + "-" + day + " " + hour + (mins < 10 ? ":0" : ":") + mins; } public static void launchSiege() @@ -907,7 +902,8 @@ public final class RainbowSpringsChateau extends Quest ThreadPoolManager.getInstance().executeGeneral(new SiegeStart()); } - public static void endSiege() + @Override + public void endSiege() { if (_siegeEnd != null) { diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java index 2103e2e86d..a4773b98b3 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java @@ -99,7 +99,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine public FlagWar(String name, int hallId) { - super(-1, name, "conquerablehalls/flagwar", hallId); + super(name, "conquerablehalls/flagwar", hallId); addStartNpc(MESSENGER); addFirstTalkId(MESSENGER); addTalkId(MESSENGER); @@ -406,23 +406,19 @@ public abstract class FlagWar extends ClanHallSiegeEngine doUnSpawns(data); } - ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() + ThreadPoolManager.getInstance().scheduleGeneral(() -> { - @Override - public void run() + for (int doorId : INNER_DOORS_TO_OPEN) { - for (int doorId : INNER_DOORS_TO_OPEN) - { - _hall.openCloseDoor(doorId, false); - } - - for (Entry<Integer, ClanData> e : _data.entrySet()) - { - doSpawns(e.getKey(), e.getValue()); - } - - _hall.getSiegeZone().setIsActive(true); + _hall.openCloseDoor(doorId, false); } + + for (Entry<Integer, ClanData> e : _data.entrySet()) + { + doSpawns(e.getKey(), e.getValue()); + } + + _hall.getSiegeZone().setIsActive(true); }, 300000); } } diff --git a/L2J_DataPack_BETA/dist/game/data/stats/npcs/35600-35700.xml b/L2J_DataPack_BETA/dist/game/data/stats/npcs/35600-35700.xml index 3a29a5c275..a97e402ecb 100644 --- a/L2J_DataPack_BETA/dist/game/data/stats/npcs/35600-35700.xml +++ b/L2J_DataPack_BETA/dist/game/data/stats/npcs/35600-35700.xml @@ -36,7 +36,7 @@ <height normal="10.5" /> </collision> </npc> - <npc id="35601" level="70" type="L2Npc" name="Doorman"> + <npc id="35601" level="70" type="L2CastleDoormen" name="Doorman"> <!-- Confirmed CT2.5 --> <parameters> <param name="MoveAroundSocial" value="0" /> @@ -78,7 +78,7 @@ <height normal="10.5" /> </collision> </npc> - <npc id="35602" level="70" type="L2Npc" name="Doorman"> + <npc id="35602" level="70" type="L2CastleDoormen" name="Doorman"> <!-- Confirmed CT2.5 --> <parameters> <param name="MoveAroundSocial" value="0" /> @@ -202,7 +202,7 @@ <height normal="10.5" /> </collision> </npc> - <npc id="35605" level="56" type="L2Npc" name="Angout" title="Steward"> + <npc id="35605" level="56" type="L2ClanHallManager" name="Angout" title="Steward"> <!-- Confirmed CT2.5 --> <parameters> <param name="MoveAroundSocial" value="80" /> -- GitLab