diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-1.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-1.htm new file mode 100644 index 0000000000..39a0eecc2e --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-1.htm @@ -0,0 +1,9 @@ +Wish Granting Moo Cow:
+I will give you Lucky Pouch to scare away any misfortunes and disasters.
+There are three types of Lucky Pouches: Growth (aquired XP/SP), Prosperity (aquired adena bonus), and Harmony (Vitality Bonus). I will give you the pouch, which suits you the most.
+Oh, one more thing! If you don't need the Lucky Pouch you get, you can exchange it for another one. But you can do it only once.
+Remember that exchange is only possible once for every character of Lv. 105 and higher.
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-2.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-2.htm new file mode 100644 index 0000000000..9ce9169f2c --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-2.htm @@ -0,0 +1,12 @@ +Wish Granting Moo Cow:
+I can tell your future and give you a buff that will help you cope with any difficulties.
+There are 4 buffs in total. For 8 hours they can increase your Attribute Attack/Resistance by 50. Also, each of these buffs boosts your attack, defense, acquired XP and luck.
+And once in a while you can get even stronger buffs, if the fate is on your side.
+You can have your future told for free once a day. +After that I will give you a buff.
+If you don't like the buff you've got, I can alter your fate a bit and change the effect, but you will have to pay for it.
+So do you want to know your future and get a buff?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-already-exchanged.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-already-exchanged.htm new file mode 100644 index 0000000000..145a27e7c7 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-already-exchanged.htm @@ -0,0 +1,3 @@ +Wish Granting Moo Cow:
+It seems that you already exchanged once your Lucky Pouch, you can't do it again.

+ \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-already-received.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-already-received.htm new file mode 100644 index 0000000000..94b282c2bd --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-already-received.htm @@ -0,0 +1,3 @@ +Wish Granting Moo Cow:
+You already received your Lucky Pouch.

+ \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-already-received.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-already-received.htm new file mode 100644 index 0000000000..42e82f5ce5 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-already-received.htm @@ -0,0 +1,3 @@ +Wish Granting Moo Cow:
+You already received a buff, if you don't like it you can alter your fate with 5 mln adena.
+ \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-no-adena.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-no-adena.htm new file mode 100644 index 0000000000..7231046a41 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-no-adena.htm @@ -0,0 +1,5 @@ +Wish Granting Moo Cow:
+This is not enough.
+I'm sorry, but I can't help you.
+ + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-no-level.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-no-level.htm new file mode 100644 index 0000000000..3d254ba1d7 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-no-level.htm @@ -0,0 +1,5 @@ +Wish Granting Moo Cow:
+Only characters of Lv. 105 and higher can have their fortune told.
+Come back when you reach Lv.105.
+ + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-received.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-received.htm new file mode 100644 index 0000000000..cfe82bfb25 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-buff-received.htm @@ -0,0 +1,3 @@ +Wish Granting Moo Cow:
+You received a random buff.
+ \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-g.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-g.htm new file mode 100644 index 0000000000..485668c001 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-g.htm @@ -0,0 +1,6 @@ +Wish Granting Moo Cow:
+You choose Pouch of Growth (acquired XP/SP), right?
+But remember, you can make the exchange only once, so you have to think carefully.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-h.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-h.htm new file mode 100644 index 0000000000..71b17dcb6f --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-h.htm @@ -0,0 +1,6 @@ +Wish Granting Moo Cow:
+You choose Pouch of Harmony (Vitality bonus), right?
+But remember, you can make the exchange only once, so you have to think carefully.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-p.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-p.htm new file mode 100644 index 0000000000..f46cd3e523 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange-p.htm @@ -0,0 +1,6 @@ +Wish Granting Moo Cow:
+You choose Pouch of Prosperity (acquired adena bonus), right?
+But remember, you can make the exchange only once, so you have to think carefully.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange.htm new file mode 100644 index 0000000000..6c4fd347a0 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-exchange.htm @@ -0,0 +1,10 @@ +Wish Granting Moo Cow:
+Do you want to exchange your Lucky Pouch?
+So, do you think you will need something totally different for the next year?
+Well, then you can choose another Lucky Pouch.
+But remember, you can make the exchange only once, so you have to think carefully.
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-gift-no-level.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-gift-no-level.htm new file mode 100644 index 0000000000..86fb92fcba --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-gift-no-level.htm @@ -0,0 +1,5 @@ +Wish Granting Moo Cow:
+You are too weak, I can't see your future.

+Reach Lv.105 if you want me to tell your fortune.
+ + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-no-pouch.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-no-pouch.htm new file mode 100644 index 0000000000..34af203b55 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-no-pouch.htm @@ -0,0 +1,6 @@ +Wish Granting Moo Cow:
+It seems that you don't have a Lucky Pouch.

+If you let me tell your future for the year, I will give you a Lucky Pouch.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-successful.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-successful.htm new file mode 100644 index 0000000000..035eec84b8 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590-successful.htm @@ -0,0 +1,3 @@ +Wish Granting Moo Cow:
+Here is your Lucky Pouch.
+ \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590.htm b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590.htm new file mode 100644 index 0000000000..b7a54d6fbf --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/34590.htm @@ -0,0 +1,7 @@ +Wish Granting Moo Cow:
+I bring the luck energy, and I wish to share it with the whole world.
+I can also tell your future. Do you want me to?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/DreamMaker.java b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/DreamMaker.java new file mode 100644 index 0000000000..35bedad1d3 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/DreamMaker.java @@ -0,0 +1,215 @@ +/* + * 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.DreamMaker; + +import org.l2jmobius.commons.util.Chronos; +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.quest.LongTimeEvent; + +/** + * Dream Maker event AI. + * @author CostyKiller + */ +public class DreamMaker extends LongTimeEvent +{ + // NPC + private static final int MOO_COW = 34590; + // Items + private static final int LUCKY_POUCH_GROWTH = 81934; // Lucky Pouch Growth + private static final int LUCKY_POUCH_PROSPERITY = 81935; // Lucky Pouch Prosperity + private static final int LUCKY_POUCH_HARMONY = 81936; // Lucky Pouch Harmony + // Buffs + private static final SkillHolder[] BUFFS = + { + new SkillHolder(34032, 1), // Unchallenged Supremacy + new SkillHolder(34032, 2), // Unchallenged Supremacy + new SkillHolder(34033, 1), // Red Alert + new SkillHolder(34033, 2), // Red Alert + new SkillHolder(34034, 1), // Step Up + new SkillHolder(34034, 2), // Step Up + new SkillHolder(34035, 1), // Luck's Kindness + new SkillHolder(34035, 2), // Luck's Kindness + }; + + private DreamMaker() + { + addStartNpc(MOO_COW); + addFirstTalkId(MOO_COW); + addTalkId(MOO_COW); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = event; + switch (event) + { + case "get_gift": + { + if (player.getVariables().getBoolean("DREAM_MAKER_GIFT_RECEIVED", false) == false) + { + giveItems(player, Rnd.get(LUCKY_POUCH_GROWTH, LUCKY_POUCH_HARMONY), 1); + player.getVariables().set("DREAM_MAKER_GIFT_RECEIVED", true); + htmltext = "34590-successful.htm"; + } + else + { + htmltext = "34590-already-received.htm"; + } + break; + } + case "g_pouch": + { + if (player.getLevel() < 105) + { + htmltext = "34590-gift-no-level.htm"; + } + else if (player.getVariables().getBoolean("DREAM_MAKER_GIFT_EXCHANGED", false) == true) + { + htmltext = "34590-already-exchanged.htm"; + } + else if (hasAtLeastOneQuestItem(player, LUCKY_POUCH_PROSPERITY, LUCKY_POUCH_HARMONY)) + { + if (hasQuestItems(player, LUCKY_POUCH_PROSPERITY)) + { + takeItems(player, LUCKY_POUCH_PROSPERITY, 1); + } + else if (hasQuestItems(player, LUCKY_POUCH_HARMONY)) + { + takeItems(player, LUCKY_POUCH_HARMONY, 1); + } + giveItems(player, LUCKY_POUCH_GROWTH, 1); + player.getVariables().set("DREAM_MAKER_GIFT_EXCHANGED", true); + htmltext = "34590-successful.htm"; + } + else + { + htmltext = "34590-no-pouch.htm"; + } + break; + } + case "p_pouch": + { + if (player.getLevel() < 105) + { + htmltext = "34590-gift-no-level.htm"; + } + else if (player.getVariables().getBoolean("DREAM_MAKER_GIFT_EXCHANGED", false) == true) + { + htmltext = "34590-pouch-exchanged.htm"; + } + else if (hasAtLeastOneQuestItem(player, LUCKY_POUCH_GROWTH, LUCKY_POUCH_HARMONY)) + { + if (hasQuestItems(player, LUCKY_POUCH_GROWTH)) + { + takeItems(player, LUCKY_POUCH_GROWTH, 1); + } + else if (hasQuestItems(player, LUCKY_POUCH_HARMONY)) + { + takeItems(player, LUCKY_POUCH_HARMONY, 1); + } + giveItems(player, LUCKY_POUCH_PROSPERITY, 1); + player.getVariables().set("DREAM_MAKER_GIFT_EXCHANGED", true); + htmltext = "34590-successful.htm"; + } + else + { + htmltext = "34590-no-pouch.htm"; + } + break; + } + case "h_pouch": + { + if (player.getLevel() < 105) + { + htmltext = "34590-gift-no-level.htm"; + } + else if (player.getVariables().getBoolean("DREAM_MAKER_GIFT_EXCHANGED", false) == true) + { + htmltext = "34590-pouch-exchanged.htm"; + } + else if (hasAtLeastOneQuestItem(player, LUCKY_POUCH_GROWTH, LUCKY_POUCH_PROSPERITY)) + { + if (hasQuestItems(player, LUCKY_POUCH_GROWTH)) + { + takeItems(player, LUCKY_POUCH_GROWTH, 1); + } + else if (hasQuestItems(player, LUCKY_POUCH_PROSPERITY)) + { + takeItems(player, LUCKY_POUCH_PROSPERITY, 1); + } + giveItems(player, LUCKY_POUCH_HARMONY, 1); + player.getVariables().set("DREAM_MAKER_GIFT_EXCHANGED", true); + htmltext = "34590-successful.htm"; + } + else + { + htmltext = "34590-no-pouch.htm"; + } + break; + } + case "get_buff": + { + if (player.getLevel() < 105) + { + htmltext = "34590-buff-no-level.htm"; + } + else if ((player.getVariables().getLong("DREAM_MAKER_BUFF_DELAY", 0) + 86400000) >= Chronos.currentTimeMillis()) + { + npc.doCast(getRandomEntry(BUFFS).getSkill()); + player.getVariables().set("DREAM_MAKER_BUFF_DELAY", Chronos.currentTimeMillis()); + htmltext = "34590-buff-received.htm"; + } + else + { + htmltext = "34590-buff-already-received.htm"; + } + break; + } + case "alter_buff": + { + if (player.getAdena() < 5000000) + { + htmltext = "34590-buff-no-adena.htm"; + } + else if (player.isAffectedBySkill(BUFFS[0].getSkillId()) || player.isAffectedBySkill(BUFFS[2].getSkillId()) || player.isAffectedBySkill(BUFFS[4].getSkillId()) || player.isAffectedBySkill(BUFFS[6].getSkillId())) + { + takeItems(player, 57, 5000000); + npc.setTarget(player); + npc.doCast(getRandomEntry(BUFFS).getSkill()); + htmltext = "34590-buff-received.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(Npc npc, PlayerInstance player) + { + return npc.getId() + ".htm"; + } + + public static void main(String[] args) + { + new DreamMaker(); + } +} diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/config.xml b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/config.xml new file mode 100644 index 0000000000..6dec9dd744 --- /dev/null +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/events/DreamMaker/config.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/items/81900-81999.xml b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/items/81900-81999.xml index bb9628f0cc..e17477d956 100644 --- a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/items/81900-81999.xml +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/items/81900-81999.xml @@ -258,6 +258,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/skills/34000-34099.xml b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/skills/34000-34099.xml index baf5cd28c4..0c0c27397f 100644 --- a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/skills/34000-34099.xml +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/stats/skills/34000-34099.xml @@ -118,4 +118,279 @@ icon.skill0000 P + + + + icon.christmas_card_box1 + icon.christmas_card_box1 + + + 9 + 10 + + + 28800 + 43200 + + BR_EVENT_BUF7 + 1 + 1 + 120 + A2 + NONE + TARGET + SINGLE + true + true + true + + + + 3 + 5 + + PER + + + + 3 + 5 + + PER + + + 50 + DIFF + + + 50 + FIRE + + + 50 + WATER + + + 50 + WIND + + + 50 + EARTH + + + 50 + HOLY + + + 50 + DARK + + + + + + icon.ev_2021_newyear_rune5 + icon.ev_2021_newyear_rune5 + + + 9 + 10 + + + 28800 + 43200 + + BR_EVENT_BUF7 + 1 + 1 + 120 + A2 + NONE + TARGET + SINGLE + true + true + true + + + + 3 + 5 + + PER + + + + 3 + 5 + + PER + + + 50 + DIFF + + + 50 + FIRE + + + 50 + WATER + + + 50 + WIND + + + 50 + EARTH + + + 50 + HOLY + + + 50 + DARK + + + + + + icon.ev_2021_newyear_rune4 + icon.ev_2021_newyear_rune4 + + + 9 + 10 + + + 28800 + 43200 + + BR_EVENT_BUF7 + 1 + 1 + 120 + A2 + NONE + TARGET + SINGLE + true + true + true + + + + 3 + 5 + + + + + 3 + 5 + + + + 50 + DIFF + + + 50 + FIRE + + + 50 + WATER + + + 50 + WIND + + + 50 + EARTH + + + 50 + HOLY + + + 50 + DARK + + + + + + icon.ev_2021_newyear_rune3 + icon.ev_2021_newyear_rune3 + + + 9 + 10 + + + 28800 + 43200 + + BR_EVENT_BUF7 + 1 + 1 + 120 + A2 + NONE + TARGET + SINGLE + true + true + true + + + + 2 + 5 + + LUC + + + + 2 + 5 + + CHA + + + 50 + DIFF + + + 50 + FIRE + + + 50 + WATER + + + 50 + WIND + + + 50 + EARTH + + + 50 + HOLY + + + 50 + DARK + + +