From be30b8a22b236e35df71740a2c5e70666eab7f15 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 28 Jul 2017 13:08:20 +0000 Subject: [PATCH] Dropped some unusable AI scripts. --- .../BlackMarketeerOfMammon/31092-01.html | 6 - .../BlackMarketeerOfMammon/31092-02.html | 5 - .../BlackMarketeerOfMammon/31092-03.html | 5 - .../BlackMarketeerOfMammon/31092-04.html | 5 - .../others/BlackMarketeerOfMammon/31092.html | 11 - .../BlackMarketeerOfMammon.java | 91 --- .../FortressArcherCaptain-01.html | 3 - .../FortressArcherCaptain.html | 3 - .../FortressArcherCaptain.java | 73 --- .../FortressSiegeManager-01.html | 5 - .../FortressSiegeManager-02.html | 3 - .../FortressSiegeManager-03.html | 3 - .../FortressSiegeManager-04.html | 4 - .../FortressSiegeManager-05.html | 3 - .../FortressSiegeManager-06.html | 4 - .../FortressSiegeManager-07.html | 3 - .../FortressSiegeManager-08.html | 3 - .../FortressSiegeManager-09.html | 3 - .../FortressSiegeManager-10.html | 3 - .../FortressSiegeManager-11.html | 7 - .../FortressSiegeManager-12.html | 3 - .../FortressSiegeManager-13.html | 5 - .../FortressSiegeManager-14.html | 5 - .../FortressSiegeManager-15.html | 5 - .../FortressSiegeManager-16.html | 4 - .../FortressSiegeManager-17.html | 3 - .../FortressSiegeManager-18.html | 3 - .../FortressSiegeManager-19.html | 4 - .../FortressSiegeManager-20.html | 4 - .../FortressSiegeManager-21.html | 4 - .../FortressSiegeManager.html | 4 - .../FortressSiegeManager.java | 218 ------- .../ai/others/LaVieEnRose/33825-1.html | 18 - .../ai/others/LaVieEnRose/33825-2.html | 18 - .../ai/others/LaVieEnRose/33825-help.html | 19 - .../others/LaVieEnRose/33825-norestore.html | 17 - .../scripts/ai/others/LaVieEnRose/33825.html | 22 - .../ai/others/LaVieEnRose/LaVieEnRose.java | 154 ----- .../ai/others/ManorManager/ManorManager.java | 159 ----- .../others/ManorManager/manager-help-01.htm | 13 - .../others/ManorManager/manager-help-02.htm | 11 - .../others/ManorManager/manager-help-03.htm | 8 - .../ai/others/ManorManager/manager-lord.htm | 5 - .../ai/others/ManorManager/manager.htm | 16 - .../ai/others/MentorGuide/33587-01.htm | 12 - .../ai/others/MentorGuide/33587-02.htm | 4 - .../ai/others/MentorGuide/33587-03.htm | 5 - .../ai/others/MentorGuide/33587-04.htm | 3 - .../ai/others/MentorGuide/33587-05.htm | 7 - .../ai/others/MentorGuide/33587-06.htm | 6 - .../ai/others/MentorGuide/33587-07.htm | 6 - .../ai/others/MentorGuide/MentorGuide.java | 554 ------------------ 52 files changed, 1562 deletions(-) delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-01.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-02.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-04.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain-01.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.java delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-01.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-02.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-03.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-04.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-05.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-06.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-07.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-08.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-09.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-10.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-11.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-12.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-13.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-14.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-15.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-16.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-17.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-18.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-19.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-20.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-21.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-1.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-2.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-help.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-norestore.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825.html delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/ManorManager.java delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-01.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-02.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-03.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-lord.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-01.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-02.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-03.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-04.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-05.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-06.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-07.htm delete mode 100644 L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-01.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-01.html deleted file mode 100644 index 29e2c86481..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-01.html +++ /dev/null @@ -1,6 +0,0 @@ -Black Marketeer of Mammon:
-[Exchange Ancient Adena for Adena]
-Enter the amount of Ancient Adena you wish to exchange.
- - - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html deleted file mode 100644 index 75b268b1b1..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html +++ /dev/null @@ -1,5 +0,0 @@ -Black Marketeer of Mammon:
-[Exchange failure]
-You don't have enough of the item that you're trying to exchange.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-04.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-04.html deleted file mode 100644 index f5d84f67b8..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-04.html +++ /dev/null @@ -1,5 +0,0 @@ -Black Marketeer of Mammon:
-[Exchange success]
-Thank you! There you go! Are you satisfied now? Or do you want to exchange something else?
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html deleted file mode 100644 index 0775c5ecc3..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html +++ /dev/null @@ -1,11 +0,0 @@ -Black Marketeer of Mammon:
-The Lords of Dawn and the Revolutionary Troops of Dusk use Ancient Adena as their currency, following in the old empire's tradition.
-Tradition and customs are important but they are so old... If you were to go to the market with that money in this day and age, you couldn't buy a thing.
-Do you have any ancient adena that you don't know what to do with? If you do, I'll exchange them for adena.
-Also, if your weapon has a special ability that you do not want, I can remove that, too. I dont't know why you would want to take off a special ability that's been bestowed on your weapon, but we'll do anything for adena.
-I have also obtained some rare goods, so stop by some time - these items aren't easy to obtain!
- - - - - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java deleted file mode 100644 index 6b78359e06..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package ai.others.BlackMarketeerOfMammon; - -import java.util.StringTokenizer; - -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.itemcontainer.Inventory; -import com.l2jmobius.gameserver.util.Util; - -import ai.AbstractNpcAI; - -/** - * Black Marketeer of Mammon AI. - * @author St3eT - */ -public final class BlackMarketeerOfMammon extends AbstractNpcAI -{ - // NPC - private static final int BLACK_MARKETEER = 31092; - - private BlackMarketeerOfMammon() - { - addStartNpc(BLACK_MARKETEER); - addTalkId(BLACK_MARKETEER); - addFirstTalkId(BLACK_MARKETEER); - } - - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - if (event.equals("31092-01.html")) - { - return event; - } - else if (event.startsWith("exchange")) - { - final StringTokenizer st = new StringTokenizer(event, " "); - event = st.nextToken(); - - if (!st.hasMoreElements()) - { - return "31092-02.html"; - } - - final String value = st.nextToken(); - if (!Util.isDigit(value)) - { - return "31092-02.html"; - } - - final long count = Integer.parseInt(value); - final long AAcount = player.getAncientAdena(); - - if (count < 1) - { - return "31092-02.html"; - } - - if (count > AAcount) - { - return "31092-03.html"; - - } - takeItems(player, Inventory.ANCIENT_ADENA_ID, count); - giveAdena(player, count, false); - return "31092-04.html"; - } - return super.onAdvEvent(event, npc, player); - } - - public static void main(String[] args) - { - new BlackMarketeerOfMammon(); - } -} diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain-01.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain-01.html deleted file mode 100644 index 68a68fb6da..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain-01.html +++ /dev/null @@ -1,3 +0,0 @@ - -Can't you see that I am busy? Continue to bother me and you'll finish your days as a toad in the castle pond!

- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.html deleted file mode 100644 index 466e228ac7..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.html +++ /dev/null @@ -1,3 +0,0 @@ - -I can even shoot an arrow and hit a bird at 100 meters! - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.java b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.java deleted file mode 100644 index 1472def936..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressArcherCaptain/FortressArcherCaptain.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package ai.others.FortressArcherCaptain; - -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; - -import ai.AbstractNpcAI; - -/** - * Fortress Archer Captain AI. - * @author St3eT - */ -public final class FortressArcherCaptain extends AbstractNpcAI -{ - // NPCs - private static final int[] ARCHER_CAPTAIN = - { - 35661, // Shanty Fortress - 35692, // Southern Fortress - 35730, // Hive Fortress - 35761, // Valley Fortress - 35799, // Ivory Fortress - 35830, // Narsell Fortress - 35861, // Bayou Fortress - 35899, // White Sands Fortress - 35930, // Borderland Fortress - 35968, // Swamp Fortress - 36006, // Archaic Fortress - 36037, // Floran Fortress - 36075, // Cloud Mountain - 36113, // Tanor Fortress - 36144, // Dragonspine Fortress - 36175, // Antharas's Fortress - 36213, // Western Fortress - 36251, // Hunter's Fortress - 36289, // Aaru Fortress - 36320, // Demon Fortress - 36358, // Monastic Fortress - }; - - private FortressArcherCaptain() - { - addStartNpc(ARCHER_CAPTAIN); - addFirstTalkId(ARCHER_CAPTAIN); - } - - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final int fortOwner = npc.getFort().getOwnerClan() == null ? 0 : npc.getFort().getOwnerClan().getId(); - return ((player.getClan() != null) && (player.getClanId() == fortOwner)) ? "FortressArcherCaptain.html" : "FortressArcherCaptain-01.html"; - } - - public static void main(String[] args) - { - new FortressArcherCaptain(); - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-01.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-01.html deleted file mode 100644 index 127800f70d..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-01.html +++ /dev/null @@ -1,5 +0,0 @@ - -Are you curious why I'm here in front of this fortress owned by the %clanName% clan selling my wares, instead of in a nice, safe village?
- - - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-02.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-02.html deleted file mode 100644 index 756d667275..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-02.html +++ /dev/null @@ -1,3 +0,0 @@ - -Whoa -- no need to be suspicious of me, friend. It's a nice day and I'm just out taking a walk to get a breath of fresh air. Don't mind me! - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-03.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-03.html deleted file mode 100644 index 5b3f6a66ef..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-03.html +++ /dev/null @@ -1,3 +0,0 @@ - -We are mercenary soldiers ready to fight if the money is right. We don't take charity cases, though. - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-04.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-04.html deleted file mode 100644 index 1af0b01e52..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-04.html +++ /dev/null @@ -1,4 +0,0 @@ - -Hmm... No offense, but my gut tells me that I shouldn't trust you. Sorry, friend.
-(A clan must be clan level 4 or above to register for a Fortress Battle.) - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-05.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-05.html deleted file mode 100644 index 13f541e295..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-05.html +++ /dev/null @@ -1,3 +0,0 @@ - -All right, then! Let's show these villains who's boss by combining our power. Allow me to call my associates... - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-06.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-06.html deleted file mode 100644 index 8ec0e2a133..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-06.html +++ /dev/null @@ -1,4 +0,0 @@ - -Your attempt to register for the fortress battle has failed.
-(Unless a castle siege is in progress, only clans that are level 4 or higher and do not possess a castle may register. You may only register for one fortress battle at a time.) - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-07.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-07.html deleted file mode 100644 index 6aae0e08e9..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-07.html +++ /dev/null @@ -1,3 +0,0 @@ - -This is not a good time. I will examine the area; come see me again later. - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-08.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-08.html deleted file mode 100644 index a21ef99d4c..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-08.html +++ /dev/null @@ -1,3 +0,0 @@ - -I'm afraid that there's nothing we can do to help right now. Please come back after you've had a chance to freshen up. - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-09.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-09.html deleted file mode 100644 index d4a4fae37c..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-09.html +++ /dev/null @@ -1,3 +0,0 @@ - -Who are you? You seem to have listened to some very inaccurate rumors about me... Ha! - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-10.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-10.html deleted file mode 100644 index ae79146055..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-10.html +++ /dev/null @@ -1,3 +0,0 @@ - -This battle is not some streetgang fight; it is a serious business, with rules and traditions. I don't know your intentions, but I think you'd best bring your senior officer here immediately. - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-11.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-11.html deleted file mode 100644 index 585f1d5b2c..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-11.html +++ /dev/null @@ -1,7 +0,0 @@ -I'll tell you why. You may be surprised to learn that I am a member of the Tactics Corps. You see this fortress? Places just like it used to protect the people of this land from Monsters and foreign armies. And now? Greedy, grasping fools have occupied the fortress, using its might to extort money from the area residents... So I'm guarding this area, searching for someone worthy to defeat that band of bandits and occupy the fortress on behalf of the citizens here.
-You seem a likely candidate... What do you say? You could hire our mercenaries, and with our help I'm sure you'd be able to capture the fortress. Do you want to try?
- - - - - diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-12.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-12.html deleted file mode 100644 index de538ac3cc..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-12.html +++ /dev/null @@ -1,3 +0,0 @@ - -Well... Member of the clan %clanName% of repute! What I just told you was simply mimicking the story I heard from a stranger that I met in the village armor store. Don't take it the wrong way! - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-13.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-13.html deleted file mode 100644 index 5dd52f3c65..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-13.html +++ /dev/null @@ -1,5 +0,0 @@ - -Listen carefully. My lord does not trust the clan currently in possession of this fortress � you can see the effort and expense he has gone to assemble this mercenary force as a counterweight. Were you to expel the current owners and capture the fortress, I am sure he would be most grateful. (Of course, that probably won't last long -- it's not called a "3-day reign" for nothing...)

-Oh, forgive my muttering -- just talking to myself, you know. In any event, let me explain a little about the two types of fortresses.

Territorial fortresses are built within a territory to defend against monster attacks, while border fortresses are established along the boundary between two territories. If you have a map, take a look for yourself and you'll see what I mean. Blue flags indicate territorial fortresses, whereas red flags indicate border fortresses.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-14.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-14.html deleted file mode 100644 index 1762b6cf70..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-14.html +++ /dev/null @@ -1,5 +0,0 @@ - -Knowing a fortress' layout can help you turn the battle to your advantage. Each fortress is essentially a residential area consisting of a large central command post surrounded by several barracks.

-There are 5 types of barracks: defense barracks, archer barracks, support barracks, officer's barracks and a control room. The number of barracks varies depending on the size of the fortress. Each barracks has a commander who must be defeated in order for you to conquer that barracks. Note that the control center must have a Warsmith or a Maestro in order to handle the machinery.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-15.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-15.html deleted file mode 100644 index a5ff153785..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-15.html +++ /dev/null @@ -1,5 +0,0 @@ - -If you conquer all of the barracks, weakening your opponents' defensive system, the command gate will open. Entering the command post, you will find a Combat Flag on the first floor that symbolizes the authority of the fort. You can end the battle by hanging it from the flag pole on the very highest floor.

-Be warned, though, that you must conquer the fortress within 10 minutes or all of the barracks' functions will return to normal.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-16.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-16.html deleted file mode 100644 index 447605017b..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-16.html +++ /dev/null @@ -1,4 +0,0 @@ - -Uh-huh. I occasionally earn a few Adena as mercenary... A single mission earns me 250,000 Adena. Not a particularly expensive fee, considering that I put my life on the line!

But I get your point. If there is an enemy clan controlling the fortress, I'll escort our mercenary captain there. He can open the central command gate, so be sure to guard him carefully!
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-17.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-17.html deleted file mode 100644 index 1486793458..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-17.html +++ /dev/null @@ -1,3 +0,0 @@ - -A clan that possesses a castle in a different region cannot register. - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-18.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-18.html deleted file mode 100644 index 4c929f046f..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-18.html +++ /dev/null @@ -1,3 +0,0 @@ - -You cannot register for a fortress war while the castle in your possession is allied with the fortress. - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-19.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-19.html deleted file mode 100644 index 60543baaf3..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-19.html +++ /dev/null @@ -1,4 +0,0 @@ - -Hmm... I feel a strange energy near the fortress. Be on your guard! I believe that the rebels who once held this place will soon attempt to seize it again!
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-20.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-20.html deleted file mode 100644 index 5947be00c3..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-20.html +++ /dev/null @@ -1,4 +0,0 @@ - -We don't have any clients at the moment, so we're searching for opportunities. If someone needs us, we can be ready in less than an hour. How about your clan? A mere 250,000 Adena secures our services!
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-21.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-21.html deleted file mode 100644 index feecd6f614..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager-21.html +++ /dev/null @@ -1,4 +0,0 @@ - -Ah, we've already been hired by another clan. If you make a request now, we will register your clan to the battle, but don't give us a hard time. I'll return to our headquarters to prepare. Get ready! The battle will begin in 10 minutes.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.html deleted file mode 100644 index c0cb1808c1..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.html +++ /dev/null @@ -1,4 +0,0 @@ -Are you curious why I am selling here, since it's not a village?
- - - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java deleted file mode 100644 index 846c64414b..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package ai.others.FortressSiegeManager; - -import com.l2jmobius.gameserver.instancemanager.FortSiegeManager; -import com.l2jmobius.gameserver.model.ClanPrivilege; -import com.l2jmobius.gameserver.model.L2Clan; -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.entity.Castle; -import com.l2jmobius.gameserver.model.entity.Fort; -import com.l2jmobius.gameserver.network.SystemMessageId; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; -import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; - -import ai.AbstractNpcAI; - -/** - * Fortress Siege Manager AI. - * @author St3eT - */ -public final class FortressSiegeManager extends AbstractNpcAI -{ - // NPCs - private static final int[] MANAGERS = - { - 35659, // Shanty Fortress - 35690, // Southern Fortress - 35728, // Hive Fortress - 35759, // Valley Fortress - 35797, // Ivory Fortress - 35828, // Narsell Fortress - 35859, // Bayou Fortress - 35897, // White Sands Fortress - 35928, // Borderland Fortress - 35966, // Swamp Fortress - 36004, // Archaic Fortress - 36035, // Floran Fortress - 36073, // Cloud Mountain - 36111, // Tanor Fortress - 36142, // Dragonspine Fortress - 36173, // Antharas's Fortress - 36211, // Western Fortress - 36249, // Hunter's Fortress - 36287, // Aaru Fortress - 36318, // Demon Fortress - 36356, // Monastic Fortress - }; - - private FortressSiegeManager() - { - addStartNpc(MANAGERS); - addTalkId(MANAGERS); - addFirstTalkId(MANAGERS); - } - - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - String htmltext = null; - switch (event) - { - case "FortressSiegeManager-11.html": - case "FortressSiegeManager-13.html": - case "FortressSiegeManager-14.html": - case "FortressSiegeManager-15.html": - case "FortressSiegeManager-16.html": - { - return htmltext = event; - } - case "register": - { - if (player.getClan() == null) - { - htmltext = "FortressSiegeManager-02.html"; - } - else - { - final L2Clan clan = player.getClan(); - final Fort fortress = npc.getFort(); - final Castle castle = npc.getCastle(); - - if (clan.getFortId() == fortress.getResidenceId()) - { - final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); - html.setHtml(getHtm(player.getHtmlPrefix(), "FortressSiegeManager-12.html")); - html.replace("%clanName%", fortress.getOwnerClan().getName()); - return html.getHtml(); - } - else if (!player.hasClanPrivilege(ClanPrivilege.CS_MANAGE_SIEGE)) - { - htmltext = "FortressSiegeManager-10.html"; - } - else if ((clan.getLevel() < FortSiegeManager.getInstance().getSiegeClanMinLevel())) - { - htmltext = "FortressSiegeManager-04.html"; - } - else if ((player.getClan().getCastleId() == castle.getResidenceId()) && (fortress.getFortState() == 2)) - { - htmltext = "FortressSiegeManager-18.html"; - } - else if ((clan.getCastleId() != 0) && (clan.getCastleId() != castle.getResidenceId()) && FortSiegeManager.getInstance().canRegisterJustTerritory()) - { - htmltext = "FortressSiegeManager-17.html"; - } - else if ((fortress.getTimeTillRebelArmy() > 0) && (fortress.getTimeTillRebelArmy() <= 7200)) - { - htmltext = "FortressSiegeManager-19.html"; - } - else - { - switch (npc.getFort().getSiege().addAttacker(player, true)) - { - case 1: - { - htmltext = "FortressSiegeManager-03.html"; - break; - } - case 2: - { - htmltext = "FortressSiegeManager-07.html"; - break; - } - case 3: - { - htmltext = "FortressSiegeManager-06.html"; - break; - } - case 4: - { - final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE); - sm.addString(npc.getFort().getName()); - player.sendPacket(sm); - htmltext = "FortressSiegeManager-05.html"; - break; - } - } - } - } - break; - } - case "cancel": - { - if (player.getClan() == null) - { - htmltext = "FortressSiegeManager-02.html"; - } - else - { - final L2Clan clan = player.getClan(); - final Fort fortress = npc.getFort(); - - if (clan.getFortId() == fortress.getResidenceId()) - { - final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); - html.setHtml(getHtm(player.getHtmlPrefix(), "FortressSiegeManager-12.html")); - html.replace("%clanName%", fortress.getOwnerClan().getName()); - return html.getHtml(); - } - else if (!player.hasClanPrivilege(ClanPrivilege.CS_MANAGE_SIEGE)) - { - htmltext = "FortressSiegeManager-10.html"; - } - else if (!FortSiegeManager.getInstance().checkIsRegistered(clan, fortress.getResidenceId())) - { - htmltext = "FortressSiegeManager-09.html"; - } - else - { - fortress.getSiege().removeAttacker(player.getClan()); - htmltext = "FortressSiegeManager-08.html"; - } - } - break; - } - case "warInfo": - { - htmltext = npc.getFort().getSiege().getAttackerClans().isEmpty() ? "FortressSiegeManager-20.html" : "FortressSiegeManager-21.html"; - } - } - return htmltext; - } - - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final Fort fortress = npc.getFort(); - final int fortOwner = fortress.getOwnerClan() == null ? 0 : fortress.getOwnerClan().getId(); - if (fortOwner == 0) - { - return "FortressSiegeManager.html"; - } - final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); - html.setHtml(getHtm(player.getHtmlPrefix(), "FortressSiegeManager-01.html")); - html.replace("%clanName%", fortress.getOwnerClan().getName()); - html.replace("%objectId%", npc.getObjectId()); - return html.getHtml(); - } - - public static void main(String[] args) - { - new FortressSiegeManager(); - } -} diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-1.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-1.html deleted file mode 100644 index 765d5c7f31..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-1.html +++ /dev/null @@ -1,18 +0,0 @@ - - -
- - - -
- - - - - -
You will be moved to the Beauty Shop.
-
-
- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-2.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-2.html deleted file mode 100644 index 13bc2082cf..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-2.html +++ /dev/null @@ -1,18 +0,0 @@ - - -
- - - -
- - - - - -
You will be moved to the Beauty Shop.
-
-
- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-help.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-help.html deleted file mode 100644 index dc5d7f7314..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-help.html +++ /dev/null @@ -1,19 +0,0 @@ - - -
- - - -
- - - - - - - - -
Use Beauty Shop
Change up your face and hair whenever you want! We can even hold your purchases here at the shop.
Hair Color
Hair colors are unique to hairdos, so be sure to buy a new hair color for a new hairdo even if you have the same color for a previous hairdo!
Hair Accessory On/Off Button
Don't forget that hair styles are visible only when the hair accessory button in your inventory is off!
-
-

- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-norestore.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-norestore.html deleted file mode 100644 index e549954179..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825-norestore.html +++ /dev/null @@ -1,17 +0,0 @@ - - -
- - - -
- - - - - - -
I'm sorry.
That's only available for characters
who have had their appearance changed at the Beauty Shop.
-
-
- diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825.html b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825.html deleted file mode 100644 index 8beb70bac6..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/33825.html +++ /dev/null @@ -1,22 +0,0 @@ - - -
- - - -
- - - - - - - - - - - -
Welcome to our Beauty Shop.
We can change your hairstyle, or give you a completely new look. - What do you say?
-
- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java deleted file mode 100644 index aef54b912a..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package ai.others.LaVieEnRose; - -import com.l2jmobius.gameserver.enums.ChatType; -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.ceremonyofchaos.CeremonyOfChaosEvent; -import com.l2jmobius.gameserver.model.olympiad.OlympiadManager; -import com.l2jmobius.gameserver.network.NpcStringId; -import com.l2jmobius.gameserver.network.SystemMessageId; -import com.l2jmobius.gameserver.network.serverpackets.ExResponseBeautyList; -import com.l2jmobius.gameserver.network.serverpackets.ExResponseResetList; -import com.l2jmobius.gameserver.network.serverpackets.ExShowBeautyMenu; - -import ai.AbstractNpcAI; - -/** - * La Vie En Rose AI. - * @author Sdw - */ -public final class LaVieEnRose extends AbstractNpcAI -{ - // NPCs - private static final int LA_VIE_EN_ROSE = 33825; - private static final int BEAUTY_SHOP_HELPER = 33854; - - private LaVieEnRose() - { - addStartNpc(LA_VIE_EN_ROSE); - addTalkId(LA_VIE_EN_ROSE); - addFirstTalkId(LA_VIE_EN_ROSE); - addSpawnId(BEAUTY_SHOP_HELPER); - } - - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - String htmltext = null; - switch (event) - { - case "33825.html": - case "33825-1.html": - case "33825-2.html": - case "33825-help.html": - { - htmltext = event; - break; - } - case "restore_appearance": - { - if (canUseBeautyShop(player)) - { - if (player.getVariables().hasVariable("visualHairId") || player.getVariables().hasVariable("visualFaceId") || player.getVariables().hasVariable("visualHairColorId")) - { - htmltext = "33825-2.html"; - } - else - { - htmltext = "33825-norestore.html"; - } - } - break; - } - case "beauty-change": - { - if (canUseBeautyShop(player)) - { - player.sendPacket(new ExShowBeautyMenu(player, ExShowBeautyMenu.MODIFY_APPEARANCE)); - player.sendPacket(new ExResponseBeautyList(player, ExResponseBeautyList.SHOW_FACESHAPE)); - } - break; - } - case "beauty-restore": - { - if (canUseBeautyShop(player)) - { - player.sendPacket(new ExShowBeautyMenu(player, ExShowBeautyMenu.RESTORE_APPEARANCE)); - player.sendPacket(new ExResponseResetList(player)); - } - break; - } - case "SPAM_TEXT": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_BEAUTY_SHOP_IS_OPEN_COME_ON_IN); - startQuestTimer("SPAM_TEXT2", 2500, npc, null); - break; - } - case "SPAM_TEXT2": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_LOOK_GOOD_TOO_BUDDY_COME_ON_COME_ON); - startQuestTimer("SPAM_TEXT3", 2500, npc, null); - break; - } - case "SPAM_TEXT3": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EVERYONE_COME_ON_LET_S_GO_GANGNAM_STYLE); - break; - } - case "cancel": - default: - { - break; - } - } - return htmltext; - } - - private boolean canUseBeautyShop(L2PcInstance player) - { - if (player.isInOlympiadMode() || OlympiadManager.getInstance().isRegistered(player)) - { - player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_REGISTERED_IN_THE_OLYMPIAD); - return false; - } - - if (player.isOnEvent(CeremonyOfChaosEvent.class)) - { - player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_REGISTERED_IN_THE_CEREMONY_OF_CHAOS); - return false; - } - - // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_AS_THE_NPC_SERVER_IS_CURRENTLY_NOT_IN_FUNCTION); - // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_USING_THE_AUTOMATIC_REPLACEMENT); - - return true; - } - - @Override - public String onSpawn(L2Npc npc) - { - startQuestTimer("SPAM_TEXT", (5 * 60 * 1000), npc, null, true); - return super.onSpawn(npc); - } - - public static void main(String[] args) - { - new LaVieEnRose(); - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/ManorManager.java b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/ManorManager.java deleted file mode 100644 index a93847a05c..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/ManorManager.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package ai.others.ManorManager; - -import com.l2jmobius.Config; -import com.l2jmobius.gameserver.instancemanager.CastleManorManager; -import com.l2jmobius.gameserver.model.PcCondOverride; -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2MerchantInstance; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.events.EventType; -import com.l2jmobius.gameserver.model.events.ListenerRegisterType; -import com.l2jmobius.gameserver.model.events.annotations.Id; -import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; -import com.l2jmobius.gameserver.model.events.annotations.RegisterType; -import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcManorBypass; -import com.l2jmobius.gameserver.network.SystemMessageId; -import com.l2jmobius.gameserver.network.serverpackets.BuyListSeed; -import com.l2jmobius.gameserver.network.serverpackets.ExShowCropInfo; -import com.l2jmobius.gameserver.network.serverpackets.ExShowManorDefaultInfo; -import com.l2jmobius.gameserver.network.serverpackets.ExShowProcureCropDetail; -import com.l2jmobius.gameserver.network.serverpackets.ExShowSeedInfo; -import com.l2jmobius.gameserver.network.serverpackets.ExShowSellCropList; -import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; - -import ai.AbstractNpcAI; - -/** - * Manor manager AI. - * @author malyelfik - */ -public final class ManorManager extends AbstractNpcAI -{ - private static final int[] NPC = - { - 35644, - 35645, - 35319, - 35366, - 36456, - 35512, - 35558, - 35229, - 35230, - 35231, - 35277, - 35103, - 35145, - 35187 - }; - - public ManorManager() - { - addStartNpc(NPC); - addFirstTalkId(NPC); - addTalkId(NPC); - } - - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - String htmltext = null; - switch (event) - { - case "manager-help-01.htm": - case "manager-help-02.htm": - case "manager-help-03.htm": - htmltext = event; - break; - } - return htmltext; - } - - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - if (Config.ALLOW_MANOR) - { - final int castleId = npc.getParameters().getInt("manor_id", -1); - if (!player.canOverrideCond(PcCondOverride.CASTLE_CONDITIONS) && player.isClanLeader() && (castleId == player.getClan().getCastleId())) - { - return "manager-lord.htm"; - } - return "manager.htm"; - } - return getHtm(player.getHtmlPrefix(), "data/html/npcdefault.htm"); - } - - // @formatter:off - @RegisterEvent(EventType.ON_NPC_MANOR_BYPASS) - @RegisterType(ListenerRegisterType.NPC) - @Id({35644, 35645, 35319, 35366, 36456, 35512, 35558, 35229, 35230, 35231, 35277, 35103, 35145, 35187}) - // @formatter:on - public final void onNpcManorBypass(OnNpcManorBypass evt) - { - final L2PcInstance player = evt.getActiveChar(); - if (CastleManorManager.getInstance().isUnderMaintenance()) - { - player.sendPacket(SystemMessageId.THE_MANOR_SYSTEM_IS_CURRENTLY_UNDER_MAINTENANCE); - return; - } - - final L2Npc npc = evt.getTarget(); - final int templateId = npc.getParameters().getInt("manor_id", -1); - final int castleId = (evt.getManorId() == -1) ? templateId : evt.getManorId(); - switch (evt.getRequest()) - { - case 1: // Seed purchase - { - if (templateId != castleId) - { - player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.HERE_YOU_CAN_BUY_ONLY_SEEDS_OF_S1_MANOR).addCastleId(templateId)); - return; - } - player.sendPacket(new BuyListSeed(player.getAdena(), castleId)); - break; - } - case 2: // Crop sales - player.sendPacket(new ExShowSellCropList(player.getInventory(), castleId)); - break; - case 3: // Seed info - player.sendPacket(new ExShowSeedInfo(castleId, evt.isNextPeriod(), false)); - break; - case 4: // Crop info - player.sendPacket(new ExShowCropInfo(castleId, evt.isNextPeriod(), false)); - break; - case 5: // Basic info - player.sendPacket(new ExShowManorDefaultInfo(false)); - break; - case 6: // Buy harvester - ((L2MerchantInstance) npc).showBuyWindow(player, 300000 + npc.getId()); - break; - case 9: // Edit sales (Crop sales) - player.sendPacket(new ExShowProcureCropDetail(evt.getManorId())); - break; - default: - _log.warning(getClass().getSimpleName() + ": Player " + player.getName() + " (" + player.getObjectId() + ") send unknown request id " + evt.getRequest() + "!"); - } - } - - public static void main(String[] args) - { - new ManorManager(); - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-01.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-01.htm deleted file mode 100644 index df13c4dbd9..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-01.htm +++ /dev/null @@ -1,13 +0,0 @@ - -A manor refers to any property owned by the lord. Anything produced within its confines remains the exclusive property of the lord.
-If you wish to be an agricultural producer, first you must buy a
- -and place it onto a monster. This can be easily accomplished while targeting.
-When the monster, dies you will harvest a crop from its body. To harvest a crop, just target the corpse and use the harvester - if you don't have one, I'll happily sell you one! These crops are important to the manor, so after you've harvested them, bring the
- -to me!
-I will then appraise them and give you an appropriate reward! I'll tell you about the rewards later...
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-02.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-02.htm deleted file mode 100644 index 2cdece5da3..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-02.htm +++ /dev/null @@ -1,11 +0,0 @@ - -There are both regular and alternative types of seeds. If you plant a regular seed, a monster will hide an item and give you a crop of equivalent value instead.
-When you plant alternative seed, you will receive a crop approximately half of the time, and an item the other half of the time.
-The lord established this system to give people more choice in what to plan in a manor.
-There are four kinds of seed--coda, cobol, codran and coba, available at different levels. Coda seeds are most appropriate for level 10 - 30 farmers, relatively low levels. Cobol seeds are for farmers between level 31 and 48. Codran seeds are best for level 49 - 64 farmers. Coba seeds are reserved for high level farmers of level 65 or above.
-Obviously, different seeds grow different crops, and work better with certain monsters. A weak monster will produce a disappointing crop, but, on the other hand, if it is too strong, it may damage the crop.
-One secret of a successful crop is to pick a monster with approximately the same power as the sower. Trying to sow a seed on a non-compliant monster can have disastrous consequences.
-You may purchase any seed at any time, but the lord reserves the right not to purchase any crop at his discretion. You should always check to make sure that your crop is currently in demand.
-Oh, and keep this part a secret, but I hear that other castles also buy crops, as long as that same crop can be purchased there. That's my backup plan in case the Lord changes his mind.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-03.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-03.htm deleted file mode 100644 index e39507c8d8..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-help-03.htm +++ /dev/null @@ -1,8 +0,0 @@ - -When a seed germinates inside a monster it becomes a crop. The best crops are harvested from monsters of a level similar to the sower.
-Bring your harvested crops to me and you will be rewarded. The lord usually compensates farmers with items, some much more valuable than the crops.
-Of course, you should be willing to gamble a little, right?
-
- -
- diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-lord.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-lord.htm deleted file mode 100644 index ae5f65626d..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager-lord.htm +++ /dev/null @@ -1,5 +0,0 @@ - -My Lord! To what do I owe the honor of a personal visit?
-I serve at your pleasure, my Lord!
-I would never even think of stealing from you! Please believe me!
- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager.htm deleted file mode 100644 index 8d3291bea5..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/ManorManager/manager.htm +++ /dev/null @@ -1,16 +0,0 @@ - -I'm a merchant dispatched by the Lord in order to sell Seeds from the Manor and purchase Special Products.
-The seeds I'm selling can be sowed only in the Manor. But the Special Products can be sold in any castle. When selling to another castle, I will sell to another Manor on your behalf for a small fee.
-The buying and selling of seeds for Special Products begin each day at 8 pm. Prepare in advance by referring to the Manor information begins to be displayed from 4:30 am, and come back at 8 pm. If you don't hurry, items can be sold out. Huh Huh
-If you also have Special Products, sell them to me. The Lord will be glad.
-If you perhaps don't know what the Manor or Special Product is, ask me anytime -- I will explain them to you in detail.
-
- - - - - - - -
- diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-01.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-01.htm deleted file mode 100644 index 893cd4c1ca..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-01.htm +++ /dev/null @@ -1,12 +0,0 @@ -Mentor Guide:
-Greetings adventurer! -Are you skilled enough to teach others the path to glory or are you one who needs guidance in this difficult world? -Is there anything I can help you with?
- - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-02.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-02.htm deleted file mode 100644 index 54b82b3437..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-02.htm +++ /dev/null @@ -1,4 +0,0 @@ -Mentor Guide:
-If you allow me to break the fourth wall for a moment, new or returning players who have not played Lineage II in awhile might find some aspects of the game have changed or are a bit challenging. The Mentor/Mentee system was designed to help anyone who is in that situation. A more experienced player will fill the role as the Mentor, while the new or inexperienced player will be the Mentee.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-03.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-03.htm deleted file mode 100644 index 33aee5fcc1..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-03.htm +++ /dev/null @@ -1,5 +0,0 @@ ->Mentor Guide:
-If you are level 85 or higher and have a Mentee Certificate, I can exchange it for a Diploma. -Diplomas can be traded for various beneficial items.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-04.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-04.htm deleted file mode 100644 index de07756efe..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-04.htm +++ /dev/null @@ -1,3 +0,0 @@ -Mentor Guide:
-It appears that you are missing one or more of the requirements in order for me to provide you assistance.
- \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-05.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-05.htm deleted file mode 100644 index 8a2eaae839..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-05.htm +++ /dev/null @@ -1,7 +0,0 @@ -Mentor Guide:
-A Mentor can open the Friend Manager window, click the  Mentoring Tab, and click + to invite a target as a Mentee.
-If you are a mentor, you can use the mentoring screen to search characters who can become mentees.
-You must be Level 85 or above and Awakened to be a mentor. Potential mentees must be Level 85 or under. -If the mentor and mentee end their contract prematurely, the mentor must wait 2 days to find another mentee. If the mentee graduates, the mentor must wait 1 day to find another mentee.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-06.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-06.htm deleted file mode 100644 index f69e3ab0e4..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-06.htm +++ /dev/null @@ -1,6 +0,0 @@ -Mentor Guide:
-A mentor can guide up to 3 mentees at a time. Every time a mentee levels up, the mentor receives an item called Mentee's Mark in the mail. This mark can be exchanged for items useful after awakening. -Between levels 1 and 50, the mentor receives mail every 10 levels. After level 50, the mentor receives mail each time a mentee levels up. Be sure to delete unnecessary mail, as you cannot receive new mail if your mailbox is full.
-When a mentor and mentee are both online, they can receive a powerful ability-raising buff. The mentee can also receive XP and SP bonus buffs at this time. Awakening while having a mentor is called graduating. Upon graduating, a mentee receives a Mentee Certificate in the mail. Bring me the Mentee Certificate to receive a Diploma. Diplomas are good for various items.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-07.htm b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-07.htm deleted file mode 100644 index 50bab20541..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/33587-07.htm +++ /dev/null @@ -1,6 +0,0 @@ -Mentor Guide:
-By becoming a mentor, you can apply strong buffs to your mentee. -However, if the mentor and mentee are too far apart, it will be difficult to apply this skill. To resolve this issue, the mentee has a skill to summon the mentor.
-Please refer to the clan / hero / mentoring skill categories in the skill window.
- - \ No newline at end of file diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java b/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java deleted file mode 100644 index 9aba4c962c..0000000000 --- a/L2J_Mobius_Classic/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java +++ /dev/null @@ -1,554 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package ai.others.MentorGuide; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.logging.Logger; - -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import com.l2jmobius.Config; -import com.l2jmobius.commons.util.IGameXmlReader; -import com.l2jmobius.gameserver.enums.CategoryType; -import com.l2jmobius.gameserver.enums.MailType; -import com.l2jmobius.gameserver.instancemanager.MailManager; -import com.l2jmobius.gameserver.instancemanager.MentorManager; -import com.l2jmobius.gameserver.model.L2Mentee; -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.base.ClassLevel; -import com.l2jmobius.gameserver.model.entity.Message; -import com.l2jmobius.gameserver.model.events.EventType; -import com.l2jmobius.gameserver.model.events.ListenerRegisterType; -import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; -import com.l2jmobius.gameserver.model.events.annotations.RegisterType; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeAdd; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeLeft; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeRemove; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeStatus; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMentorStatus; -import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerProfessionChange; -import com.l2jmobius.gameserver.model.holders.SkillHolder; -import com.l2jmobius.gameserver.model.skills.BuffInfo; -import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.network.SystemMessageId; -import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -import com.l2jmobius.gameserver.network.serverpackets.mentoring.ExMentorList; -import com.l2jmobius.gameserver.util.Util; - -import ai.AbstractNpcAI; - -/** - * Mentor Guide AI. - * @author Gnacik, UnAfraid - */ -public final class MentorGuide extends AbstractNpcAI implements IGameXmlReader -{ - private static final Logger LOGGER = Logger.getLogger(MentorGuide.class.getName()); - - // NPCs - private static final int MENTOR_GUIDE = 33587; - // Items - private static final int MENTEE_CERT = 33800; - private static final int MENTEE_MARK = 33804; - private static final int MENTEE_HEADPHONE = 34759; - private static final int DIPLOMA = 33805; - // Skills - private static final SkillHolder[] MENTEE_BUFFS = - { - new SkillHolder(9233, 1), // Mentor's Guidance - }; - // Skills - private static final SkillHolder[] MENTEE_BUFFS_WITHOUT_MENTOR_ONLINE = - { - new SkillHolder(9227, 1), // Mentor's Poem of Horn - new SkillHolder(9228, 1), // Mentor's Poem of Drum - new SkillHolder(9229, 1), // Mentor's Poem of Lute - new SkillHolder(9230, 1), // Mentor's Poem of Organ - new SkillHolder(9231, 1), // Mentor's Poem of Guitar - new SkillHolder(9232, 1), // Mentor's Poem of Harp - new SkillHolder(17082, 1), // Mentor's Prevailing Sonata - new SkillHolder(17083, 1), // Mentor's Daring Sonata - new SkillHolder(17084, 1), // Mentor's Refreshing Sonata - }; - protected static final SkillHolder[] MENTOR_BUFFS = - { - new SkillHolder(9256, 1), // Mentee's Appreciation; - }; - private static final SkillHolder MENTEE_MENTOR_SUMMON = new SkillHolder(9379, 1); // Mentee's Mentor Summon - private static final SkillHolder MENTOR_KNIGHTS_HARMONY = new SkillHolder(9376, 1); // Mentor's Knight's Harmony - private static final SkillHolder MENTOR_WIZARDS_HARMONY = new SkillHolder(9377, 1); // Mentor's Wizard's Harmony - private static final SkillHolder MENTOR_WARRIORS_HARMONY = new SkillHolder(9378, 1); // Mentor's Warrior's Harmony - // Misc - private static final int MAX_LEVEL = 85; - private static final String LEVEL_UP_TITLE = "Mentee coin from Mentee leveling"; - private static final String LEVEL_UP_BODY = "Your mentee %s has reached level %d, so you are receiving some Mentee Coin. After Mentee Coin has successfully been removed and placed into your inventory please be sure to delete this letter. If your mailbox is full when any future letters are sent to you cannot be delivered and you will not receive these items."; - private static final String MENTEE_ADDED_TITLE = "Congratulations on becoming a mentee."; - private static final String MENTEE_ADDED_BODY = "Greetings. This is the Mentor Guide.\n\nYou will experience a world of unlimited adventures with your mentor, Exciting, isn't it?\n\nWhen you graduate from mentee status (upon awakening at level 85), you will receive a Mentee Certificate. If you bring it to me, I will give you a Diploma that you can exchange for R-grade equipment."; - private static final String MENTEE_GRADUATE_TITLE = "Congratulations on your graduation"; - private static final String MENTEE_GRADUATE_BODY = "Greetings! This is the Mentor Guide.\nCongratulations! Did you enjoy the time with a mentor? Here is a Mentee Certificate for graduating.\n\nFind me in town, and I'll give you a Diploma if you show me your Mentee Certificatee. You'll also get a small graduation gift!\n\nNow, on to your next Adventure!"; - private static final Map MENTEE_COINS = new HashMap<>(); - - @Override - public void load() - { - parseDatapackFile("config/MentorCoins.xml"); - LOGGER.info(getClass().getSimpleName() + ": Loaded: " + MENTEE_COINS.size() + " mentee coins"); - } - - @Override - public void parseDocument(Document doc, File f) - { - for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) - { - if ("list".equalsIgnoreCase(n.getNodeName())) - { - for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) - { - if ("mentee".equalsIgnoreCase(d.getNodeName())) - { - final int level = parseInteger(d.getAttributes(), "level"); - final int coins = parseInteger(d.getAttributes(), "coins"); - MENTEE_COINS.put(level, coins); - } - } - } - } - } - - private MentorGuide() - { - addFirstTalkId(MENTOR_GUIDE); - addStartNpc(MENTOR_GUIDE); - addTalkId(MENTOR_GUIDE); - load(); - } - - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - String htmltext = event; - - if (event.equalsIgnoreCase("exchange")) - { - if (hasQuestItems(player, MENTEE_CERT) && (player.getLevel() >= MAX_LEVEL) && (player.getClassId().level() == ClassLevel.AWAKEN.ordinal())) - { - takeItems(player, MENTEE_CERT, 1); - giveItems(player, DIPLOMA, 40); - return null; - } - htmltext = "33587-04.htm"; - } - else if (event.startsWith("REMOVE_BUFFS")) - { - final String[] params = event.split(" "); - if (Util.isDigit(params[1])) - { - final int objectId = Integer.valueOf(params[1]); - MentorManager.getInstance().getMentees(objectId).stream().filter(Objects::nonNull).filter(L2Mentee::isOnline).forEach(mentee -> - { - final L2PcInstance menteePlayer = mentee.getPlayerInstance(); - if (menteePlayer != null) - { - for (SkillHolder holder : MENTEE_BUFFS) - { - menteePlayer.stopSkillEffects(holder.getSkill()); - } - } - mentee.sendPacket(new ExMentorList(mentee.getPlayerInstance())); - }); - } - } - return htmltext; - } - - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - return "33587-01.htm"; - } - - @RegisterEvent(EventType.ON_PLAYER_MENTEE_ADD) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onMenteeAdded(OnPlayerMenteeAdd event) - { - // Starting buffs for Mentor - for (SkillHolder sk : MENTOR_BUFFS) - { - sk.getSkill().applyEffects(event.getMentor(), event.getMentor()); - } - - // Starting buffs for Mentee when mentor is online - for (SkillHolder sk : MENTEE_BUFFS) - { - sk.getSkill().applyEffects(event.getMentee(), event.getMentee()); - } - - // Starting buffs for Mentee - for (SkillHolder sk : MENTEE_BUFFS_WITHOUT_MENTOR_ONLINE) - { - sk.getSkill().applyEffects(event.getMentee(), event.getMentee()); - } - - // Update mentor list - event.getMentor().sendPacket(new ExMentorList(event.getMentor())); - - // Add the mentee skill - handleMenteeSkills(event.getMentee()); - - // Give mentor's buffs only if he didn't had them. - handleMentorSkills(event.getMentor()); - - // Send mail with the headphone - sendMail(event.getMentee(), MENTEE_ADDED_TITLE, MENTEE_ADDED_BODY, MENTEE_HEADPHONE, 1); - } - - @RegisterEvent(EventType.ON_PLAYER_MENTEE_STATUS) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void OnPlayerMenteeStatus(OnPlayerMenteeStatus event) - { - final L2PcInstance player = event.getMentee(); - - if (event.isMenteeOnline()) - { - final L2Mentee mentor = MentorManager.getInstance().getMentor(player.getObjectId()); - if (mentor != null) - { - // Starting buffs for Mentee - for (SkillHolder sk : MENTEE_BUFFS_WITHOUT_MENTOR_ONLINE) - { - sk.getSkill().applyEffects(player, player); - } - - if (mentor.isOnline()) - { - //@formatter:off - final long mentorBuffs = mentor.getPlayerInstance().getEffectList().getEffects() - .stream() - .map(BuffInfo::getSkill) - .filter(Skill::isMentoring) - .count(); - //@formatter:on - - if (mentorBuffs != MENTOR_BUFFS.length) - { - // Starting buffs for Mentor - for (SkillHolder sk : MENTOR_BUFFS) - { - sk.getSkill().applyEffects(mentor.getPlayerInstance(), mentor.getPlayerInstance()); - } - } - - // Starting buffs for Mentee - for (SkillHolder sk : MENTEE_BUFFS) - { - sk.getSkill().applyEffects(player, player); - } - - // Add the mentee skill - handleMenteeSkills(player); - - mentor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTEE_S1_HAS_CONNECTED).addCharName(player)); - mentor.sendPacket(new ExMentorList(mentor.getPlayerInstance())); - } - } - player.sendPacket(new ExMentorList(player)); - } - else - { - final L2Mentee mentor = MentorManager.getInstance().getMentor(player.getObjectId()); - if ((mentor != null) && mentor.isOnline()) - { - if (MentorManager.getInstance().isAllMenteesOffline(mentor.getObjectId(), player.getObjectId())) - { - MentorManager.getInstance().cancelAllMentoringBuffs(mentor.getPlayerInstance()); - } - - mentor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTEE_S1_HAS_DISCONNECTED).addCharName(player)); - mentor.sendPacket(new ExMentorList(mentor.getPlayerInstance())); - } - } - } - - @RegisterEvent(EventType.ON_PLAYER_MENTOR_STATUS) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void OnPlayerMentorStatus(OnPlayerMentorStatus event) - { - final L2PcInstance player = event.getMentor(); - - if (event.isMentorOnline()) - { - // stop buffs removal task - cancelQuestTimer("REMOVE_BUFFS " + player.getObjectId(), null, null); - - MentorManager.getInstance().getMentees(player.getObjectId()).stream().filter(Objects::nonNull).filter(L2Mentee::isOnline).forEach(mentee -> - { - //@formatter:off - final long menteeBuffs = mentee.getPlayerInstance().getEffectList().getEffects() - .stream() - .map(BuffInfo::getSkill) - .filter(Skill::isMentoring) - .count(); - //@formatter:on - - if (menteeBuffs != MENTEE_BUFFS.length) - { - // Starting buffs for Mentee - for (SkillHolder sk : MENTEE_BUFFS) - { - sk.getSkill().applyEffects(mentee.getPlayerInstance(), mentee.getPlayerInstance()); - } - } - - mentee.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTOR_S1_HAS_CONNECTED).addCharName(player)); - mentee.sendPacket(new ExMentorList(mentee.getPlayerInstance())); - }); - - if (MentorManager.getInstance().hasOnlineMentees(player.getObjectId())) - { - // Starting buffs for Mentor - for (SkillHolder sk : MENTOR_BUFFS) - { - sk.getSkill().applyEffects(player, player); - } - } - - // Give mentor's buffs only if he didn't had them. - handleMentorSkills(player); - - player.sendPacket(new ExMentorList(player)); - } - else - { - startQuestTimer("REMOVE_BUFFS " + player.getObjectId(), 5 * 60 * 1000, null, null); - MentorManager.getInstance().getMentees(player.getObjectId()).stream().filter(Objects::nonNull).filter(L2Mentee::isOnline).forEach(mentee -> - { - mentee.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTOR_S1_HAS_DISCONNECTED).addCharName(player)); - mentee.sendPacket(new ExMentorList(mentee.getPlayerInstance())); - }); - } - } - - @RegisterEvent(EventType.ON_PLAYER_PROFESSION_CHANGE) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onProfessionChange(OnPlayerProfessionChange event) - { - final L2PcInstance player = event.getActiveChar(); - - if (player.isMentor()) - { - // Give mentor's buffs only if he didn't had them. - handleMentorSkills(player); - return; - } - - // Not a mentee - if (!player.isMentee()) - { - return; - } - - handleMenteeSkills(player); - - if (player.isInCategory(CategoryType.AWAKEN_GROUP)) - { - handleGraduateMentee(player); - } - } - - @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onLevelIncreased(OnPlayerLevelChanged event) - { - final L2PcInstance player = event.getActiveChar(); - - // Not a mentee - if (!player.isMentee()) - { - return; - } - - checkLevelForReward(player); // Checking level to send a mail if is necessary - - if (player.getLevel() > MAX_LEVEL) - { - handleGraduateMentee(player); - } - else - { - final L2Mentee mentor = MentorManager.getInstance().getMentor(player.getObjectId()); - if ((mentor != null) && mentor.isOnline()) - { - mentor.sendPacket(new ExMentorList(mentor.getPlayerInstance())); - } - } - } - - @RegisterEvent(EventType.ON_PLAYER_MENTEE_LEFT) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onMenteeLeft(OnPlayerMenteeLeft event) - { - final L2PcInstance player = event.getMentee(); - final L2PcInstance mentor = event.getMentor().getPlayerInstance(); - // Remove the mentee skills - player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); - - // If player does not have any mentees anymore remove mentor skills. - if ((mentor != null) && (MentorManager.getInstance().getMentees(mentor.getObjectId()) == null)) - { - mentor.removeSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), true); - mentor.removeSkill(MENTOR_WIZARDS_HARMONY.getSkill(), true); - mentor.removeSkill(MENTOR_WARRIORS_HARMONY.getSkill(), true); - - // Clear the mentee - mentor.sendPacket(new ExMentorList(mentor)); - } - - // Clear mentee status - player.sendPacket(new ExMentorList(player)); - } - - @RegisterEvent(EventType.ON_PLAYER_MENTEE_REMOVE) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onMenteeRemove(OnPlayerMenteeRemove event) - { - final L2Mentee mentee = event.getMentee(); - final L2PcInstance mentor = event.getMentor(); - final L2PcInstance player = mentee.getPlayerInstance(); - - if (player != null) - { - // Remove the mentee skills - player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); - - // Clear mentee status - player.sendPacket(new ExMentorList(player)); - } - - // If player does not have any mentees anymore remove mentor skills. - if (MentorManager.getInstance().getMentees(mentor.getObjectId()) == null) - { - mentor.removeSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), true); - mentor.removeSkill(MENTOR_WIZARDS_HARMONY.getSkill(), true); - mentor.removeSkill(MENTOR_WARRIORS_HARMONY.getSkill(), true); - } - - // Remove mentee from the list - event.getMentor().sendPacket(new ExMentorList(mentor)); - } - - private void handleMenteeSkills(L2PcInstance player) - { - // Give mentee's buffs only if he didn't had them. - if (player.getKnownSkill(MENTEE_MENTOR_SUMMON.getSkillId()) == null) - { - // Add the mentee skills - player.addSkill(MENTEE_MENTOR_SUMMON.getSkill(), false); - } - } - - private void handleMentorSkills(L2PcInstance player) - { - // Give mentor's buffs only if he didn't had them. - if (player.getKnownSkill(MENTOR_KNIGHTS_HARMONY.getSkillId()) == null) - { - // Add the mentor skills - player.addSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), false); - player.addSkill(MENTOR_WIZARDS_HARMONY.getSkill(), false); - player.addSkill(MENTOR_WARRIORS_HARMONY.getSkill(), false); - } - } - - private void handleGraduateMentee(L2PcInstance player) - { - MentorManager.getInstance().cancelAllMentoringBuffs(player); - final L2Mentee mentor = MentorManager.getInstance().getMentor(player.getObjectId()); - if (mentor != null) - { - MentorManager.getInstance().setPenalty(mentor.getObjectId(), Config.MENTOR_PENALTY_FOR_MENTEE_COMPLETE); - MentorManager.getInstance().deleteMentor(mentor.getObjectId(), player.getObjectId()); - - if (mentor.isOnline()) - { - mentor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_AWAKENED_AND_THE_MENTOR_MENTEE_RELATIONSHIP_HAS_ENDED_THE_MENTOR_CANNOT_OBTAIN_ANOTHER_MENTEE_FOR_ONE_DAY_AFTER_THE_MENTEE_S_GRADUATION).addPcName(player)); - - if (MentorManager.getInstance().isAllMenteesOffline(mentor.getObjectId(), player.getObjectId())) - { - MentorManager.getInstance().cancelAllMentoringBuffs(mentor.getPlayerInstance()); - } - mentor.sendPacket(new ExMentorList(mentor.getPlayerInstance())); - } - - // Remove the mentee skills - player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); - - // Clear mentee status - player.sendPacket(new ExMentorList(player)); - - player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTOR_MENTEE_RELATIONSHIP_WITH_YOUR_MENTOR_S1_HAS_ENDED_AS_YOU_ARE_AN_AWAKENED_CHARACTER_OF_LV_85_OR_ABOVE_YOU_CAN_NO_LONGER_BE_PAIRED_WITH_A_MENTOR).addPcName(player)); - - sendMail(player, MENTEE_GRADUATE_TITLE, MENTEE_GRADUATE_BODY, MENTEE_CERT, 1); - } - } - - /** - * Verifies if player is mentee and if his current level should reward his mentor and if so sends a mail with reward. - * @param player - */ - private void checkLevelForReward(L2PcInstance player) - { - if (!MENTEE_COINS.containsKey(player.getLevel())) - { - return; - } - - final L2Mentee mentor = MentorManager.getInstance().getMentor(player.getObjectId()); - if (mentor == null) - { - return; - } - - final int amount = MENTEE_COINS.get(player.getLevel()); - if (amount > 0) - { - sendMail(mentor.getObjectId(), player, LEVEL_UP_TITLE, String.format(LEVEL_UP_BODY, player.getName(), player.getLevel()), MENTEE_MARK, amount); - } - } - - private void sendMail(L2PcInstance player, String title, String body, int itemId, long amount) - { - sendMail(player.getObjectId(), player, title, body, itemId, amount); - } - - private void sendMail(int objectId, L2PcInstance player, String title, String body, int itemId, long amount) - { - final Message msg = new Message(MENTOR_GUIDE, objectId, title, body, MailType.MENTOR_NPC); - msg.createAttachments().addItem(getName(), itemId, amount, null, player); - - MailManager.getInstance().sendMessage(msg); - } - - public static void main(String[] args) - { - new MentorGuide(); - } -} \ No newline at end of file