Addition of Rudolph's Blessing event.

Contributed by Edoo.
This commit is contained in:
MobiusDevelopment
2019-10-16 18:53:43 +00:00
parent 5ab451b10c
commit 326a3e6d32
80 changed files with 2128 additions and 8 deletions

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3318,7 +3318,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3329,6 +3328,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 seconds. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 seconds. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 seconds. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 seconds. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 seconds. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 sec. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 sec. -->

View File

@@ -0,0 +1,8 @@
<html><body>Santa Claus:<br>
Hahaha... Good!<br>
Rudolph likes to eat <font color="LEVEL">"Fresh Herbs"</font> If you feed it this herb continuously, it will grow into a strong Rudolph. You can find the herbs while hunting without much difficulty.<br>
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.<br>
Also, every time Rudolph eats the herb, it will cast a beneficial spell on you to show you its thanks.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing rudolph">Donate to helpthe less fortunate. (2019 adena)</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Santa Claus:<br>
Yes. The role of Santa has meaning for people who are full of love.<br>
But if you find any <font color="LEVEL">"Ice Candy Pieces"</font> 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.<br>
I'm counting on you.<br>
If you give me <font color="LEVEL">50 pieces</font> of the <font color="LEVEL">Ice Candy Pieces</font>, I'll give you a fitting Christmas <font color="LEVEL">present.</font>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Santa Claus:<br>
Hmm... There aren't enough Ice Candy Pieces.<br>
<font color="LEVEL">Ice Candy Pieces</font> come in <font color="LEVEL">50 piece</font> units.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RudolphsBlessing 13285.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Please take good care of him.<br>
I'll look forward to him growing up into a strong Rudolph by the time Christmas ends.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Santa Claus:<br>
You've already received a Rudolph Agathion.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Santa Claus:<br>
Oh no, not enough adena.<br>
If you donate <font color="LEVEL">"2019 adena"</font> to help the less fortunate, I'll give you Rudolph Agathion that you can raise.
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Santa Claus:<br>
Have you heard about the Santa privilege?<br>
Apprentice Santas spend a lot of time taking care of weak Rudolphs.<br>
Raising a healthy Rudolph is very important to us.<br>
But during the Christmas season, we don't have a lot of time to spend taking care of the Rudolphs.<br>
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.<br>
Well? Are you interested in this Santa present?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-01.htm">I will take care of a weak Rudolph.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing 13285-02.htm">I'm not interested.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RudolphsBlessing reward"><font color="LEVEL">Give 50 Ice Candy Pieces.</font></Button>
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Rudolphs Blessing" active="1 12 2019-25 01 2020" enableShrines="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="21915" min="1" max="1" chance="45%" /> <!-- Ice Candy Piece -->
<add item="21872" min="1" max="1" chance="5%" /> <!-- Fresh Herb -->
</droplist>
<spawnlist>
<!-- Santa -->
<add npc="13285" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="13285" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="13285" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="13285" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="13285" x="147448" y="27256" z="-2206" heading="49153" /> <!-- Aden -->
<add npc="13285" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="13285" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="13285" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="13285" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="13285" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="13285" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="13285" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="13285" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<add npc="13285" x="115592" y="75160" z="-2592" heading="59134" /> <!-- Hunter Vilage -->
<!-- Tree -->
<add npc="34009" x="-79016" y="247912" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34009" x="-115176" y="256280" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34009" x="208376" y="87480" z="-1024" heading="0" /> <!-- Arcan -->
<add npc="34009" x="80840" y="148296" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34009" x="146904" y="27128" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="148024" y="27144" z="-2206" heading="0" /> <!-- Aden -->
<add npc="34009" x="147432" y="-57176" z="-2784" heading="0" /> <!-- Goddard -->
<add npc="34009" x="44808" y="-48168" z="-800" heading="0" /> <!-- Rune -->
<add npc="34009" x="82856" y="54088" z="-1488" heading="0" /> <!-- Oren -->
<add npc="34009" x="87608" y="-141512" z="-1344" heading="0" /> <!-- Schuttgart -->
<add npc="34009" x="112200" y="219832" z="-3664" heading="0" /> <!-- Heine -->
<add npc="34009" x="16632" y="142824" z="-2704" heading="0" /> <!-- Dion -->
<add npc="34009" x="-13944" y="122680" z="-3120" heading="0" /> <!-- Gludio -->
<add npc="34009" x="-80392" y="149896" z="-3040" heading="0" /> <!-- Gludin -->
<add npc="34009" x="115384" y="75064" z="-2600" heading="0" /> <!-- Hunter Vilage -->
</spawnlist>
<destoyItemsOnEnd>
<item id="21709" /> <!-- BRACELET_RUDOLPH -->
</destoyItemsOnEnd>
<messages>
<add type="onEnd" text="Rudolph's Blessing: Event Ended!" />
<add type="onEnter" text="Rudolph's blessing: The event continues!" />
</messages>
</event>

View File

@@ -3623,7 +3623,6 @@
<magicCriticalRate>-5</magicCriticalRate>
<specialLevel>-1</specialLevel>
<hitCancelTime>0</hitCancelTime>
<activateRate>0</activateRate>
<abnormalLvl>3</abnormalLvl>
<abnormalTime>1200</abnormalTime>
<irreplacableBuff>true</irreplacableBuff>
@@ -3634,6 +3633,20 @@
<isMagic>2</isMagic>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="Speed">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>10</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="23298" toLevel="1" name="Flame Hawk">
<!-- Envelops in flames to inflict 300 fire damage every second for 10 sec. -->