diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-01.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-01.htm new file mode 100644 index 0000000000..d60ca98767 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-01.htm @@ -0,0 +1,8 @@ +Santa Claus:
+Hahaha... Good!
+Rudolph likes to eat "Fresh Herbs" If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.
+When Rudolph's energy runs low, it will go into your pack, find the herb, and eat it. Remember that he'll want to eat about every 10 minutes.
+Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.
+Finally, you have to donate 2019 adena to receive a weak Rudolph. How should I say this... Think of it as your annual donation to help the less fortunate.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-02.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-02.htm new file mode 100644 index 0000000000..e8c42208ba --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-02.htm @@ -0,0 +1,6 @@ +Santa Claus:
+Yes. The role of Santa has meaning for people who are full of love.
+But if you find any "Ice Candy Pieces" while out hunting, please bring them to me. I had a hole in my bag of presents, and several "Ice Candy" gift boxes fell out.
+I'm counting on you.
+If you give me 50 pieces of the Ice Candy Pieces, I'll give you a fitting Christmas present. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-03.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-03.htm new file mode 100644 index 0000000000..8e749165b6 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-03.htm @@ -0,0 +1,5 @@ +Santa Claus:
+Hmm... There aren't enough Ice Candy Pieces.
+Ice Candy Pieces come in 50 piece units.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-04.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-04.htm new file mode 100644 index 0000000000..3a1bfd1959 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-04.htm @@ -0,0 +1,4 @@ +Santa Claus:
+Please take good care of him.
+I'll look forward to him growing up into a strong Rudolph by the time Christmas ends. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-05.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-05.htm new file mode 100644 index 0000000000..fe8a649820 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-05.htm @@ -0,0 +1,3 @@ +Santa Claus:
+you've already received a Rudolph Agathion. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-06.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-06.htm new file mode 100644 index 0000000000..ce2ed6871f --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285-06.htm @@ -0,0 +1,4 @@ +Santa Claus:
+Oh no, not enough adena.
+If you donate "2019 adena" to help the less fortunate, I'll give you Rudolph Agathion that you can raise. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285.htm new file mode 100644 index 0000000000..be80a7d3cc --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/13285.htm @@ -0,0 +1,11 @@ +Santa Claus:
+ Have you heard about the Santa privilege?
+Apprentice Santas spend a lot of time taking care of weak Rudolphs.
+Raising a healthy Rudolph is very important to us.
+But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.
+This year, one apprentice Santa came up with a good idea. We would give people the gift of taking care of a weak Rudolph. It's a great idea, don't you think? We thought it would also give people the gift of joy in doing something good.
+Well? Are you interested in this Santa present?
+
+
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/RudolphsBlessing.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/RudolphsBlessing.java new file mode 100644 index 0000000000..318a13e999 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/RudolphsBlessing.java @@ -0,0 +1,164 @@ +/* + * 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 events.RudolphsBlessing; + +import org.l2jmobius.gameserver.data.xml.impl.SkillData; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.Containers; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonAgathion; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerUnsummonAgathion; +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.itemcontainer.Inventory; +import org.l2jmobius.gameserver.model.quest.LongTimeEvent; +import org.l2jmobius.gameserver.model.skills.Skill; +import org.l2jmobius.gameserver.model.skills.SkillCaster; + +/** + * @author IvanTotov, Edoo + */ +public class RudolphsBlessing extends LongTimeEvent +{ + private static final int SANTA_CLAUS = 13285; + + private static final int AGATHION_SEAL_BRACELET_RUDOLPH = 21709; + private static final int AGATHION_SEAL_BRACELET_RUDOLPH_NPC = 1598; + private static final int ICE_CANDY_PIECE = 21915; + private static final int SANTA_CLAUS_TREASURE_BOX = 21873; + + private static final int RUDOLPH_PRICE = 2019; // Calendar.getInstance().get(Calendar.YEAR) can be used but need to replace htmls. + + private static final SkillHolder RUDOLPH_TRYUCK = new SkillHolder(23181, 1); + private static final ItemHolder ITEM_REQUIREMENT = new ItemHolder(21872, 2); + + public RudolphsBlessing() + { + addStartNpc(SANTA_CLAUS); + addFirstTalkId(SANTA_CLAUS); + addTalkId(SANTA_CLAUS); + Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_SUMMON_AGATHION, (OnPlayerSummonAgathion event) -> OnPlayerSummonAgathion(event), this)); + Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_UNSUMMON_AGATHION, (OnPlayerUnsummonAgathion event) -> OnPlayerUnsummonAgathion(event), this)); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + if (event.equals("rudolph_eat")) + { + if ((player != null) && player.isOnline()) + { + if (takeItems(player, ITEM_REQUIREMENT.getId(), ITEM_REQUIREMENT.getCount())) + { + SkillCaster.triggerCast(player, player, RUDOLPH_TRYUCK.getSkill()); + Skill RudolphsBlessing = SkillData.getInstance().getSkill(23297, 1); + RudolphsBlessing.applyEffects(player, player); + } + startQuestTimer("rudolph_eat", 10 * 60 * 1000, null, player); + } + } + if (player == null) + { + return null; + } + + String htmltext = event; + switch (event) + { + case "rudolph": + { + if (hasQuestItems(player, AGATHION_SEAL_BRACELET_RUDOLPH)) + { + htmltext = "13285-05.htm"; + } + else if (player.getAdena() < RUDOLPH_PRICE) + { + htmltext = "13285-06.htm"; + } + else + { + takeItems(player, Inventory.ADENA_ID, RUDOLPH_PRICE); + giveItems(player, AGATHION_SEAL_BRACELET_RUDOLPH, 1); + htmltext = "13285-04.htm"; + } + break; + } + case "event_info": + { + htmltext = "13285-02.htm"; + break; + } + case "reward": + { + if (getQuestItemsCount(player, ICE_CANDY_PIECE) >= 50) + { + takeItems(player, ICE_CANDY_PIECE, 50); + giveItems(player, SANTA_CLAUS_TREASURE_BOX, 1); + } + else + { + htmltext = "13285-03.htm"; + } + break; + } + } + return htmltext; + } + + private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) + { + if (event.getAgathionId() != AGATHION_SEAL_BRACELET_RUDOLPH_NPC) + { + return; + } + final PlayerInstance player = event.getPlayer(); + if (player == null) + { + return; + } + + startQuestTimer("rudolph_eat", 10 * 60 * 1000, null, player); + } + + private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) + { + if (event.getAgathionId() != AGATHION_SEAL_BRACELET_RUDOLPH_NPC) + { + return; + } + final PlayerInstance player = event.getPlayer(); + if (player == null) + { + return; + } + + cancelQuestTimer("rudolph_eat", null, player); + } + + @Override + public String onFirstTalk(Npc npc, PlayerInstance player) + { + return "13285.htm"; + } + + public static void main(String[] args) + { + new RudolphsBlessing(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/config.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/config.xml new file mode 100644 index 0000000000..0d2a284123 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/events/RudolphsBlessing/config.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/23200-23299.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/23200-23299.xml index 9aee724164..d4ab8fd4ff 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/23200-23299.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/23200-23299.xml @@ -1501,7 +1501,6 @@ 2 77 A2 - 1 1000 1 NONE @@ -1537,7 +1536,6 @@ 2 82 A2 - 1 1000 1 NONE @@ -1571,7 +1569,6 @@ 1500 500 A2 - 1 1 NONE -5 @@ -1657,7 +1654,6 @@ 2 74 A2 - 1 1000 1 NONE @@ -1688,10 +1684,10 @@ 3600 DWARF_ATTACK_BUFF 900 + 500 1500 500 A2 - 1 1 NONE -5 @@ -1720,10 +1716,10 @@ 3600 DWARF_ATTACK_BUFF 900 + 500 1500 500 A2 - 1 1 NONE -5 @@ -1758,10 +1754,10 @@ 3600 DWARF_DEFENCE_BUFF 900 + 500 1500 500 A2 - 1 1 NONE -5 @@ -1794,10 +1790,10 @@ 3600 DWARF_DEFENCE_BUFF 900 + 500 1500 500 A2 - 1 1 NONE -5 @@ -1834,7 +1830,6 @@ 500 81 A2 - 1 1 NONE -5 @@ -1870,7 +1865,6 @@ 1500 500 A2 - 1 1 NONE -5 @@ -1908,7 +1902,6 @@ 1500 500 A2 - 1 1 NONE -5 @@ -1935,7 +1928,6 @@ 2000 1500 A1 - 1 1 -5 78 @@ -2002,7 +1994,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2028,7 +2019,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2054,7 +2044,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2080,7 +2069,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2106,7 +2094,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2132,7 +2119,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2158,7 +2144,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2184,7 +2169,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2210,7 +2194,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2235,7 +2218,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2261,7 +2243,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2287,7 +2268,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2313,7 +2293,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2339,7 +2318,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2365,7 +2343,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2391,7 +2368,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2445,7 +2421,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2471,7 +2446,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2497,7 +2471,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2523,7 +2496,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2561,7 +2533,6 @@ 500 78 A2 - 1 1 NONE -5 @@ -2637,7 +2608,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2711,7 +2681,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -2781,7 +2750,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -3079,9 +3047,9 @@ 3600 DWARF_ATTACK_BUFF 2000 + 500 500 A2 - 1 1 NONE -5 @@ -3129,9 +3097,9 @@ 3600 DWARF_DEFENCE_BUFF 2000 + 500 500 A2 - 1 1 NONE -5 @@ -3161,7 +3129,6 @@ false 500 A2 - 1 1 NONE -5 @@ -3186,7 +3153,6 @@ 2 77 A2 - 1 1000 1 NONE @@ -3222,7 +3188,6 @@ 2 82 A2 - 1 1000 1 NONE @@ -3256,7 +3221,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -3342,7 +3306,6 @@ 2 74 A2 - 1 1000 1 NONE @@ -3374,9 +3337,9 @@ 3600 DWARF_ATTACK_BUFF 2000 + 500 500 A2 - 1 1 NONE -5 @@ -3406,9 +3369,9 @@ 3600 DWARF_ATTACK_BUFF 2000 + 500 500 A2 - 1 1 NONE -5 @@ -3444,9 +3407,9 @@ 3600 DWARF_DEFENCE_BUFF 2000 + 500 500 A2 - 1 1 NONE -5 @@ -3480,9 +3443,9 @@ 3600 DWARF_DEFENCE_BUFF 2000 + 500 500 A2 - 1 1 NONE -5 @@ -3519,7 +3482,6 @@ 500 81 A2 - 1 1 NONE -5 @@ -3555,7 +3517,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -3593,7 +3554,6 @@ 2000 500 A2 - 1 1 NONE -5 @@ -3623,7 +3583,6 @@ -5 -1 0 - 0 3 1200 true @@ -3634,6 +3593,20 @@ 2 SELF SINGLE + + + 10 + DIFF + + + 10 + PER + + + 10 + PER + +