diff --git a/trunk/dist/game/data/html/warehouse/32478-1.htm b/trunk/dist/game/data/html/warehouse/32478-1.htm deleted file mode 100644 index 02b2fcf991..0000000000 --- a/trunk/dist/game/data/html/warehouse/32478-1.htm +++ /dev/null @@ -1,5 +0,0 @@ -Dimensional Merchant:
-If you have a Neolithic Crystal, then you can exchange any normal weapon for a rare weapon B-grade and up! B grade dualswords are excluded.
- - - \ No newline at end of file diff --git a/trunk/dist/game/data/html/warehouse/32478.htm b/trunk/dist/game/data/html/warehouse/32478.htm deleted file mode 100644 index 253ff64990..0000000000 --- a/trunk/dist/game/data/html/warehouse/32478.htm +++ /dev/null @@ -1,7 +0,0 @@ -Dimensional Merchant:
-Greetings, adventurer!
-I have been waiting for so long to collect rare trinkets and treasures from the lands of Aden. I heard there are flying pigs around The Enchanted Valley, Forest of the Dead, Valley of Saints, Wild Beast Farm, Plains of the Lizardmen, Fields of Whisper and Silence, Crypts of Disgrace, Den of Evil, Primeval Isle, and the solo area around Dragon Valley. If you hunt in these areas, try to find one of Neolithic Crystals for me. I will make a great exchange with you!
- - - - \ No newline at end of file diff --git a/trunk/dist/game/data/multisell/3247801.xml b/trunk/dist/game/data/multisell/3247801.xml new file mode 100644 index 0000000000..7eeda27377 --- /dev/null +++ b/trunk/dist/game/data/multisell/3247801.xml @@ -0,0 +1,90 @@ + + + + 32478 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/multisell/3247802.xml b/trunk/dist/game/data/multisell/3247802.xml new file mode 100644 index 0000000000..f1bf37302e --- /dev/null +++ b/trunk/dist/game/data/multisell/3247802.xml @@ -0,0 +1,17 @@ + + + + 32478 + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/multisell/3247803.xml b/trunk/dist/game/data/multisell/3247803.xml new file mode 100644 index 0000000000..b80f28db98 --- /dev/null +++ b/trunk/dist/game/data/multisell/3247803.xml @@ -0,0 +1,17 @@ + + + + 32478 + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/multisell/3247804.xml b/trunk/dist/game/data/multisell/3247804.xml new file mode 100644 index 0000000000..14990f90f1 --- /dev/null +++ b/trunk/dist/game/data/multisell/3247804.xml @@ -0,0 +1,17 @@ + + + + 32478 + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/multisell/3247805.xml b/trunk/dist/game/data/multisell/3247805.xml new file mode 100644 index 0000000000..bd499b9ff2 --- /dev/null +++ b/trunk/dist/game/data/multisell/3247805.xml @@ -0,0 +1,42 @@ + + + + 32478 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/multisell/3247806.xml b/trunk/dist/game/data/multisell/3247806.xml new file mode 100644 index 0000000000..372ed97c15 --- /dev/null +++ b/trunk/dist/game/data/multisell/3247806.xml @@ -0,0 +1,42 @@ + + + + 32478 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/scripts.cfg b/trunk/dist/game/data/scripts.cfg index 21161daf1b..2bfc706e2b 100644 --- a/trunk/dist/game/data/scripts.cfg +++ b/trunk/dist/game/data/scripts.cfg @@ -31,6 +31,7 @@ ai/npc/CastleSiegeManager/CastleSiegeManager.java ai/npc/CastleTeleporter/CastleTeleporter.java ai/npc/CastleWarehouse/CastleWarehouse.java ai/npc/ClanTrader/ClanTrader.java +ai/npc/DimensionalManager/DimensionalManager.java ai/npc/DragonVortex/DragonVortex.java ai/npc/FameManager/FameManager.java ai/npc/ForgeOfTheGods/ForgeOfTheGods.java diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-01.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-01.htm new file mode 100644 index 0000000000..179857d884 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-01.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You can exchange a Minion Coupon, Superior Minion Coupon, and Rose Spirit Coupon for a Minion Pet. You just need to select the pet that you want.

+ + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-02.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-02.htm new file mode 100644 index 0000000000..6b7b4bbc7f --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-02.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You Can obtain A Minion pet with a Minion Coupon. Please select the Minion pet you want.
+ + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-03.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-03.htm new file mode 100644 index 0000000000..836cdedad5 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-03.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a Wild Beast Fighter Pet Whistle.
+A Wild Beast Fighter will help you in battle with fierce attacks.
+Would you like to exchange the coupon for a Wild Beast Fighter Pet Whistle?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-04.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-04.htm new file mode 100644 index 0000000000..bc409a62ac --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-04.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a Fox Shaman Pet Whistle.
+A Fox Shaman will help you in battle with strong magic.
+Would you like to exchange the coupon for a Fox Shaman Pet Whistle?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-05.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-05.htm new file mode 100644 index 0000000000..aa7e034677 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-05.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a White Weasel Pet Whistle.
+A White Weasel will help you in battle with fighter buffs and healing.
+Would you like to exchange the coupon for a White Weasel Pet Whistle?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-06.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-06.htm new file mode 100644 index 0000000000..55525df914 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-06.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a Fairy Princess Pet Whistle.
+A Fairy Princess will help you in battle with wizard buffs and healing.
+Would you like to exchange the coupon for a Fairy Princess Pet Whistle?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-07.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-07.htm new file mode 100644 index 0000000000..ddd741afb0 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-07.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+Please select a Superior Minion you would like to receive in exchange for the Superior Minion Coupon.
+ + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-08.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-08.htm new file mode 100644 index 0000000000..6668f8fb7c --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-08.htm @@ -0,0 +1,11 @@ +Dimensional Merchant:
+Which improved Rose Spirit would you like?
+(When the inventory is full, you can't receive the item.)
+ + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-09.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-09.htm new file mode 100644 index 0000000000..bb1177bdaf --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-09.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a Toy Knight Summon Whistle.
+A Toy Knight will attack your enemies with a sword while using fighter buffs and healing, to help you in battle..
+Would you like to exchange the coupon for a a Toy Knight?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-10.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-10.htm new file mode 100644 index 0000000000..13abf1a928 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-10.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a Turtle Ascetic Summon Necklace.
+A Turtle Ascetic will help you in battle with warsmith buffs, heals and recharges..
+Would you like to exchange the coupon for a Turtle Ascetic?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-11.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-11.htm new file mode 100644 index 0000000000..50db457079 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-11.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+You selected a Spirit Shaman Summon Whistle.
+A Spirit Shaman will help you in battle with wizard buffs, heals and recharges..
+Would you like to exchange the coupon for a a Spirit Shaman Whistle?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-12.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-12.htm new file mode 100644 index 0000000000..ba8b9b6f2a --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-12.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You have chosen the warrior type Rose Spirit.

+The name of the spirit is Desheloph.
+Desheloph is a Rose Spirit that uses various warrior type buffs and healing while attacking enemies with a sword..
+Will you exchange to Desheloph?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-13.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-13.htm new file mode 100644 index 0000000000..316e914d90 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-13.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You have chosen the wizard type Rose Spirit.

+The name of the spirit is Hyum.
+Hyum is a Rose Spirit that uses wizard type buffs, healing, and recharges while attacking enemies with magic..
+Will you exchange to Hyum?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-14.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-14.htm new file mode 100644 index 0000000000..9da75f5a9f --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-14.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You have chosen the warsmith type Rose Spirit.

+The name of the spirit is Lekang.
+Lekang is a Rose Spirit that uses a weapon or magic to attack enemies as well as healing and recharges while managing (warsmith buff) the owner's weapon and armor..
+Will you exchange to Lekang?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-15.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-15.htm new file mode 100644 index 0000000000..625f2dafc5 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-15.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You have chosen the warrior type Rose Spirit.

+The name of the spirit is Lilias.
+Lilias is a Rose Spirit that uses various warrior type buffs and healing while attacking enemies with a sword..
+Will you exchange to Lilias?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-16.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-16.htm new file mode 100644 index 0000000000..1530284f87 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-16.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You have chosen the wizard type Rose Spirit.

+The name of the spirit is Lapham.
+Lapham is a Rose Spirit that uses wizard type buffs, healing, and recharges while attacking enemies with magic..
+Will you exchange to Lapham?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-17.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-17.htm new file mode 100644 index 0000000000..b999b4e8c3 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-17.htm @@ -0,0 +1,8 @@ +Dimensional Merchant:
+You have chosen the warsmith type Rose Spirit.

+The name of the spirit is Mafum.
+Mafum is a Rose Spirit that uses a weapon or magic to attack enemies as well as healing and recharges while managing (warsmith buff) the owner's weapon and armor..
+Will you exchange to Mafum?
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-18.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-18.htm new file mode 100644 index 0000000000..141ea4f6c9 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-18.htm @@ -0,0 +1,6 @@ +Dimensional Merchant:
+To exchange Vitality items, You need to have vitality-related items in your inventory. You may exchange: Birthday Vitality Potion, Freya's Refreshing Breeze, Pa'agrio's Warm Breeze, Sweet Chocolate, Returning Hero's Vitality replenishing Juice and Pirate Elixir and XP Buff 505.
+Keep in mind, you cannot cancel any item exchange.
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-19.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-19.htm new file mode 100644 index 0000000000..d9a821bb7d --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-19.htm @@ -0,0 +1,6 @@ +Dimensional Merchant:
+In order to seal or unseal the Power Shirt, you must have a Power Shirt or a Sealed Power Shirt in the character's inventory. +A Sealed Power Shirt can be transferred to another character within the account trough the Dimensional Merchant. But, when the seal is removed on a Sealed Power Shirt, you can no longer use seal/unseal.
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-20.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-20.htm new file mode 100644 index 0000000000..c9c65b73d3 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-20.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+Which coupon would you like to use?
+ + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-21.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-21.htm new file mode 100644 index 0000000000..4266470584 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478-21.htm @@ -0,0 +1,7 @@ +Dimensional Merchant:
+What type of armor would you like?
+You can only choose once, so think carefully. + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478.htm b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478.htm new file mode 100644 index 0000000000..c9d1684642 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/32478.htm @@ -0,0 +1,11 @@ +Dimensional Merchant:
+We are the Dimensional Merchants. Get your Dimensional items from the Product Inventory. You can't get your items if your inventory is full, and any items you get cannot moved, sold, exchanged, or dropped.
+Oh, we are also upgrading products from the past L2Store, so exchange them as well.
+ + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/DimensionalManager.java b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/DimensionalManager.java new file mode 100644 index 0000000000..efbf8ff0c8 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/DimensionalManager/DimensionalManager.java @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2004-2015 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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. + * + * L2J DataPack 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.npc.DimensionalManager; + +import java.util.HashMap; +import java.util.Map; + +import ai.npc.AbstractNpcAI; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.SkillHolder; +import com.l2jserver.gameserver.network.SystemMessageId; + +/** + * Dimensional Manager AI. + * @author Stayway, Mobius + */ +public final class DimensionalManager extends AbstractNpcAI +{ + // Npc + private static final int DIMENSIONAL_MANAGER = 32478; + // Items + private static final int MINION_COUPON = 21275; + private static final int SUPERIOR_MINION_COUPON = 21279; + private static final int ROSE_SPIRIT = 21887; + // Rewards + private static final Map TICKET_REWARDS = new HashMap<>(); + { + // Using SkillHolder to store ticket and reward ids. + // buypass - coupon(skillId) - reward(skillLvl) + TICKET_REWARDS.put("whiteweasel", new SkillHolder(MINION_COUPON, 13017)); + TICKET_REWARDS.put("fairyprincess", new SkillHolder(MINION_COUPON, 13018)); + TICKET_REWARDS.put("wildbeastfighter", new SkillHolder(MINION_COUPON, 16044)); + TICKET_REWARDS.put("foxshaman", new SkillHolder(MINION_COUPON, 13020)); + TICKET_REWARDS.put("turtleascetic", new SkillHolder(SUPERIOR_MINION_COUPON, 14064)); + TICKET_REWARDS.put("spiritshaman", new SkillHolder(SUPERIOR_MINION_COUPON, 14062)); + TICKET_REWARDS.put("toyknight", new SkillHolder(SUPERIOR_MINION_COUPON, 14061)); + TICKET_REWARDS.put("desheloph", new SkillHolder(ROSE_SPIRIT, 20915)); + TICKET_REWARDS.put("hyum", new SkillHolder(ROSE_SPIRIT, 20916)); + TICKET_REWARDS.put("lekang", new SkillHolder(ROSE_SPIRIT, 20917)); + TICKET_REWARDS.put("lilias", new SkillHolder(ROSE_SPIRIT, 20918)); + TICKET_REWARDS.put("lapham", new SkillHolder(ROSE_SPIRIT, 20919)); + TICKET_REWARDS.put("mafum", new SkillHolder(ROSE_SPIRIT, 20920)); + } + + private DimensionalManager() + { + super(DimensionalManager.class.getSimpleName(), "ai/npc"); + addStartNpc(DIMENSIONAL_MANAGER); + addTalkId(DIMENSIONAL_MANAGER); + addFirstTalkId(DIMENSIONAL_MANAGER); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + switch (event) + { + case "32478-01.htm": + case "32478-02.htm": + case "32478-03.htm": + case "32478-04.htm": + case "32478-05.htm": + case "32478-06.htm": + case "32478-07.htm": + case "32478-08.htm": + case "32478-09.htm": + case "32478-10.htm": + case "32478-11.htm": + case "32478-12.htm": + case "32478-13.htm": + case "32478-14.htm": + case "32478-15.htm": + case "32478-16.htm": + case "32478-17.htm": + case "32478-18.htm": + case "32478-19.htm": + case "32478-20.htm": + case "32478-21.htm": + { + htmltext = event; + break; + } + case "turtleascetic": + case "spiritshaman": + case "desheloph": + case "hyum": + case "lekang": + case "lilias": + case "lapham": + case "mafum": + case "foxshaman": + case "whiteweasel": + case "fairyprincess": + case "toyknight": + case "wildbeastfighter": + { + if (hasQuestItems(player, TICKET_REWARDS.get(event).getSkillId())) + { + takeItems(player, TICKET_REWARDS.get(event).getSkillId(), 1); + giveItems(player, TICKET_REWARDS.get(event).getSkillLvl(), 1); + } + else + { + player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_REQUIRED_ITEMS); + } + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + return "32478.htm"; + } + + public static void main(String[] args) + { + new DimensionalManager(); + } +}