This commit is contained in:
MobiusDev
2016-10-20 23:40:28 +00:00
parent 7772f93f80
commit 93c43d7067
18458 changed files with 3262754 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
<html><body>Alegria:<br>
Oh really?!<br>
Well, I'm already taken. But I'm flattered that you would think so highly of me.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Alegria:<br>
Oh, no! You don't have the hat with you.<br>
You should've checked to see if the Explorer Hat (event) was in your inventory! Can't exchange if you don't have it!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Alegria:<br>
Once you exchange your Explorer Hat, you will not be able to receive it again. Are you ok with that?<br>
Your Birthday Hat is so pretty, which is why I'm worried that this might be a mistake on your part.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CharacterBirthday change">"My mind's made"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0">"Hmm. Maybe you're right." (Back)</Button>
</body></html>

View File

@@ -0,0 +1,122 @@
/*
* 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.CharacterBirthday;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.util.Util;
/**
* Character Birthday event AI.<br>
* Updated to H5 by Nyaran.
* @author Gnacik
*/
final class CharacterBirthday extends Quest
{
private static final int ALEGRIA = 32600;
private static int SPAWNS = 0;
private static final int[] GK =
{
30006,
30059,
30080,
30134,
30146,
30177,
30233,
30256,
30320,
30540,
30576,
30836,
30848,
30878,
30899,
31275,
31320,
31964,
32163
};
private CharacterBirthday()
{
super(-1, CharacterBirthday.class.getSimpleName(), "events");
addStartNpc(ALEGRIA);
addStartNpc(GK);
addTalkId(ALEGRIA);
addTalkId(GK);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
if (event.equalsIgnoreCase("despawn_npc"))
{
npc.doDie(player);
SPAWNS--;
htmltext = null;
}
else if (event.equalsIgnoreCase("change"))
{
// Change Hat
if (hasQuestItems(player, 10250))
{
takeItems(player, 10250, 1); // Adventurer Hat (Event)
giveItems(player, 21594, 1); // Birthday Hat
htmltext = null; // FIXME: Probably has html
// Despawn npc
npc.doDie(player);
SPAWNS--;
}
else
{
htmltext = "32600-nohat.htm";
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
if (SPAWNS >= 3)
{
return "busy.htm";
}
if (!Util.checkIfInRange(10, npc, player, true))
{
final L2Npc spawned = addSpawn(32600, player.getX() + 10, player.getY() + 10, player.getZ() + 10, 0, false, 0, true);
startQuestTimer("despawn_npc", 180000, spawned, player);
SPAWNS++;
}
else
{
return "tooclose.htm";
}
return null;
}
public static void main(String[] args)
{
new CharacterBirthday();
}
}

View File

@@ -0,0 +1,3 @@
<html><body>
Alegria is very busy now. Try again later.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Gatekeeper:<br>
Alegria, the Creation Day Helper, cannot be summoned as you are too close.<br1>
Please move back a little bit and try again.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Crystal Seer Eve:<br>
Welcome to the doorway to your future! Show me your tickets, and I'll show you all that you desire.<br>
As long as you bring me the Fortune Reading tickets needed, I can read your fortune.<br>
You can get various dimensional items and rare items. You can get better items from the Luxury Fortune Reading game than the Regular Fortune Reading game.<br>
To play the <font color="LEVEL">Luxury Fortune Reading game</font>, you'll need a <font color="LEVEL">Luxury Fortune Reading Ticket</font>.<br>
To play the <font color="LEVEL">Regular Fortune Reading game</font>, you'll need a <font color="LEVEL">Fortune Reading Ticket</font>.<br>
You can purchase <font color="LEVEL">Fortune Reading Tickets</font> from the <font color="LEVEL">L2Store</font> for 35,000,000 Adena each..<br>
You can purchase <font color="LEVEL">Luxury Fortune Reading Tickets</font> for 160 NCoins each.<br>
<a action="bypass -h Quest EveTheFortuneTeller 8542.htm">Back</a></body></html>

View File

@@ -0,0 +1,12 @@
<html><body scroll="no">
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern"> <tr>
<td valign="top" align="center"> <!-- Invitation Emblem --> <table border=0 cellpadding=0 cellspacing=0> <tr>
<td align="center" width=185 height=185 background="BranchSys3.LuckyGameEmblem"></td></tr>
</table> <!-- //Invitation Emblem --> <table border=0 cellpadding=0 cellspacing=0 width="272"> <tr>
<td align="center" height="30"><font color="af9878">May your future be full of mystery!</font></td></tr>
<tr><td align="center">What would suit your fancy, traveler?</td></tr> <tr><td height="10"></td></tr>
<tr><td align="center"><button action="bypass -h Quest EveTheFortuneTeller LuxuryFortuneReadingGame" value="Luxury Fortune Reading Game" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></button></td></tr>
<tr><td height="10"></td></tr> <tr><td align="center"><button action="bypass -h Quest EveTheFortuneTeller FortuneReadingGame" value="Fortune Reading Game" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_contribution_down" fore="L2UI_CT1.HtmlWnd_DF_contribution"></button></td></tr> <tr><td height="10"></td></tr>
<tr><td align="center"><button action="bypass -h Quest EveTheFortuneTeller 8542-1.htm" value="Help" width="200" height="31" back="L2UI_CT1.OlympiadWnd_DF_Info_Down" fore="L2UI_CT1.OlympiadWnd_DF_Info"></button></td></tr>
<tr><td height="10"></td></tr> </table> </td></tr></table>
</body></html>

View File

@@ -0,0 +1,109 @@
/*
* 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.EveTheFortuneTeller;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import com.l2jmobius.gameserver.network.serverpackets.luckygame.ExStartLuckyGame;
import com.l2jmobius.gameserver.util.Broadcast;
/**
* Eve the Fortune Teller Returns<br>
* Info - http://www.lineage2.com/en/news/events/11182015-eve-the-fortune-teller-returns.php
* @author Mobius
*/
final class EveTheFortuneTeller extends LongTimeEvent
{
// NPCs
private static final int EVE = 8542;
private static final int JAYCE = 8540;
// Misc
private static final Location JAYCE_SPAWN = new Location(148090, 26644, -2209, 16383);
private static final NpcStringId[] JAYCE_TEXT =
{
NpcStringId.I_LOOK_WEST,
NpcStringId.EVE_WILL_BRING_YOU_GREAT_FORTUNE,
NpcStringId.YOU_WILL_ONE_DAY_ASK_ME_FOR_GUIDANCE_IN_YOUR_PATH
};
private EveTheFortuneTeller()
{
super(EveTheFortuneTeller.class.getSimpleName(), "events");
addStartNpc(EVE);
addFirstTalkId(EVE);
addTalkId(EVE);
addSpawnId(JAYCE);
if (isEventPeriod())
{
addSpawn(JAYCE, JAYCE_SPAWN, false, 0);
}
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "8542.htm":
case "8542-1.htm":
{
htmltext = event;
break;
}
case "FortuneReadingGame":
{
player.sendPacket(new ExStartLuckyGame(1));
break;
}
case "LuxuryFortuneReadingGame":
{
player.sendPacket(new ExStartLuckyGame(2));
break;
}
case "JAYCE_SHOUT":
{
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), JAYCE_TEXT[getRandom(JAYCE_TEXT.length)]), 1000);
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "8542.htm";
}
@Override
public String onSpawn(L2Npc npc)
{
startQuestTimer("JAYCE_SHOUT", 45000, npc, null, true);
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new EveTheFortuneTeller();
}
}

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Eve the Fortune Teller" active="11 11 1015-18 12 2015" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<spawnlist>
<!-- Eve -->
<add npc="8542" x="-114178" y="255031" z="-1538" heading="16383" /> <!-- Talking Island -->
<add npc="8542" x="-82484" y="153527" z="-3168" heading="32767" /> <!-- Gludin -->
<add npc="8542" x="-13373" y="124615" z="-3120" heading="49151" /> <!-- Gludio -->
<add npc="8542" x="20550" y="144602" z="-3080" heading="33104" /> <!-- Dion -->
<add npc="8542" x="82672" y="146596" z="-3464" heading="33000" /> <!-- Giran -->
<add npc="8542" x="109947" y="221058" z="-3483" heading="49151" /> <!-- Heine -->
<add npc="8542" x="81946" y="55388" z="-1520" heading="16500" /> <!-- Oren -->
<add npc="8542" x="115775" y="76783" z="-2664" heading="58062" /> <!-- Hunters -->
<add npc="8542" x="148123" y="26655" z="-2209" heading="16383" /> <!-- Aden -->
<add npc="8542" x="43521" y="-49074" z="-792" heading="597" /> <!-- Rune -->
<add npc="8542" x="146301" y="-57974" z="-2985" heading="44000" /> <!-- Goddard -->
<add npc="8542" x="88792" y="-140711" z="-1544" heading="11500" /> <!-- Schuttgart -->
</spawnlist>
<messages>
<add type="onEnd" text="Eve the Fortune Teller: Event end!" />
<add type="onEnter" text="Eve the Fortune Teller: Event ongoing!" />
</messages>
</event>

View File

@@ -0,0 +1,7 @@
<html><body>
These warm spring sunrays feel strange to me undoubtedly because I'm used to the frozen eternal winter of the Ice Palace. I fear they may be causing some equally strange thoughts, as I'm feeling rather generous right now.<br>
Give me one Adena and I shall bestow a gift upon you for visiting me.<br>
However, if you don't intend to bother me, leave me alone a while, say... 20 hours, so that I might enjoy this change of weather.<br>
Oh and also, should you find any heart-warming items during your adventures, bring them back to me and I might feel even more generous...<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest FreyaCelebration give_potion">Give one Adena to Freya.</Button>
</body></html>

View File

@@ -0,0 +1,152 @@
/*
* 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.FreyaCelebration;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.util.Util;
/**
* Freya Celebration event AI.
* @author Gnacik
*/
final class FreyaCelebration extends LongTimeEvent
{
// NPC
private static final int FREYA = 13296;
// Items
private static final int FREYA_POTION = 15440;
private static final int FREYA_GIFT = 17138;
// Misc
private static final int HOURS = 20;
private static final int[] SKILLS =
{
9150,
9151,
9152,
9153,
9154,
9155,
9156
};
private static final NpcStringId[] FREYA_TEXT =
{
NpcStringId.EVEN_THOUGH_YOU_BRING_SOMETHING_CALLED_A_GIFT_AMONG_YOUR_HUMANS_IT_WOULD_JUST_BE_PROBLEMATIC_FOR_ME,
NpcStringId.I_JUST_DON_T_KNOW_WHAT_EXPRESSION_I_SHOULD_HAVE_IT_APPEARED_ON_ME_ARE_HUMAN_S_EMOTIONS_LIKE_THIS_FEELING,
NpcStringId.THE_FEELING_OF_THANKS_IS_JUST_TOO_MUCH_DISTANT_MEMORY_FOR_ME,
NpcStringId.BUT_I_KIND_OF_MISS_IT_LIKE_I_HAD_FELT_THIS_FEELING_BEFORE,
NpcStringId.I_AM_ICE_QUEEN_FREYA_THIS_FEELING_AND_EMOTION_ARE_NOTHING_BUT_A_PART_OF_MALISS_A_MEMORIES
};
private FreyaCelebration()
{
super(FreyaCelebration.class.getSimpleName(), "events");
addStartNpc(FREYA);
addFirstTalkId(FREYA);
addTalkId(FREYA);
addSkillSeeId(FREYA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equalsIgnoreCase("give_potion"))
{
if (getQuestItemsCount(player, Inventory.ADENA_ID) > 1)
{
final long _curr_time = System.currentTimeMillis();
final String value = loadGlobalQuestVar(player.getAccountName());
final long _reuse_time = value.equals("") ? 0 : Long.parseLong(value);
if (_curr_time > _reuse_time)
{
takeItems(player, Inventory.ADENA_ID, 1);
giveItems(player, FREYA_POTION, 1);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (HOURS * 3600000)));
}
else
{
final long remainingTime = (_reuse_time - System.currentTimeMillis()) / 1000;
final int hours = (int) (remainingTime / 3600);
final int minutes = (int) ((remainingTime % 3600) / 60);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
sm.addItemName(FREYA_POTION);
sm.addInt(hours);
sm.addInt(minutes);
player.sendPacket(sm);
}
}
else
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_NEED_S2_S1_S);
sm.addItemName(Inventory.ADENA_ID);
sm.addInt(1);
player.sendPacket(sm);
}
}
return null;
}
@Override
public String onSkillSee(L2Npc npc, L2PcInstance caster, Skill skill, L2Object[] targets, boolean isSummon)
{
if ((caster == null) || (npc == null))
{
return null;
}
if ((npc.getId() == FREYA) && Util.contains(targets, npc) && Util.contains(SKILLS, skill.getId()))
{
if (getRandom(100) < 5)
{
final CreatureSay cs = new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
cs.addStringParameter(caster.getName());
npc.broadcastPacket(cs);
caster.addItem("FreyaCelebration", FREYA_GIFT, 1, npc, true);
}
else if (getRandom(10) < 2)
{
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), FREYA_TEXT[getRandom(FREYA_TEXT.length - 1)]));
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "13296.htm";
}
public static void main(String[] args)
{
new FreyaCelebration();
}
}

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Freya Celebration" active="27 02 2009-28 02 2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<spawnlist>
<add npc="13296" x="-119494" y="44882" z="360" heading="24576" />
<add npc="13296" x="-117239" y="46842" z="360" heading="49151" />
<add npc="13296" x="-84023" y="243051" z="-3728" heading="4096" />
<add npc="13296" x="-84411" y="244813" z="-3728" heading="57343" />
<add npc="13296" x="46908" y="50856" z="-2992" heading="8192" />
<add npc="13296" x="45538" y="48357" z="-3056" heading="18000" />
<add npc="13296" x="-45372" y="-114104" z="-240" heading="16384" />
<add npc="13296" x="-45278" y="-112766" z="-240" heading="0" />
<add npc="13296" x="9929" y="16324" z="-4568" heading="62999" />
<add npc="13296" x="11546" y="17599" z="-4584" heading="46900" />
<add npc="13296" x="115096" y="-178370" z="-880" heading="0" />
<add npc="13296" x="-13727" y="122117" z="-2984" heading="16384" />
<add npc="13296" x="-14129" y="123869" z="-3112" heading="40959" />
<add npc="13296" x="-83156" y="150994" z="-3120" heading="0" />
<add npc="13296" x="-81031" y="150038" z="-3040" heading="0" />
<add npc="13296" x="16111" y="142850" z="-2696" heading="16000" />
<add npc="13296" x="17275" y="145000" z="-3032" heading="25000" />
<add npc="13296" x="111004" y="218928" z="-3536" heading="16384" />
<add npc="13296" x="81755" y="146487" z="-3528" heading="32768" />
<add npc="13296" x="82145" y="148609" z="-3464" heading="0" />
<add npc="13296" x="83037" y="149324" z="-3464" heading="44000" />
<add npc="13296" x="81987" y="53723" z="-1488" heading="0" />
<add npc="13296" x="147200" y="25614" z="-2008" heading="16384" />
<add npc="13296" x="148557" y="26806" z="-2200" heading="32768" />
<add npc="13296" x="147421" y="-55435" z="-2728" heading="49151" />
<add npc="13296" x="148206" y="-55786" z="-2776" heading="61439" />
<add npc="13296" x="85584" y="-142490" z="-1336" heading="0" />
<add npc="13296" x="86865" y="-142915" z="-1336" heading="26000" />
<add npc="13296" x="43966" y="-47709" z="-792" heading="49999" />
<add npc="13296" x="43165" y="-48461" z="-792" heading="17000" />
</spawnlist>
<messages>
<add type="onEnd" text="Freya Celebration: Event end!" />
<add type="onEnter" text="Freya Celebration: Event ongoing!" />
</messages>
</event>

View File

@@ -0,0 +1,9 @@
<html><body>Jack Sage:<br><br>
The Memories of a Newbie provides the "Newbie Support buffs", which can be received up to level 75, to veteran adventurers of level 76 or more.<br>
This is an additional gift given by the Temple, so that all of you can focus on training. This is a small reward to all the great adventurers who fought on the front lines when our world was in danger. Please note that it will only be available <font color="LEVEL">during the time I'm dispatched</font>.<br><br>
You will receive the following buffs:<br><br>
Warrior: Wind Walk, Shield, Magic Barrier, Bless the Body, Vampiric Rage, Regeneration, Haste.<br>
Mage: Wind Walk, Shield, Magic Barrier, Bless the Soul, Acumen, Concentration, Empower.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality memories_player">Receive the Memories of a Newbie.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Jack Sage:<br><br>
The Memories of a Newbie for summons provides the "Newbie Support buffs", which can be received up to level 75, to the veteran adventurers' summons of level 76 or more.<br>
This is an additional gift given by the Temple, so that all of you can focus on training. This is a small reward to all the great adventurers who fought on the front lines when our world was in danger. Please note that it will only be available <font color="LEVEL">during the time I'm dispatched</font>.<br><br>
Your summon will receive the following buffs (these buffs do not apply to pets):<br><br>
Wind Walk, Shield, Magic Barrier, Bless the Body, Bless the Soul, Vampiric Rage, Acumen, Regeneration, Concentration, Haste, and Empower.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality memories_summon">Receive the Memories of a Newbie for summons.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Jack Sage:<br><br>
The Oracle said that the great danger coming from the Frozen Labyrinth in the Schuttgart territory will affect the whole world. Since the Archbishop has received this revelation from Eva, his nights have been sleepless. He finally went to the Magic Research Institute and came to an important decision: the Gift of Vitality must be unleashed. This shall help Aden's adventurers to reveal their maximum potential.<br>
The Gift was sealed centuries ago and a huge amount of money and effort from the highest ranked wizards was required for this decision to become real. The Magic Research Institute made it happen.<br>
Now everyone must work together to face the approaching evil.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306-05.htm">What should I do?</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Jack Sage:<br><br>
All you need to do is work harder on the things that you have done up to now. <font color="LEVEL">Train more, become stronger</font>, and stretch your limits! Soon a great danger will threaten the world. We are in dire need of talented adventurers who are prepared to fight! I recommend you take the Gift of Vitality and go hunting!<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Jack Sage:<br><br>
You are not qualified to receive the Memories of a Newbie. Can you see a newbie guide or adventurer guide next to me? Please receive the Newbie Support buffs from them. The Memories of a Newbie has the same effect as the Newbie Support buffs which you're receiving.<br>
(Only characters level 76 or more can receive the Memories of a Newbie.)<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Jack Sage:<br><br>
Hum. You don't have any summon, do you? Why do you covet a gift that is not intended for you? You can receive the Memories of a Newbie for summons only if you bring a summon.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Jack Sage:<br><br>
Look me straight in the eyes and answer me. Haven't you already received the Gift of Vitality? If you lie, I will break your neck.<br>
(The Gift of Vitality buff will disappear when switching sub-classes.)<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Jack Sage:<br><br>
May Eva's blessing accompany you on your journey.<br>
Good luck!<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Jack Sage:<br><br>
Your Vitality has been replenished to level 4 and will be maintained in that state for 2 hours! Go outside, defeat monsters, and return as an adventurer capable of protecting the world!<br>
(The Gift of Vitality buff will disappear when switching sub-classes.)<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Jack Sage:<br><br>
Greetings, brave adventurer of Aden!<br>
My name is Jack Sage from Eva's Temple. According to Eva's Oracle, <font color="LEVEL">the world is now facing a great danger</font>. So great, in fact, that in our current state we cannot cope with it. As a consequence, Eva's Temple and the Magic Research Institute have decided to provide an ancient magic, which had been sealed long ago, to every adventurer who wishes to improve their abilities. It is called the <font color="LEVEL">Gift of Vitality</font>. The Gift of Vitality <font color="LEVEL">fills the vitality up to level 4 and maintains that state for 2 hours!</font> We shall do our best to overcome the imminent danger.<br>
May Eva's blessing accompany you on your journey.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality vitality">Receive the Gift of Vitality.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306-02.htm">Ask about the Memories of a Newbie.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306-03.htm">Ask about the Memories of a Newbie for summons.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GiftOfVitality 4306-04.htm">What is the great danger you're talking about?</Button>
</body></html>

View File

@@ -0,0 +1,174 @@
/*
* 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.GiftOfVitality;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
/**
* Gift of Vitality event AI.
* @author Gnacik, Adry_85
*/
final class GiftOfVitality extends LongTimeEvent
{
// NPC
private static final int STEVE_SHYAGEL = 4306;
// Skills
private static final SkillHolder GIFT_OF_VITALITY = new SkillHolder(23179, 1);
private static final SkillHolder JOY_OF_VITALITY = new SkillHolder(23180, 1);
private static SkillHolder[] FIGHTER_SKILLS =
{
new SkillHolder(5627, 1), // Wind Walk
new SkillHolder(5628, 1), // Shield
new SkillHolder(5637, 1), // Magic Barrier
new SkillHolder(5629, 1), // Bless the Body
new SkillHolder(5630, 1), // Vampiric Rage
new SkillHolder(5631, 1), // Regeneration
new SkillHolder(5632, 1), // Haste
};
private static SkillHolder[] MAGE_SKILLS =
{
new SkillHolder(5627, 1), // Wind Walk
new SkillHolder(5628, 1), // Shield
new SkillHolder(5637, 1), // Magic Barrier
new SkillHolder(5633, 1), // Bless the Soul
new SkillHolder(5634, 1), // Acumen
new SkillHolder(5635, 1), // Concentration
new SkillHolder(5636, 1), // Empower
};
private static SkillHolder[] SERVITOR_SKILLS =
{
new SkillHolder(5627, 1), // Wind Walk
new SkillHolder(5628, 1), // Shield
new SkillHolder(5637, 1), // Magic Barrier
new SkillHolder(5629, 1), // Bless the Body
new SkillHolder(5633, 1), // Bless the Soul
new SkillHolder(5630, 1), // Vampiric Rage
new SkillHolder(5634, 1), // Acumen
new SkillHolder(5631, 1), // Regeneration
new SkillHolder(5635, 1), // Concentration
new SkillHolder(5632, 1), // Haste
new SkillHolder(5636, 1), // Empower
};
// Misc
private static final int HOURS = 5; // Reuse between buffs
private static final int MIN_LEVEL = 75;
private static final String REUSE = GiftOfVitality.class.getSimpleName() + "_reuse";
private GiftOfVitality()
{
super(GiftOfVitality.class.getSimpleName(), "events");
addStartNpc(STEVE_SHYAGEL);
addFirstTalkId(STEVE_SHYAGEL);
addTalkId(STEVE_SHYAGEL);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
switch (event)
{
case "vitality":
{
final long reuse = player.getVariables().getLong(REUSE, 0);
if (reuse > System.currentTimeMillis())
{
final long remainingTime = (reuse - System.currentTimeMillis()) / 1000;
final int hours = (int) (remainingTime / 3600);
final int minutes = (int) ((remainingTime % 3600) / 60);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
sm.addSkillName(23179);
sm.addInt(hours);
sm.addInt(minutes);
player.sendPacket(sm);
htmltext = "4306-notime.htm";
}
else
{
player.doCast(GIFT_OF_VITALITY.getSkill());
player.doSimultaneousCast(JOY_OF_VITALITY.getSkill());
player.getVariables().set(REUSE, System.currentTimeMillis() + (HOURS * 3600000));
htmltext = "4306-okvitality.htm";
}
break;
}
case "memories_player":
{
if (player.getLevel() <= MIN_LEVEL)
{
htmltext = "4306-nolevel.htm";
}
else
{
final SkillHolder[] skills = player.isMageClass() ? MAGE_SKILLS : FIGHTER_SKILLS;
npc.setTarget(player);
for (SkillHolder sk : skills)
{
npc.doCast(sk.getSkill());
}
htmltext = "4306-okbuff.htm";
}
break;
}
case "memories_summon":
{
if (player.getLevel() <= MIN_LEVEL)
{
htmltext = "4306-nolevel.htm";
}
else if (!player.hasServitors())
{
htmltext = "4306-nosummon.htm";
}
else
{
player.getServitors().values().forEach(s ->
{
npc.setTarget(s);
for (SkillHolder sk : SERVITOR_SKILLS)
{
npc.doCast(sk.getSkill());
}
});
htmltext = "4306-okbuff.htm";
}
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "4306.htm";
}
public static void main(String[] args)
{
new GiftOfVitality();
}
}

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Gift of Vitality" active="27 02 2008-28 02 2008" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<spawnlist>
<add npc="4306" x="87116" y="-141332" z="-1336" heading="52193" />
<add npc="4306" x="-13869" y="122063" z="-2984" heading="18270" />
<add npc="4306" x="17203" y="144949" z="-3024" heading="18166" />
<add npc="4306" x="82766" y="149438" z="-3464" heading="33865" />
<add npc="4306" x="-83161" y="150915" z="-3120" heading="17311" />
<add npc="4306" x="-84037" y="243194" z="-3728" heading="8992" />
<add npc="4306" x="45402" y="48355" z="-3056" heading="49153" />
<add npc="4306" x="12084" y="16576" z="-4584" heading="57345" />
<add npc="4306" x="82286" y="53291" z="-1488" heading="15250" />
<add npc="4306" x="147060" y="25943" z="-2008" heading="46171" />
<add npc="4306" x="116868" y="77309" z="-2688" heading="40353" />
<add npc="4306" x="-119690" y="44583" z="360" heading="29289" />
<add npc="4306" x="111164" y="221062" z="-3544" heading="2714" />
<add npc="4306" x="-44928" y="-113608" z="-192" heading="30212" />
<add npc="4306" x="115616" y="-177941" z="-896" heading="30708" />
<add npc="4306" x="148096" y="-55466" z="-2728" heading="40541" />
<add npc="4306" x="43521" y="-47542" z="-792" heading="31655" />
</spawnlist>
<messages>
<add type="onEnd" text="Gift of Vitality: Event end!" />
<add type="onEnter" text="Gift of Vitality: Event ongoing!" />
</messages>
</event>

View File

@@ -0,0 +1,7 @@
<html><body>Event Manager Roy the Cat:<br>
<font color="LEVEL">1 - Medals and Prizes</font><br>
Hunting the monsters that dwell outside the village will yield medals. Bring them to me and I'll reward you with a fabulous prize, personally selected for you by Collector Bashtal! You'll find two types of medals: Regular medals and glittering medals. Glittering medals are quite rare, and therefore most valuable, especially for your future.<br><br>
<font color="LEVEL">2 - Advancing Levels</font><br>
A collector's level reflects that player's contribution to the medal collection and collecting skill. Meow! Higher levels are eligible for a greater selection of prizes. Winnie over there can tell you more about raising your level.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31228.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Roy the Cat:<br>
These are the <font color="LEVEL">prizes</font> that were selected by my Lord Bashtal: <font color="LEVEL">Greater Haste Potion, Greater Swift Attack Potion, Greater Magic Haste Potion, Quick Healing Potion, Blessed Scroll of Escape, Blessed Scroll of Resurrection, Scroll: Enchant Armor (All Grades), Scroll: Enchant Weapon (All Grades), Red Party Mask, Soul Crystal (All Colors) - Stage 11, Soul Crystal (All Colors) - Stage 12, Sealed Majestic Necklace, Sealed Majestic Earring, and Sealed Majestic Ring</font>.<br>
You'll need to raise your collector level to be eligible for some of these items. If you wish to raise your level, go see Winnie the Cat!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31228.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager:<br>
Raise your level as a collector, newbie! You can exchange medals for more valuable prizes! Meeow!<br>
Here are the prizes you can choose from!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3122800">"I want to trade a medal for a prize."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Roy the Cat:<br>
A rabbit, eh? You still have a long way to go! Don't get discouraged, just raise your level!<br>
Here are the prizes you can choose from! Meow!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3122801">"I want to trade a medal for a prize."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Roy the Cat:<br>
Ah, a hyena! Meow! Very impressive! Thanks for all the medals! Meow!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3122802">"I want to trade a medal for a prize."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Roy the Cat:<br>
Ah, a fox, eh? Meow! Thanks for all the medals! Thank you!<br>
Here are the prizes you can choose from! Meow!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3122803">"I want to trade a medal for a prize."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Roy the Cat:<br>
Ah, a wolf, eh? It's been too long since I've had the pleasure of meeting a collector of your character!<br>
Here are the prizes you can choose from!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3122804">"I want to trade a medal for a prize."</Button>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Event Manager Roy the Cat:<br>
Meow! Greetings! I'm Roy the Cat!<br>
My master, the great collector Bashtal from the Bronze Key guild, has asked me and my friends to collect medals that were scattered throughout the world. The search has brought me to this village!<br>
I'm organizing an event I'm calling the <font color="LEVEL">Medal Collecting Event</font>! Anyone who brings medals will receive fabulous prizes! Meow!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal talk">"I want to trade medals for prizes."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31228-1.htm">"Tell me more about the event."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31228-2.htm">"What are the prizes?"</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Event Manager Winnie the Cat:<br>
<font color="LEVEL">1 - Medals and Prizes</font><br>
Hunting the monsters that dwell outside the village will yield medals. Bring them to me and I'll reward you with a fabulous prize, personally selected for you by Collector Bashtal!<br><br>
<font color="LEVEL">2 - Advancing Levels</font><br>
A collector's level reflects that player's contribution to the medal collection and collecting skill. You should raise your level as high as you can! Meow!! To raise your level, just bring me glittering medals and pass a simple test. Meow~!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31229.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Winnie the Cat:<br>
Here are the <font color="LEVEL">event prizes</font> that have been prepared by my Lord Bashtal: <font color="LEVEL">Greater Haste Potion, Greater Swift Attack Potion, Greater Magic Haste Potion, Quick Healing Potion, Blessed Scroll of Escape, Blessed Scroll of Resurrection, Scroll: Enchant Armor (All Grades), Scroll: Enchant Weapon (All Grades), Red Party Mask, Soul Crystal (All Colors) - Stage 11, Soul Crystal (All Colors) - Stage 12, Sealed Majestic Necklace, Sealed Majestic Earring, and Sealed Majestic Ring</font>. Whew! An impressive list, eh? Meow!<br>
I don't think I missed anything. Roy the Cat over there will trade medals for prizes. Meow~!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31229.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Event Manager Winnie the Cat:<br>
I'll toss a coin, and you call either heads or tails. Meow! <font color="LEVEL">When you guess correctly, I'll raise your level!!</font><br>
Now! Then... Fling! Whirl... whirl... whirl... slap!<br>
Meow~ What's it gonna be? Heads or tails?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal heads">"Heads!"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal tails">"Tails!"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Winnie the Cat:<br>
Heads, eh? Let's see...<br>
Sorry, you lose! It's tails! Bring more glittering medals and I'll play the game with you again!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Winnie the Cat:<br>
Heads? Let's see...<br>
Heads it is!!! Congratulations!<br>
<font color="LEVEL">Here is the token for rabbit!</font> Carry this mark with you to prove that you belong to the rabbit level. If you lose it, you won't be able to prove your level. Be careful with it!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Event Manager Winnie the Cat:<br>
You don't have enough glittering medals. Hmm, I thought you had enough... I suppose I was mistaken. Collect more glittering medals and bring them to me! Meow!!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Winnie the Cat:<br>
Heads? Let's see...<br>
Heads it is!!! Congratulations!<br>
<font color="LEVEL">Here is the token for hyena!</font> Carry this mark with you to prove that you belong to the hyena level. If you lose it, you won't be able to prove your level. Be careful with it!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Winnie the Cat:<br>
Heads? Let's see...<br>
Heads it is!!! Congratulations!<br>
<font color="LEVEL">Here is the token for fox!</font> Carry this mark with you to prove that you belong to the fox level. If you lose it, you won't be able to prove your level. Be careful with it!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Event Manager Winnie the Cat:<br>
Heads? Let's see...<br>
Heads it is!!! Congratulations!<br>
<font color="LEVEL">Here is the token for wolf!</font> Carry this mark with you to prove that you belong to the wolf level. If you lose it, you won't be able to prove your level. Be careful with it!
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Event Manager Winnie the Cat:<br>
A <font color="LEVEL">no level collector</font>, eh?<br>
<font color="LEVEL">If you'd like to try to raise your level, give me 5 glittering medals and I'll play a game with you! Meow!</font> If you lose, you can always try again!<br>
The game will help you develop the qualities you'll need as a collector. Meow! Your abilities are evaluated by the number of glittering medals you collect and your luck is tested by the number of times you win the game.<br>
You can play as long as you have glittering medals! Meow!! Would you like to give it a try?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Event Manager Winnie the Cat:<br>
Ah, a <font color="LEVEL">rabbit</font>, eh?<br>
<font color="LEVEL">To raise your level to hyena, pay me 10 glittering medals and I'll play a game with you! </font>Meow!<br>
The game is a test of both your luck and skill, the two essential qualities of a collector. Meow! Your abilities are evaluated by the number of glittering medals you collect, and your luck is tested by how often you win the game.<br>
If you lose, pay 10 more glittering medals and try again! You'll eventually win. Meow!! Would you like to give it a try?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Event Manager Winnie the Cat:<br>
Ah, a <font color="LEVEL">hyena</font>, eh? I know you've been working hard, so I'll keep the explanation brief.<br>
<font color="LEVEL">If you wish to become a fox level collector, pay me 20 glittering medals and I'll play a game with you! Meow!</font> You can play as many times as you want, as long as you have enough glittering medals<br>
This game tests your ablities as well as your luck. Meow! Your abilities are evaluated by the number of glittering medals you collect and your luck is tested by the number of times you win the game!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Event Manager Winnie the Cat:<br>
Wow! <font color="LEVEL">Are you really a fox level collector?</font> Meow! I wouldn't have known at first glance, but now that I get a closer look at you, I can see it in your eyes! I'm sure your'e already familiar with the game, so I'll keep the explanation brief...<br>
<font color="LEVEL">If you wish to become a wolf level collector, pay me 40 glittering medals and I'll play a game with you! Meow!</font> You can play as many times as you want, as long as you have enough glittering medals.<br>
The game tests both your abilities and your luck, the two essential qualities of a collector! Meow!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Event Manager Winnie the Cat:<br>
<font color="LEVEL">Wow, a wolf?!</font> I can't remember the last time I met a wolf level collector! You've reached the highest level possible! Great job! Meow!!!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Event Manager Winnie the Cat:<br>
You don't have enough glittering medals to play the coin-toss game. Collect some more medals and come back. Meow!!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Winnie the Cat:<br>
Tails? Let's see...<br>
Sorry, you lose! Go collect more glittering medals and try again. Meow!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Winnie the Cat:<br>
Tails? Let's see...<br>
Tails it is! Congratulations, you've reached <font color="LEVEL">rabbit level</font>! Keep this mark with you to prove it.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Event Manager Winnie the Cat:<br>
You don't have enough glittering medals. Hmm, I thought you had enough... I suppose I was mistaken. Collect more glittering medals and bring them to me! Meow!!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Winnie the Cat:<br>
Tails? Let me see...<br>
Tails it is! Congratulations, you've reached <font color="LEVEL">hyena level</font>! Keep this mark with you to prove it.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Winnie the Cat:<br>
Tails? Let's see...<br>
Tails it is! Congratulations, you've reached <font color="LEVEL">fox level</font>! Keep this mark with you to prove it.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Event Manager Winnie the Cat:<br>
Tails? Let's see...<br>
Tails it is! Congratulations, you've reached <font color="LEVEL">wolf level</font>! Keep this mark with you to prove it.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Event Manager Winnie the Cat:<br>
Meow! Greetings! I'm Winnie the Cat!<br>
Our master, Collector Bashtal, formerly of the Bronze Key guild, has asked us to collect medals that were scattered throughout the world. We've come to this village as his personal emmissaries!<br>
We're organizing a <font color="LEVEL">Medal Collecting Event</font>! Would you like to participate? Collect medals and take them to Roy the Cat over there!<br>
There's so much to do, but I need a nap!! Meow!!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal talk">"I want to raise my level."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31229-1.htm">"Tell me more about the event."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HeavyMedal 31229-2.htm">"What are the prizes?"</Button>
</body></html>

View File

@@ -0,0 +1,142 @@
/*
* 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.HeavyMedal;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
/**
* Heavy Medals event AI.
* @author Gnacik
*/
final class HeavyMedal extends LongTimeEvent
{
private static final int CAT_ROY = 31228;
private static final int CAT_WINNIE = 31229;
private static final int GLITTERING_MEDAL = 6393;
private static final int WIN_CHANCE = 50;
private static final int[] MEDALS =
{
5,
10,
20,
40
};
private static final int[] BADGES =
{
6399,
6400,
6401,
6402
};
private HeavyMedal()
{
super(HeavyMedal.class.getSimpleName(), "events");
addStartNpc(CAT_ROY);
addStartNpc(CAT_WINNIE);
addTalkId(CAT_ROY);
addTalkId(CAT_WINNIE);
addFirstTalkId(CAT_ROY);
addFirstTalkId(CAT_WINNIE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
int level = checkLevel(player);
if (event.equalsIgnoreCase("game"))
{
htmltext = getQuestItemsCount(player, GLITTERING_MEDAL) < MEDALS[level] ? "31229-no.htm" : "31229-game.htm";
}
else if (event.equalsIgnoreCase("heads") || event.equalsIgnoreCase("tails"))
{
if (getQuestItemsCount(player, GLITTERING_MEDAL) < MEDALS[level])
{
htmltext = "31229-" + event.toLowerCase() + "-10.htm";
}
else
{
takeItems(player, GLITTERING_MEDAL, MEDALS[level]);
if (getRandom(100) > WIN_CHANCE)
{
level = 0;
}
else
{
if (level > 0)
{
takeItems(player, BADGES[level - 1], -1);
}
giveItems(player, BADGES[level], 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
level++;
}
htmltext = "31229-" + event.toLowerCase() + "-" + String.valueOf(level) + ".htm";
}
}
else if (event.equalsIgnoreCase("talk"))
{
htmltext = String.valueOf(npc.getId()) + "-lvl-" + String.valueOf(level) + ".htm";
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (player.getQuestState(getName()) == null)
{
newQuestState(player);
}
return npc.getId() + ".htm";
}
public int checkLevel(L2PcInstance player)
{
int _lev = 0;
if (hasQuestItems(player, 6402))
{
_lev = 4;
}
else if (hasQuestItems(player, 6401))
{
_lev = 3;
}
else if (hasQuestItems(player, 6400))
{
_lev = 2;
}
else if (hasQuestItems(player, 6399))
{
_lev = 1;
}
return _lev;
}
public static void main(String[] args)
{
new HeavyMedal();
}
}

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Heavy Medal" active="27 02 2007-28 02 2007" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="6392" min="1" max="1" chance="45%" /> <!-- Event - Medal -->
<add item="6393" min="1" max="1" chance="5%" /> <!-- Event - Glittering Medal -->
</droplist>
<spawnlist>
<!-- Roy -->
<add npc="31228" x="-44337" y="-113669" z="-224" heading="0" />
<add npc="31228" x="-44628" y="-115409" z="-240" heading="22500" />
<add npc="31228" x="-13073" y="122801" z="-3117" heading="0" />
<add npc="31228" x="-13949" y="121934" z="-2988" heading="32768" />
<add npc="31228" x="-14786" y="123686" z="-3117" heading="8192" />
<add npc="31228" x="11281" y="15652" z="-4584" heading="25000" />
<add npc="31228" x="11303" y="17732" z="-4574" heading="57344" />
<add npc="31228" x="18178" y="145149" z="-3054" heading="7400" />
<add npc="31228" x="19208" y="144380" z="-3097" heading="32768" />
<add npc="31228" x="19508" y="145775" z="-3086" heading="48000" />
<add npc="31228" x="17396" y="170259" z="-3507" heading="36000" />
<add npc="31228" x="47151" y="49436" z="-3059" heading="32000" />
<add npc="31228" x="44122" y="50784" z="-3059" heading="57344" />
<add npc="31228" x="79806" y="55570" z="-1560" heading="0" />
<add npc="31228" x="83328" y="55824" z="-1525" heading="32768" />
<add npc="31228" x="80986" y="54504" z="-1525" heading="32768" />
<add npc="31228" x="83332" y="149160" z="-3405" heading="49152" />
<add npc="31228" x="82277" y="148598" z="-3467" heading="0" />
<add npc="31228" x="81621" y="148725" z="-3467" heading="32768" />
<add npc="31228" x="81680" y="145656" z="-3467" heading="32768" />
<add npc="31228" x="114733" y="-178691" z="-821" heading="0" />
<add npc="31228" x="115708" y="-182362" z="-1449" heading="0" />
<add npc="31228" x="-80789" y="151073" z="-3043" heading="28672" />
<add npc="31228" x="-84049" y="150176" z="-3129" heading="4096" />
<add npc="31228" x="-82623" y="151666" z="-3129" heading="49152" />
<add npc="31228" x="117498" y="76630" z="-2695" heading="38000" />
<add npc="31228" x="115914" y="76449" z="-2711" heading="59000" />
<add npc="31228" x="119536" y="76988" z="-2275" heading="40960" />
<add npc="31228" x="-84516" y="242971" z="-3730" heading="34000" />
<add npc="31228" x="-86003" y="243205" z="-3730" heading="60000" />
<add npc="31228" x="147184" y="27405" z="-2192" heading="17000" />
<add npc="31228" x="147920" y="25664" z="-2000" heading="16384" />
<add npc="31228" x="111776" y="221104" z="-3543" heading="16384" />
<add npc="31228" x="107904" y="218096" z="-3675" heading="0" />
<add npc="31228" x="114920" y="220020" z="-3632" heading="32768" />
<add npc="31228" x="147888" y="-58048" z="-2979" heading="49000" />
<add npc="31228" x="147262" y="-56450" z="-2776" heading="33000" />
<add npc="31228" x="44176" y="-48732" z="-800" heading="33000" />
<add npc="31228" x="44319" y="-47640" z="-792" heading="50000" />
<!-- Winnie -->
<add npc="31229" x="-44342" y="-113726" z="-240" heading="0" />
<add npc="31229" x="-44671" y="-115437" z="-240" heading="22500" />
<add npc="31229" x="-13073" y="122841" z="-3117" heading="0" />
<add npc="31229" x="-13972" y="121893" z="-2988" heading="32768" />
<add npc="31229" x="-14843" y="123710" z="-3117" heading="8192" />
<add npc="31229" x="11327" y="15682" z="-4584" heading="25000" />
<add npc="31229" x="11243" y="17712" z="-4574" heading="57344" />
<add npc="31229" x="18154" y="145192" z="-3054" heading="7400" />
<add npc="31229" x="19214" y="144327" z="-3097" heading="32768" />
<add npc="31229" x="19459" y="145775" z="-3086" heading="48000" />
<add npc="31229" x="17418" y="170217" z="-3507" heading="36000" />
<add npc="31229" x="47146" y="49382" z="-3059" heading="32000" />
<add npc="31229" x="44157" y="50827" z="-3059" heading="57344" />
<add npc="31229" x="79798" y="55629" z="-1560" heading="0" />
<add npc="31229" x="83328" y="55769" z="-1525" heading="32768" />
<add npc="31229" x="80986" y="54452" z="-1525" heading="32768" />
<add npc="31229" x="83329" y="149095" z="-3405" heading="49152" />
<add npc="31229" x="82277" y="148564" z="-3467" heading="0" />
<add npc="31229" x="81620" y="148689" z="-3464" heading="32768" />
<add npc="31229" x="81691" y="145610" z="-3467" heading="32768" />
<add npc="31229" x="114719" y="-178742" z="-821" heading="0" />
<add npc="31229" x="115708" y="-182422" z="-1449" heading="0" />
<add npc="31229" x="-80731" y="151152" z="-3043" heading="28672" />
<add npc="31229" x="-84097" y="150171" z="-3129" heading="4096" />
<add npc="31229" x="-82678" y="151666" z="-3129" heading="49152" />
<add npc="31229" x="117459" y="76664" z="-2695" heading="38000" />
<add npc="31229" x="115936" y="76488" z="-2711" heading="59000" />
<add npc="31229" x="119576" y="76940" z="-2275" heading="40960" />
<add npc="31229" x="-84516" y="243015" z="-3730" heading="34000" />
<add npc="31229" x="-86031" y="243153" z="-3730" heading="60000" />
<add npc="31229" x="147124" y="27401" z="-2192" heading="40960" />
<add npc="31229" x="147985" y="25664" z="-2000" heading="16384" />
<add npc="31229" x="111724" y="221111" z="-3543" heading="16384" />
<add npc="31229" x="107899" y="218149" z="-3675" heading="0" />
<add npc="31229" x="114920" y="220080" z="-3632" heading="32768" />
<add npc="31229" x="147924" y="-58052" z="-2979" heading="49000" />
<add npc="31229" x="147285" y="-56461" z="-2776" heading="33000" />
<add npc="31229" x="44176" y="-48688" z="-800" heading="33000" />
<add npc="31229" x="44294" y="-47642" z="-792" heading="50000" />
</spawnlist>
<messages>
<add type="onEnd" text="Heavy Medal: Event end!" />
<add type="onEnter" text="Heavy Medal Event: Collect Medals and trade them for prizes at Event Cats in every town! Hurry up, since the event will end at Feb 28th!" />
</messages>
</event>

View File

@@ -0,0 +1,18 @@
<html><body>Noelle:<br>
I said Noelle won't make you labor for free. My fairies are extremly powerful!<br>
<font color="LEVEL">Stocking Fairy's Blessing</font><br1>
STR +3, INT +3, Speed +7<br>
<font color="LEVEL">Tree Fairy's Blessing</font><br1>
CON +3, MEN +3, +30 P. Critical Rate, +30 M. Critical Rate<br>
<font color="LEVEL">Snowman Fairy's Blessing</font><br1>
DEX +3, WIT +3, Max HP/MP +2013<br>
What do you think? Aren't my fairies amazing? Which one will you take with you?<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HuntForSanta receiveBuffStocking">"I'll take the Stocking Fairy's Blessing."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HuntForSanta receiveBuffTree">"I'll take the Tree Fairy's Blessing."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HuntForSanta receiveBuffSnowman">"I'll take the Snowman Fairy's Blessing."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HuntForSanta receiveBuffAll">"I like all three of them."</Button><br1>
Requirements: Must be a party leader of a party with 3 races or more, or a party of 7.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HuntForSanta changeBuff">"I want to take a different Fairy's Blessing."</Button><br1>
(Note: All of your Blessed Buffs will be deleted.)<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Noelle:<br>
The spirits will find Santa in 2 hours. Find Santa bring back Santa's Marks to me and I'll give you a small gift.<br>
(You can receive your reward after 2 hours. You cannot receive your reward if you die or you don't have space in your inventory.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Noelle:<br>
Look. If you want to take all three spirits, you need 3 or more races, or 7 members in your party and have the party leader come talk to me.<br>
Or. If you want to take a different one, click on the button that says <font color="LEVEL">I want a different Fairy's Blessing</font>.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Noelle:<br>
You need 3 or more races, or 7 members in your party and have the party leader come talk to me.
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Noelle:<br>
Hey, You! Have you seen an old fatso wearing a red hat turned inside out with a white beard that billows about like a cloud?<br>
He left in the middle of our busiest season! How dare he leave all this work behind and run away like that? It's completely unacceptable!<br>
Look here, noble warrior, I mean warrior, sir, er... ma'am, er...? Look here! You seem to have a lot of time, so how about a little help? Don't worry. I can pay!<br>
My cute Stocking Fairy, Tree Fairy, and Snowman Fairy are experts at finding the old man. Just bring one of them around, and it will be a cinch!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HuntForSanta 34008-1.htm">"I'll take..."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3400801">"I have a Santa's Mark."</Button>
</body></html>

View File

@@ -0,0 +1,153 @@
/*
* 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.HuntForSanta;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
import com.l2jmobius.gameserver.util.Util;
/**
* The Hunt for Santa Begins!<br>
* Info - http://www.lineage2.com/en/news/events/hunt-for-santa.php
* @author Mobius
*/
final class HuntForSanta extends LongTimeEvent
{
// NPC
private static final int NOELLE = 34008;
// Skills
private static final SkillHolder BUFF_STOCKING = new SkillHolder(16419, 1);
private static final SkillHolder BUFF_TREE = new SkillHolder(16420, 1);
private static final SkillHolder BUFF_SNOWMAN = new SkillHolder(16421, 1);
private HuntForSanta()
{
super(HuntForSanta.class.getSimpleName(), "events");
addStartNpc(NOELLE);
addFirstTalkId(NOELLE);
addTalkId(NOELLE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "34008.htm":
case "34008-1.htm":
{
htmltext = event;
break;
}
case "receiveBuffStocking":
{
htmltext = applyBuff(npc, player, BUFF_STOCKING.getSkill());
break;
}
case "receiveBuffTree":
{
htmltext = applyBuff(npc, player, BUFF_TREE.getSkill());
break;
}
case "receiveBuffSnowman":
{
htmltext = applyBuff(npc, player, BUFF_SNOWMAN.getSkill());
break;
}
case "receiveBuffAll":
{
htmltext = applyAllBuffs(npc, player);
break;
}
case "changeBuff":
{
removeBuffs(player);
htmltext = "34008-1.htm";
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "34008.htm";
}
private String applyBuff(L2Npc npc, L2PcInstance player, Skill skill)
{
removeBuffs(player);
npc.broadcastPacket(new MagicSkillUse(npc, player, skill.getId(), 1, 0, 0));
skill.applyEffects(npc, player);
return "34008-2.htm";
}
private String applyAllBuffs(L2Npc npc, L2PcInstance player)
{
if ((player.getParty() != null) && (player.getParty().getLeader() == player) && ((player.getParty().getMemberCount() > 6) || (player.getParty().getRaceCount() > 2)))
{
for (L2PcInstance member : player.getParty().getMembers())
{
if (Util.calculateDistance(npc, member, false, false) < 500)
{
removeBuffs(member);
npc.broadcastPacket(new MagicSkillUse(npc, member, BUFF_STOCKING.getSkillId(), 1, 0, 0));
BUFF_STOCKING.getSkill().applyEffects(npc, member);
BUFF_TREE.getSkill().applyEffects(npc, member);
BUFF_SNOWMAN.getSkill().applyEffects(npc, member);
}
}
return "34008-2.htm";
}
else if (player.getParty() == null)
{
return "34008-3.htm";
}
return "34008-4.htm";
}
private void removeBuffs(L2PcInstance player)
{
final BuffInfo buffStocking = player.getEffectList().getBuffInfoBySkillId(BUFF_STOCKING.getSkillId());
final BuffInfo buffTree = player.getEffectList().getBuffInfoBySkillId(BUFF_TREE.getSkillId());
final BuffInfo buffSnowman = player.getEffectList().getBuffInfoBySkillId(BUFF_SNOWMAN.getSkillId());
if (buffStocking != null)
{
player.getEffectList().remove(true, buffStocking);
}
if (buffTree != null)
{
player.getEffectList().remove(true, buffTree);
}
if (buffSnowman != null)
{
player.getEffectList().remove(true, buffSnowman);
}
}
public static void main(String[] args)
{
new HuntForSanta();
}
}

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Hunt for Santa" active="10 12 1014-07 01 2015" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<spawnlist>
<!-- Noelle -->
<add npc="34008" x="-78920" y="248056" z="-3296" heading="0" /> <!-- Faeron -->
<add npc="34008" x="-115016" y="256248" z="-1520" heading="0" /> <!-- Talking Island -->
<add npc="34008" x="208328" y="87656" z="-1024" heading="24575" /> <!-- Arcan -->
<add npc="34008" x="80968" y="148168" z="-3472" heading="0" /> <!-- Giran -->
<add npc="34008" x="146840" y="26904" z="-2208" heading="11547" /> <!-- Aden -->
<add npc="34008" x="147464" y="-56984" z="-2784" heading="11547" /> <!-- Goddard -->
<add npc="34008" x="44584" y="-48216" z="-792" heading="27931" /> <!-- Rune -->
<add npc="34008" x="82696" y="53944" z="-1488" heading="40959" /> <!-- Oren -->
<add npc="34008" x="87592" y="-141720" z="-1344" heading="44315" /> <!-- Schuttgart -->
<add npc="34008" x="112072" y="219960" z="-3664" heading="24575" /> <!-- Heine -->
<add npc="34008" x="16552" y="142948" z="-2720" heading="24575" /> <!-- Dion -->
<add npc="34008" x="-14088" y="122680" z="-3120" heading="32767" /> <!-- Gludio -->
<add npc="34008" x="-80536" y="149960" z="-3040" heading="29412" /> <!-- Gludin -->
<!-- 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="146968" y="26728" z="-2208" 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 -->
</spawnlist>
<messages>
<add type="onEnd" text="Hunt for Santa: Event end!" />
<add type="onEnter" text="Hunt for Santa: Event ongoing!" />
</messages>
</event>

View File

@@ -0,0 +1,9 @@
<html><body>Angel Cat:<br>
Traveler, are you interested in collecting letters?<br>
Collect letters to create <font color="LEVEL">LINEAGE II</font>, <font color="LEVEL">TOGETHER</font>, or <font color="LEVEL">NCSOFT</font>, and bring them to me! I'll give you a gift!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LetterCollector 33873-2.htm">"Tell me about the Letter Collecter Event."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LetterCollector lineage">"I've collected 'LINEAGE II.'"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LetterCollector together">"I've collected 'TOGETHER.'"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LetterCollector ncsoft">"I've collected 'NCSOFT.'"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2042">"I'd like a Letter Collector's Lucky Pouch."</Button>
</body></html>

View File

@@ -0,0 +1,12 @@
<html><body>Angel Cat:<br>
<font color="LEVEL">So, here's the gist:</font><br>
If you hunt monsters in the Lineage II world, you have a chance of obtaining letter-engraved items. If you collect these letters and bring them to me, I will give you a gift depending on the combination.<br>There are a total of 14 letters, and they are:<br>
<font color="LEVEL">A</font>, <font color="LEVEL">C</font>, <font color="LEVEL">E</font>, <font color="LEVEL">F</font>, <font color="LEVEL">G</font>, <font color="LEVEL">I</font>, <font color="LEVEL">L</font>, <font color="LEVEL">N</font>, <font color="LEVEL">O</font>, <font color="LEVEL">S</font>, <font color="LEVEL">T</font>, <font color="LEVEL">II</font>, <font color="LEVEL">R</font>, and <font color="LEVEL">H</font>.
<br>
<br>
<br>
<br>Combine the letters and numbers to create <font color="LEVEL">LINEAGE II</font>, <font color="LEVEL">TOGETHER</font>, or <font color="LEVEL">NCSOFT</font>.
<br>
When you collect repeat letters, you can exchange them for <font color="LEVEL">Letter Collector's Lucky Pouch</font>. From the pouch, you can get <font color="LEVEL">Letter Collector's Pouch: RIIS</font>, from which you'll have a chance to get the letters R, II, or S.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest LetterCollector 33873-1.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,272 @@
/*
* 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.LetterCollector;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
/**
* Event: Letter Collector
* @URL http://www.lineage2.com/en/news/events/letter-collector-event-05112016.php
* @author Gigi
*/
final class LetterCollector extends LongTimeEvent
{
// NPC
private static final int ANGEL_CAT = 33873;
// Items
private static final int A = 3875;
private static final int C = 3876;
private static final int E = 3877;
private static final int F = 3878;
private static final int G = 3879;
private static final int H = 3880;
private static final int I = 3881;
private static final int L = 3882;
private static final int N = 3883;
private static final int O = 3884;
private static final int R = 3885;
private static final int S = 3886;
private static final int T = 3887;
private static final int II = 3888;
// Rewards Together
private static final int DARK_AMARANTHINE_ENHANCEMENT_STONE = 3875;
private static final int TAUTI_DUAL_AXE = 35001;
private static final int TAUTI_ONE_HEADED_AXE = 34998;
private static final int KELBIM_BOW = 46062;
private static final int KELBIM_DUAL_DAGER = 46061;
private static final int KELBIM_DAGER = 46060;
private static final int KELBIM_CROSSBOW = 46063;
private static final int KELBIM_ATELIA_FRAGMENT = 46079;
private static final int BLESSED_SPECTER_THROWER = 18041;
private static final int BLESSED_SPECTER_STORMER = 18040;
private static final int BLESSED_SPECTER_RETRIBUTER = 18045;
private static final int BLESSED_SPECTER_BUSTER = 18043;
private static final int BLESSED_SPECTER_DUALSWORD = 18046;
private static final int BLESSED_SPECTER_FIGHTER = 18039;
private static final int BLESSED_SPECTER_CASTER = 18044;
private static final int BLESSED_SPECTER_DUAL_DAGGER = 18047;
private static final int BLESSED_SPECTER_SLASHER = 18037;
private static final int BLESSED_SPECTER_CUTTER = 18036;
private static final int BLESSED_SPECTER_SHAPER = 18035;
private static final int BLESSED_SPECTER_AVANGER = 18038;
private static final int BLESSED_SPECTER_DUAL_BLUNT = 18048;
private static final int BLESSED_SPECTER_SHOOTER = 18042;
private static final int DARK_ETERNAL_ENHACEMENT_STONE = 35567;
private static final int BLESSED_SERAPH_BREASTPLATE = 18050;
private static final int BLESSED_SERAPH_LEATHER_ARMOR = 18056;
private static final int BLESSED_SERAPH_TUNIC = 18061;
private static final int BLESSED_SERAPH_LEATHER_LEGGINGS = 18057;
private static final int HIGH_GRADE_WIND_DEY_PACK = 39562;
private static final int BLESSED_SERAPH_STOCKINGS = 18062;
private static final int LV_5_LEGENDERY_DEY_PACK = 34954;
private static final int BLESSED_SERAPH_SHOES = 18064;
private static final int BLESSED_SERAPH_HELMET = 18049;
private static final int BLESSED_SERAPH_GAITERS = 18051;
private static final int BLESSED_SERAPH_LEATHER_HELMET = 18055;
private static final int BLESSED_SERAPH_CIRCLET = 18060;
private static final int BLESSED_SERAPH_GUANTLETS = 18052;
private static final int BLESSED_SERAPH_LEATHER_GLOVES = 18058;
private static final int LV_5_ANCIENT_DEY_PACK = 34955;
private static final int BLESSED_SERAPH_LEATHER_BOOTS = 18059;
private static final int BLESSED_SERAPH_BOOTS = 18053;
private static final int BLESSED_SERAPH_GLOVES = 18063;
private static final int LV_5_GIANT_DEY_PACK = 34953;
private static final int BLESSED_SERAPH_SIGIL = 18065;
private static final int BLESSED_SERAPH_SHIELD = 18054;
private static final int DARK_ETERNAL_ENHACEMENT_STONE_FRAGMENT = 37802;
private static final int TOP_GRADE_SPIRIT_STONE = 45932;
private static final int MID_GRADE_WIND_DYE_PACK = 39561;
private static final int LV_4_LEGENDERY_DEY_PACK = 34951;
private static final int FORTUNE_POKET_STAGE_5 = 39633;
private static final int LEONAS_SCROLL_10000000_SP = 38103;
private static final int LOW_GRADE_WIND_DYE_PACK = 39560;
private static final int LV_4_ANCIENT_DEY_PACK = 34952;
private static final int LV_3_LEGENDERY_DEY_PACK = 34946;
private static final int HIGH_GRADE_SPIRIT_STONE = 45931;
private static final int LEONAS_SCROLL_5000000_SP = 38102;
private static final int LV_4_GIANT_DEY_PACK = 34950;
private static final int MID_GRADE_SPIRIT_STONE = 45930;
private static final int SPIRIT_STONE_HAIR_ACCESSORY = 45937;
private static final int LV_3_ANCIENT_DEY_PACK = 34947;
private static final int LV_3_GIANT_DEY_PACK = 34945;
private static final int LEONAS_SCROLL_1000000_SP = 38101;
private static final int GAMESTONE_R_GRADE = 19440;
private static final int BLUEBERRY_CAKE = 37009;
private static final int SPIRIT_STONE = 45929;
private static final int BLESSED_SPIRITSHOT_R_GEADE = 19442;
private static final int SOULSHOT_R_GEADE = 17754;
private static final int CRYSTAL_R_GEADE = 17371;
private LetterCollector()
{
super(LetterCollector.class.getSimpleName(), "events");
addStartNpc(ANGEL_CAT);
addFirstTalkId(ANGEL_CAT);
addTalkId(ANGEL_CAT);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "33873-1.htm":
case "33873-2.htm":
{
htmltext = event;
break;
}
case "lineage":
{
if ((getQuestItemsCount(player, L) >= 1) && (getQuestItemsCount(player, I) >= 1) && (getQuestItemsCount(player, N) >= 1) && (getQuestItemsCount(player, E) >= 2) && (getQuestItemsCount(player, A) >= 1) && (getQuestItemsCount(player, G) >= 1) && (getQuestItemsCount(player, II) >= 1))
{
takeItems(player, L, 1);
takeItems(player, I, 1);
takeItems(player, N, 1);
takeItems(player, E, 2);
takeItems(player, A, 1);
takeItems(player, G, 1);
takeItems(player, II, 1);
htmltext = "33873-1.htm";
}
else
{
htmltext = "noItem.htm";
}
break;
}
case "together":
{
if ((getQuestItemsCount(player, T) >= 2) && (getQuestItemsCount(player, O) >= 1) && (getQuestItemsCount(player, G) >= 1) && (getQuestItemsCount(player, E) >= 2) && (getQuestItemsCount(player, H) >= 1) && (getQuestItemsCount(player, R) >= 1))
{
takeItems(player, T, 2);
takeItems(player, O, 1);
takeItems(player, G, 1);
takeItems(player, E, 2);
takeItems(player, H, 1);
takeItems(player, R, 1);
giveItemRandomly(player, null, DARK_AMARANTHINE_ENHANCEMENT_STONE, 1, 1, 0.07, false);
giveItemRandomly(player, null, TAUTI_DUAL_AXE, 1, 1, 0.01, false);
giveItemRandomly(player, null, TAUTI_ONE_HEADED_AXE, 1, 1, 0.01, false);
giveItemRandomly(player, null, KELBIM_BOW, 1, 1, 0.01, false);
giveItemRandomly(player, null, KELBIM_DUAL_DAGER, 1, 1, 0.01, false);
giveItemRandomly(player, null, KELBIM_DAGER, 1, 1, 0.01, false);
giveItemRandomly(player, null, KELBIM_CROSSBOW, 1, 1, 0.01, false);
giveItemRandomly(player, null, KELBIM_ATELIA_FRAGMENT, 1, 1, 0.05, false);
giveItemRandomly(player, null, BLESSED_SPECTER_THROWER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_STORMER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_RETRIBUTER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_BUSTER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_DUALSWORD, 1, 1, 0.015, false);
giveItemRandomly(player, null, BLESSED_SPECTER_FIGHTER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_CASTER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_DUAL_DAGGER, 1, 1, 0.015, false);
giveItemRandomly(player, null, BLESSED_SPECTER_SLASHER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_CUTTER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_SHAPER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_AVANGER, 1, 1, 0.02, false);
giveItemRandomly(player, null, BLESSED_SPECTER_DUAL_BLUNT, 1, 1, 0.015, false);
giveItemRandomly(player, null, BLESSED_SPECTER_SHOOTER, 1, 1, 0.02, false);
giveItemRandomly(player, null, DARK_ETERNAL_ENHACEMENT_STONE, 1, 1, 0.25, false);
giveItemRandomly(player, null, BLESSED_SERAPH_BREASTPLATE, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_LEATHER_ARMOR, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_TUNIC, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_LEATHER_LEGGINGS, 1, 1, 0.025, false);
giveItemRandomly(player, null, HIGH_GRADE_WIND_DEY_PACK, 1, 1, 0.3, false);
giveItemRandomly(player, null, BLESSED_SERAPH_STOCKINGS, 1, 1, 0.025, false);
giveItemRandomly(player, null, LV_5_LEGENDERY_DEY_PACK, 1, 1, 0.1, false);
giveItemRandomly(player, null, BLESSED_SERAPH_SHOES, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_HELMET, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_GAITERS, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_LEATHER_HELMET, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_CIRCLET, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_GUANTLETS, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_LEATHER_GLOVES, 1, 1, 0.025, false);
giveItemRandomly(player, null, LV_5_ANCIENT_DEY_PACK, 1, 1, 0.15, false);
giveItemRandomly(player, null, BLESSED_SERAPH_LEATHER_BOOTS, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_BOOTS, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_GLOVES, 1, 1, 0.025, false);
giveItemRandomly(player, null, LV_5_GIANT_DEY_PACK, 1, 1, 0.15, false);
giveItemRandomly(player, null, BLESSED_SERAPH_SIGIL, 1, 1, 0.025, false);
giveItemRandomly(player, null, BLESSED_SERAPH_SHIELD, 1, 1, 0.025, false);
giveItemRandomly(player, null, DARK_ETERNAL_ENHACEMENT_STONE_FRAGMENT, 1, 1, 0.55, false);
giveItemRandomly(player, null, TOP_GRADE_SPIRIT_STONE, 1, 1, 0.06, false);
giveItemRandomly(player, null, MID_GRADE_WIND_DYE_PACK, 1, 1, 0.3, false);
giveItemRandomly(player, null, LV_4_LEGENDERY_DEY_PACK, 1, 1, 0.2, false);
giveItemRandomly(player, null, FORTUNE_POKET_STAGE_5, 1, 1, 0.32, false);
giveItemRandomly(player, null, LEONAS_SCROLL_10000000_SP, 1, 1, 0.25, false);
giveItemRandomly(player, null, LOW_GRADE_WIND_DYE_PACK, 1, 1, 0.38, false);
giveItemRandomly(player, null, LV_4_ANCIENT_DEY_PACK, 1, 1, 0.24, false);
giveItemRandomly(player, null, LV_3_LEGENDERY_DEY_PACK, 1, 1, 0.25, false);
giveItemRandomly(player, null, HIGH_GRADE_SPIRIT_STONE, 1, 1, 0.08, false);
giveItemRandomly(player, null, LV_4_GIANT_DEY_PACK, 1, 1, 0.2, false);
giveItemRandomly(player, null, MID_GRADE_SPIRIT_STONE, 1, 1, 0.1, false);
giveItemRandomly(player, null, SPIRIT_STONE_HAIR_ACCESSORY, 1, 1, 0.1, false);
giveItemRandomly(player, null, LV_3_ANCIENT_DEY_PACK, 1, 1, 0.26, false);
giveItemRandomly(player, null, LEONAS_SCROLL_5000000_SP, 1, 1, 0.3, false);
giveItemRandomly(player, null, LV_3_GIANT_DEY_PACK, 1, 1, 0.25, false);
giveItemRandomly(player, null, LEONAS_SCROLL_1000000_SP, 1, 1, 0.35, false);
giveItemRandomly(player, null, GAMESTONE_R_GRADE, 1, 1, 0.8, false);
giveItemRandomly(player, null, BLUEBERRY_CAKE, 3, 3, 0.3, false);
giveItemRandomly(player, null, SPIRIT_STONE, 1, 1, 0.15, false);
giveItemRandomly(player, null, BLESSED_SPIRITSHOT_R_GEADE, 500, 500, 0.7, false);
giveItemRandomly(player, null, SOULSHOT_R_GEADE, 2000, 2000, 0.8, false);
giveItemRandomly(player, null, CRYSTAL_R_GEADE, 20, 20, 0.14, false);
htmltext = "33873-1.htm";
}
else
{
htmltext = "noItem.htm";
}
break;
}
case "ncsoft":
{
if ((getQuestItemsCount(player, N) >= 1) && (getQuestItemsCount(player, C) >= 1) && (getQuestItemsCount(player, S) >= 1) && (getQuestItemsCount(player, O) >= 1) && (getQuestItemsCount(player, F) >= 1) && (getQuestItemsCount(player, T) >= 1))
{
takeItems(player, N, 1);
takeItems(player, C, 1);
takeItems(player, S, 1);
takeItems(player, O, 1);
takeItems(player, F, 1);
takeItems(player, T, 1);
htmltext = "33873-1.htm";
}
else
{
htmltext = "noItem.htm";
}
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + "-1.htm";
}
public static void main(String[] args)
{
new LetterCollector();
}
}

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Letter Collector" active="11 05 1016-01 06 2016" enableShrines="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="37004" min="1" max="1" chance="3%" /> <!-- Letter Collector's Pouch: LINEAGE II -->
<add item="37003" min="1" max="1" chance="3%" /> <!-- Letter Collector's Pouch: TOGETHER -->
<add item="37005" min="1" max="1" chance="3%" /> <!-- Letter Collector's Pouch: NCSOFT -->
<add item="37006" min="1" max="1" chance="1%" /> <!-- Letter Collector's Pouch: RIIS -->
</droplist>
<spawnlist>
<add npc="33873" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
<add npc="33873" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
<add npc="33873" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
<add npc="33873" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
<add npc="33873" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
<add npc="33873" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
<add npc="33873" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
<add npc="33873" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
<add npc="33873" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
<add npc="33873" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
<add npc="33873" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
<add npc="33873" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
<add npc="33873" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
<add npc="33873" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan Village -->
</spawnlist>
<messages>
<add type="onEnd" text="Letter Collector: Event end!" />
<add type="onEnter" text="Letter Collector (5/11~6/1)" />
</messages>
</event>

View File

@@ -0,0 +1,4 @@
<html><body>Angel Cat:<br>
I'm sorry, but you'll need more letters to play.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest LetterCollector 33873-1.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Volunteer:<br>
We gatekeepers are under constant criticism and attack, always dealing with complaints that our teleportation services are too slow or too limited. We don't retaliate, but not because we can't, mind you.<br>
I'm sure you can see some of our strength in the way we endure the attacks upon us.<br>
But this is only a glimpse of our true power. We have decided to use our power for the greater good.<br>
Just 10,000 Adena, my friend! For a donation of 10,000 Adena, you too can purchase a genuine <font color="LEVEL">Gatekeeper Transformation Stick</font>.<br>
You can make a donation once a day to earn this Shadow Item which gives you the ability to transform into a gatekeeper and experience our great powers.<br>
You can only use the gatekeeper powers when you have this stick equipped.<br>
Once you remove it, you will revert to your original form.<br>
The money that you donate will benefit our Gatekeeper Welfare Foundation, so please participate!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Volunteer:<br>
You can use the Gatekeeper Transformation Stick to transform yourself to look like us for an entire hour!<br>
When you use the Gatekeeper Transformation Stick to look like us, you will possess our great powers and you will gain vitality while hunting. It's fantastic!<br>
You can obtain a Gatekeeper Transformation Stick once a day per account for a donation of just 10,000 Adena.<br>
All proceeds go to the Gatekeeper Welfare Foundation, so please participate early and often!<br>
Please know that during the transformation, your physical form and your attributes will change.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper transform_stick">Donate 10,000 Adena.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477-4.htm">"I won't give up my precious Adena!"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Volunteer:<br>
You don't have enough Adena. A Gatekeeper Transformation Stick costs 10,000 Adena!<br>
Don't worry about the expense -- it's worth it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Volunteer:<br>
Oh... you've gone too far!<br>
Is 10,000 Adena really such an exorbitant sum?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477.htm">Go back.</Button>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Volunteer:<br>
Well, aren't you kind...<br>
Your encouragement and support gives us even more strength.<br>
As a token of our gratitude, we will allow you to change your appearance to look like us.<br>
I should warn you though: unlike using a Gatekeeper Transformation Stick, you won't be able to display any real power with this regular appearance change.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper transform">"Yes, please!"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477.htm">"I don't know. It sounds scary."</Button>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Volunteer:<br>
Goodness! Don't hit me!<br>
I am from the Gatekeeper Welfare Foundation. We are currently sponsoring a <font color="LEVEL">"Love Your Gatekeeper" campaign</font>.<br>
Please take part and show your support for our brave gatekeepers.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477-1.htm">Learn about the campaign.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477-2.htm">Purchase a Transformation Stick.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest LoveYourGatekeeper 32477-5.htm">Encourage the gatekeeper.</Button>
</body></html>

View File

@@ -0,0 +1,105 @@
/*
* 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.LoveYourGatekeeper;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
/**
* Love Your Gatekeeper event.
* @author Gladicek
*/
final class LoveYourGatekeeper extends LongTimeEvent
{
// NPC
private static final int GATEKEEPER = 32477;
// Item
private static final int GATEKEEPER_TRANSFORMATION_STICK = 12814;
// Skills
private static SkillHolder TELEPORTER_TRANSFORM = new SkillHolder(5655, 1);
// Misc
private static final int HOURS = 24;
private static final int PRICE = 10000;
private static final String REUSE = LoveYourGatekeeper.class.getSimpleName() + "_reuse";
private LoveYourGatekeeper()
{
super(LoveYourGatekeeper.class.getSimpleName(), "events");
addStartNpc(GATEKEEPER);
addFirstTalkId(GATEKEEPER);
addTalkId(GATEKEEPER);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
{
case "transform_stick":
{
if (player.getAdena() < PRICE)
{
return "32477-3.htm";
}
final long reuse = player.getVariables().getLong(REUSE, 0);
if (reuse > System.currentTimeMillis())
{
final long remainingTime = (reuse - System.currentTimeMillis()) / 1000;
final int hours = (int) (remainingTime / 3600);
final int minutes = (int) ((remainingTime % 3600) / 60);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
sm.addItemName(GATEKEEPER_TRANSFORMATION_STICK);
sm.addInt(hours);
sm.addInt(minutes);
player.sendPacket(sm);
}
else
{
takeItems(player, Inventory.ADENA_ID, PRICE);
giveItems(player, GATEKEEPER_TRANSFORMATION_STICK, 1);
player.getVariables().set(REUSE, System.currentTimeMillis() + (HOURS * 3600000));
}
return null;
}
case "transform":
{
if (!player.isTransformed())
{
player.doCast(TELEPORTER_TRANSFORM.getSkill());
}
return null;
}
}
return event;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "32477.htm";
}
public static void main(String[] args)
{
new LoveYourGatekeeper();
}
}

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Love Your Gatekeeper" active="27 02 2008-28 02 2008" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<spawnlist>
<add npc="32477" x="-80762" y="151118" z="-3043" heading="28672" />
<add npc="32477" x="-84046" y="150193" z="-3129" heading="4096" />
<add npc="32477" x="-82675" y="151652" z="-3129" heading="46943" />
<add npc="32477" x="-12992" y="122818" z="-3117" heading="0" />
<add npc="32477" x="-13964" y="121947" z="-2988" heading="32768" />
<add npc="32477" x="-14823" y="123752" z="-3117" heading="8192" />
<add npc="32477" x="18178" y="145149" z="-3054" heading="7400" />
<add npc="32477" x="19185" y="144377" z="-3097" heading="32768" />
<add npc="32477" x="19508" y="145753" z="-3086" heading="47999" />
<add npc="32477" x="17396" y="170259" z="-3507" heading="30000" />
<add npc="32477" x="44150" y="-48708" z="-800" heading="32999" />
<add npc="32477" x="44280" y="-47664" z="-792" heading="49167" />
<add npc="32477" x="79806" y="55570" z="-1560" heading="0" />
<add npc="32477" x="83328" y="55824" z="-1525" heading="32768" />
<add npc="32477" x="80986" y="54504" z="-1525" heading="32768" />
<add npc="32477" x="83358" y="149223" z="-3400" heading="32768" />
<add npc="32477" x="82277" y="148598" z="-3467" heading="0" />
<add npc="32477" x="81621" y="148725" z="-3467" heading="32768" />
<add npc="32477" x="81680" y="145656" z="-3533" heading="32768" />
<add npc="32477" x="117498" y="76630" z="-2695" heading="38000" />
<add npc="32477" x="119536" y="76988" z="-2275" heading="40960" />
<add npc="32477" x="111585" y="221011" z="-3544" heading="16384" />
<add npc="32477" x="107922" y="218094" z="-3675" heading="0" />
<add npc="32477" x="114920" y="220020" z="-3632" heading="32768" />
<add npc="32477" x="147888" y="-58048" z="-2979" heading="49000" />
<add npc="32477" x="147285" y="-56461" z="-2776" heading="11500" />
<add npc="32477" x="147120" y="27312" z="-2192" heading="40960" />
<add npc="32477" x="147959" y="25695" z="-2000" heading="16384" />
<add npc="32477" x="87792" y="-142240" z="-1343" heading="44000" />
<add npc="32477" x="87557" y="-140657" z="-1542" heading="20476" />
<add npc="32477" x="115933" y="76482" z="-2711" heading="58999" />
</spawnlist>
<messages>
<add type="onEnd" text="Love Your Gatekeeper: Event end!" />
<add type="onEnter" text="Love Your Gatekeeper: Event ongoing!" />
</messages>
</event>

View File

@@ -0,0 +1,12 @@
<html><body>Master Yogi:<br>
Are you ready to test your luck?<br>
If Fortune holds you in her embrace, then you could win a prize beyond your wildest expectations. And just remember, <font color="LEVEL">you can only have one staff at a time</font>.<br>
First, you must purchase a <font color="LEVEL">Staff of Master Yogi</font>. This item will cost a partly 1,000,000 adena, and will serve as the item to be enchanted.<br>
Second, you must obtain <font color="LEVEL">special enchant scrolls</font>.<br>
There are several ways this can be done. Every 6 hours I will sell you a package of 24 scrolls for only 5,000,000 adena. You can also obtain scrolls through normal hunting. Or you can buy additional scrolls from me for a slightly greater cost.<br>
Different rewards are given depending on the number of successful enchants applied to the weapon. And just like with normal enchanting, if you fail you will lose the staff. However unlike regular enchanting, enchantment failure will not result in crystals.<br>
If you exercise patience and perseverance, then I have no doubt you will be successful!<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-2.htm">Ask about the prizes.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Participate in the event.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,27 @@
<html><body>Master Yogi:<br>
Here is the reward list for the number of successful Enchants. Why not give it try?<br><br>
Enchant +1: No reward<br>
Enchant +2: No reward<br>
Enchant +3: No reward<br>
Enchant +4: 1 Small Firecracker<br>
Enchant +5: 2 Small Firecrackers, 1 Large Fireworks<br>
Enchant +6: 3 Small Firecrackers, 2 Large Fireworks<br>
Enchant +7: 1 Shadow-Type Hair Accessory<br>
Enchant +8: 1 Scroll: Enchant D-Grade Weapon<br>
Enchant +9: 1 Scroll: Enchant D-Grade Weapon, 1 Scroll: Enchant Armor<br>
Enchant +10: 1 Scroll: Enchant C-Grade Weapon<br>
Enchant +11: 1 Scroll: Enchant C-Grade Weapon, 1 Scroll: Enchant Armor<br>
Enchant +12: 1 Scroll: Enchant B-Grade Weapon<br>
Enchant +13: 1 Scroll: Enchant A-Grade Weapon<br>
Enchant +14: 1 Hair Accessory<br>
Enchant +15: 1 S-Grade Accessory<br>
Enchant +16: Top-Grade Life Stone<br>
Enchant +17: 1 Scroll: Enchant S-Grade Weapon<br>
Enchant +18: 1 S-Grade Armor<br>
Enchant +19: 1 S-Grade Weapon<br>
Enchant +20: 1 Stage 14 Soul Crystal<br>
Enchant +21: 1 Top-Grade Life Stone, 1 High-Grade Life Stone, 1 Soul Crystal<br>
Enchant +22: 1 S80-Grade Armor<br>
Enchant +23: 1 S80-Grade Weapon<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Master Yogi:<br>
I'm sorry but you create character after event start...<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Master Yogi:<br>
Aha! So you decided to accept the challenge, eh? Outstanding! Select one of the following to get started. And don't forget, you can only have one staff in your inventory at any given time. And the staff must be equipped in order to receive a reward. May the light of guidance fall upon you.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting buy_staff">Purchase Staff of Master Yogi (1,000,000 Adena).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting buy_scroll_24">Purchase 24 enchant Scrolls (5,000,000 adena).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting buy_scroll_1">Purchase 1 Enchant Scroll (500,000 Adena).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting buy_scroll_10">Purchase 10 Enchant Scrolls (5,000,000 Adena)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-2.htm">View the prize list.</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Master Yogi:<br>
The basic requirements are an <font color="LEVEL">Enchant success rate of at least +4 and an equipped staff.</font>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Master Yogi:<br>
Congratulations on beginning your enchants.<br>
It looks like luck is beginning to favor you. Don't be afraid to challenge yourself, my child. Well done!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Master Yogi:<br>
Tsk tsk. You don't have the money required to purchase this item.<br><br>
That means you must earn some more money or let this chance slip through your fingers. The choice is yours.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Master Yogi:<br>
Ummm.... you seem a little shy on funds.<br>
Unless you have more money, I'm afraid I can't sell you these goods.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Nia Kujarako! You don't have enough Adena.<br>
Are you telling me that you don't even have a few thousand Adena? How disappointing.<br>
Go hunt and earn some quickly. You may not get another chance like this...<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Ah, excellent, great hero! May the Yogi's sense be with you...<br>
I foresee good things in your future. Do not be afraid to aim high!<br>
Good luck! I hope to see you again.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Ha ha!<br>
This package of 24 can only be purchased every 6 hours.<br>
If you look in your chat window, you should see a system message that tells you how much time is remaining before you can make this purchase again.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Master Yogi:<br>
Congratulations on taking the first step! Now all you need are some scrolls, and you'll be on your way.<br>
Just remember young one, peace makes plenty.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Either you have insufficient adena or you already possess a Staff of Master Yogi. Remember, <font color="LEVEL">you can only have one!</font><br>
Why, you ask?<br>
Only the gods know. It is not our place to question their divine providence.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</Button>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Master Yogi:<br>
Hello child, and welcome.<br>
My name is Master Yogi, and I have come back to the lands of Aden and Elmore in possession of much knowledge and enlightenment.<br>
I have long walked the way of the ascetic and have only returned from my sojourn to share my wisdom with you.<br>
With me, I bring a new event. And through this event, you too will learn the secrets and mysteries surrounding enchantment.<br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-1.htm">Ask about the event.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Participate in the event.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MasterOfEnchanting receive_reward">Receive reward.</Button>
</body></html>

View File

@@ -0,0 +1,319 @@
/*
* 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.MasterOfEnchanting;
import java.util.Date;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.event.LongTimeEvent;
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
/**
* Master of Enchanting event AI.
* @author Gnacik
*/
final class MasterOfEnchanting extends LongTimeEvent
{
// NPC
private static final int MASTER_YOGI = 32599;
// Items
private static final int MASTER_YOGI_STAFF = 13539;
private static final int MASTER_YOGI_SCROLL = 13540;
// Misc
private static final int STAFF_PRICE = 1000000;
private static final int SCROLL_24_PRICE = 5000000;
private static final int SCROLL_24_TIME = 6;
private static final int SCROLL_1_PRICE = 500000;
private static final int SCROLL_10_PRICE = 5000000;
private static final int[] HAT_SHADOW_REWARD =
{
13074,
13075,
13076
};
private static final int[] HAT_EVENT_REWARD =
{
13518,
13519,
13522
};
private static final int[] CRYSTAL_REWARD =
{
9570,
9571,
9572
};
@SuppressWarnings("deprecation")
private static final Date EVENT_START = new Date(2011, 7, 1);
private MasterOfEnchanting()
{
super(MasterOfEnchanting.class.getSimpleName(), "events");
addStartNpc(MASTER_YOGI);
addFirstTalkId(MASTER_YOGI);
addTalkId(MASTER_YOGI);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
if (event.equalsIgnoreCase("buy_staff"))
{
if (!hasQuestItems(player, MASTER_YOGI_STAFF) && (getQuestItemsCount(player, Inventory.ADENA_ID) > STAFF_PRICE))
{
takeItems(player, Inventory.ADENA_ID, STAFF_PRICE);
giveItems(player, MASTER_YOGI_STAFF, 1);
htmltext = "32599-staffbuyed.htm";
}
else
{
htmltext = "32599-staffcant.htm";
}
}
else if (event.equalsIgnoreCase("buy_scroll_24"))
{
final long curTime = System.currentTimeMillis();
final String value = loadGlobalQuestVar(player.getAccountName());
final long reuse = value == "" ? 0 : Long.parseLong(value);
if (player.getCreateDate().after(EVENT_START))
{
return "32599-bidth.htm";
}
if (curTime > reuse)
{
if (getQuestItemsCount(player, Inventory.ADENA_ID) > SCROLL_24_PRICE)
{
takeItems(player, Inventory.ADENA_ID, SCROLL_24_PRICE);
giveItems(player, MASTER_YOGI_SCROLL, 24);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000)));
htmltext = "32599-scroll24.htm";
}
else
{
htmltext = "32599-s24-no.htm";
}
}
else
{
final long remainingTime = (reuse - curTime) / 1000;
final int hours = (int) remainingTime / 3600;
final int minutes = ((int) remainingTime % 3600) / 60;
if (hours > 0)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_HOUR_S_AND_S2_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
sm.addInt(hours);
sm.addInt(minutes);
player.sendPacket(sm);
htmltext = "32599-scroll24.htm";
}
else if (minutes > 0)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
sm.addInt(minutes);
player.sendPacket(sm);
htmltext = "32599-scroll24.htm";
}
// Little glitch. There is no SystemMessage with seconds only.
// If time is less than 1 minute player can buy scrolls
else if (getQuestItemsCount(player, Inventory.ADENA_ID) > SCROLL_24_PRICE)
{
takeItems(player, Inventory.ADENA_ID, SCROLL_24_PRICE);
giveItems(player, MASTER_YOGI_SCROLL, 24);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000)));
htmltext = "32599-scroll24.htm";
}
else
{
htmltext = "32599-s24-no.htm";
}
}
}
else if (event.equalsIgnoreCase("buy_scroll_1"))
{
if (getQuestItemsCount(player, Inventory.ADENA_ID) > SCROLL_1_PRICE)
{
takeItems(player, Inventory.ADENA_ID, SCROLL_1_PRICE);
giveItems(player, MASTER_YOGI_SCROLL, 1);
htmltext = "32599-scroll-ok.htm";
}
else
{
htmltext = "32599-s1-no.htm";
}
}
else if (event.equalsIgnoreCase("buy_scroll_10"))
{
if (getQuestItemsCount(player, Inventory.ADENA_ID) > SCROLL_10_PRICE)
{
takeItems(player, Inventory.ADENA_ID, SCROLL_10_PRICE);
giveItems(player, MASTER_YOGI_SCROLL, 10);
htmltext = "32599-scroll-ok.htm";
}
else
{
htmltext = "32599-s10-no.htm";
}
}
else if (event.equalsIgnoreCase("receive_reward"))
{
if ((getItemEquipped(player, Inventory.PAPERDOLL_RHAND) == MASTER_YOGI_STAFF) && (getEnchantLevel(player, MASTER_YOGI_STAFF) > 3))
{
switch (getEnchantLevel(player, MASTER_YOGI_STAFF))
{
case 4:
{
giveItems(player, 6406, 1); // Firework
break;
}
case 5:
{
giveItems(player, 6406, 2); // Firework
giveItems(player, 6407, 1); // Large Firework
break;
}
case 6:
{
giveItems(player, 6406, 3); // Firework
giveItems(player, 6407, 2); // Large Firework
break;
}
case 7:
{
giveItems(player, HAT_SHADOW_REWARD[getRandom(3)], 1);
break;
}
case 8:
{
giveItems(player, 955, 1); // Scroll: Enchant Weapon (D)
break;
}
case 9:
{
giveItems(player, 955, 1); // Scroll: Enchant Weapon (D)
giveItems(player, 956, 1); // Scroll: Enchant Armor (D)
break;
}
case 10:
{
giveItems(player, 951, 1); // Scroll: Enchant Weapon (C)
break;
}
case 11:
{
giveItems(player, 951, 1); // Scroll: Enchant Weapon (C)
giveItems(player, 952, 1); // Scroll: Enchant Armor (C)
break;
}
case 12:
{
giveItems(player, 948, 1); // Scroll: Enchant Armor (B)
break;
}
case 13:
{
giveItems(player, 729, 1); // Scroll: Enchant Weapon (A)
break;
}
case 14:
{
giveItems(player, HAT_EVENT_REWARD[getRandom(3)], 1);
break;
}
case 15:
{
giveItems(player, 13992, 1); // Grade S Accessory Chest (Event)
break;
}
case 16:
{
giveItems(player, 8762, 1); // Top-Grade Life Stone: level 76
break;
}
case 17:
{
giveItems(player, 959, 1); // Scroll: Enchant Weapon (S)
break;
}
case 18:
{
giveItems(player, 13991, 1); // Grade S Armor Chest (Event)
break;
}
case 19:
{
giveItems(player, 13990, 1); // Grade S Weapon Chest (Event)
break;
}
case 20:
{
giveItems(player, CRYSTAL_REWARD[getRandom(3)], 1); // Red/Blue/Green Soul Crystal - Stage 14
break;
}
case 21:
{
giveItems(player, 8762, 1); // Top-Grade Life Stone: level 76
giveItems(player, 8752, 1); // High-Grade Life Stone: level 76
giveItems(player, CRYSTAL_REWARD[getRandom(3)], 1); // Red/Blue/Green Soul Crystal - Stage 14
break;
}
case 22:
{
giveItems(player, 13989, 1); // S80 Grade Armor Chest (Event)
break;
}
case 23:
{
giveItems(player, 13988, 1); // S80 Grade Weapon Chest (Event)
break;
}
default:
{
if (getEnchantLevel(player, MASTER_YOGI_STAFF) > 23)
{
giveItems(player, 13988, 1); // S80 Grade Weapon Chest (Event)
}
}
}
takeItems(player, MASTER_YOGI_STAFF, 1);
htmltext = "32599-rewardok.htm";
}
else
{
htmltext = "32599-rewardnostaff.htm";
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".htm";
}
public static void main(String[] args)
{
new MasterOfEnchanting();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Master of Enchanting" active="27 02 2010-28 02 2010" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="13540" min="1" max="1" chance="1%" /> <!-- Master Yogi's Scroll: Enchant Weapon -->
</droplist>
<spawnlist>
<add npc="32599" x="16111" y="142850" z="-2707" heading="16000" />
<add npc="32599" x="17275" y="145000" z="-3037" heading="25000" />
<add npc="32599" x="83037" y="149324" z="-3470" heading="44000" />
<add npc="32599" x="82145" y="148609" z="-3468" heading="0" />
<add npc="32599" x="81755" y="146487" z="-3534" heading="32768" />
<add npc="32599" x="-81031" y="150038" z="-3045" heading="0" />
<add npc="32599" x="-83156" y="150994" z="-3130" heading="0" />
<add npc="32599" x="-13727" y="122117" z="-2990" heading="16384" />
<add npc="32599" x="-14129" y="123869" z="-3118" heading="40959" />
<add npc="32599" x="-84411" y="244813" z="-3730" heading="57343" />
<add npc="32599" x="-84023" y="243051" z="-3730" heading="4096" />
<add npc="32599" x="46908" y="50856" z="-2997" heading="8192" />
<add npc="32599" x="45538" y="48357" z="-3061" heading="18000" />
<add npc="32599" x="9929" y="16324" z="-4576" heading="62999" />
<add npc="32599" x="11546" y="17599" z="-4586" heading="46900" />
<add npc="32599" x="81987" y="53723" z="-1497" heading="0" />
<add npc="32599" x="81083" y="56118" z="-1562" heading="32768" />
<add npc="32599" x="147200" y="25614" z="-2014" heading="16384" />
<add npc="32599" x="148557" y="26806" z="-2206" heading="32768" />
<add npc="32599" x="117356" y="76708" z="-2695" heading="49151" />
<add npc="32599" x="115887" y="76382" z="-2714" heading="0" />
<add npc="32599" x="-117239" y="46842" z="367" heading="49151" />
<add npc="32599" x="-119494" y="44882" z="367" heading="24576" />
<add npc="32599" x="111004" y="218928" z="-3544" heading="16384" />
<add npc="32599" x="108426" y="221876" z="-3600" heading="49151" />
<add npc="32599" x="-45278" y="-112766" z="-241" heading="0" />
<add npc="32599" x="-45372" y="-114104" z="-241" heading="16384" />
<add npc="32599" x="115096" y="-178370" z="-891" heading="0" />
<add npc="32599" x="116199" y="-182694" z="-1506" heading="0" />
<add npc="32599" x="86865" y="-142915" z="-1341" heading="26000" />
<add npc="32599" x="85584" y="-142490" z="-1343" heading="0" />
<add npc="32599" x="147421" y="-55435" z="-2736" heading="49151" />
<add npc="32599" x="148206" y="-55786" z="-2782" heading="61439" />
<add npc="32599" x="43165" y="-48461" z="-797" heading="17000" />
<add npc="32599" x="43966" y="-47709" z="-798" heading="49999" />
</spawnlist>
<messages>
<add type="onEnd" text="Master of Enchantig: event end!" />
<add type="onEnter" text="Master of enchanting: Event ongoing! Visit Master Yogi!" />
</messages>
</event>

View File

@@ -0,0 +1,5 @@
<html><body>Wealthy Merchant Red:<br>
Hello, I'm Red. I'm the leader of the Red Libra.<br>
Our group has a long history. My great-great-grandfather started it. We wander here and there, and we came to Aden because we heard there are lots of people.<br>
We have very rare items as well. Go meet our merchants to find out more.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Elder Green:<br>
I'm Green from the Red Libra merchants. I've been together with them since Red's grandfather was in charge. I'm old and very experienced.<br>
We visited Talking Island Village before arriving in the Town of Giran. I met Raina there, and she told me about the dual class.<br>
That's how I came to realize something about the dual class. And I found the secret behind reawakening the dual class.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RedLibra 34211-2.htm">"Can I reawaken my Awakened dual class?"</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Elder Green:<br>
Raina isn't as experienced, so she can't maintain a character's level when reawakening the dual class. However, I, am experienced. When <font color="LEVEL">reawakening the dual class</font>, I can <font color="LEVEL">let you keep your level</font>. However, instant reawakening does come with its flaws. You'll have to learn the skills yourself.<br>
In order to rewaken your dual class, bring <font color="LEVEL">your current dual class' cloak</font>, <font color="LEVEL">1 Proof of Red</font>, and <font color="LEVEL">667 Gemstones (R-grade)</font>. I'm a merchant, so no free passes here.<br>
You need <font color="LEVEL">Red Tears</font> in order to work with us. Talk to <font color="LEVEL">Bodyguard Blue</font> and help him to get some.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawekenDualclass">"I would like to reawaken my dual class."</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Artisan Black:<br>
I'm Black, and I deal with the great weapons of the Red Libra merchants. I'm the best in the world at creating and repairing weapons. I'm a master.<br>
I heard about the Mammon blacksmiths, but I can guarantee you that I'm much better than them. I can change those <font color="LEVEL">R-grade weapons</font> into <font color="LEVEL">other types</font> as well.<br>
I'm also selling <font color="LEVEL">Elysium weapons</font>. Mind you, I'm the only one in the world who can make them.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RedLibra 34212-2.htm">"I want to change my weapon into another type."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RedLibra 34212-3.htm">"I want to purchase an Elysium weapon."</button>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>Artisan Black:<br>
Do you want to get another weapon type? That's easy. But we are merchants! Nothing is free.<br>
We don't trade with just anyone. If you want to trade, give me <font color="LEVEL">1 Proof of Red</font>. Also, some <font color="LEVEL">Gemstones</font>. The amount depends on the grade of the weapon.<br>
When you switch a weapon, the <font color="LEVEL">enchantment, Soul Crystal, augmenting, and attributes</font> will remain the same. However, the appearance will be changed, so keep that in mind.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 3421201">"I want to change an R-grade weapon."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 3421202">"I want to change an R95-grade weapon."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 3421203">"I want to change an R99-grade weapon."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 3421204">"I want to exchange a Tauti and Kelbim weapon."</button>
<Button ALIGN=LEFT ICON="RETURN" action="link ev_libra_black001.htm">Back</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Artisan Black:<br>
Elysium weapons can only be created in Elysium. They are great weapons. There's one issue with them though. They can only be used while we are staying here, since the weapons are greatly affected by Elysium.<br>
Once we leave, the Elysium weapons will also disappear. But I can guarantee that the weapons will be amazing.<br>
It's very precious, so I can't just give it to you for free. Just give me <font color="LEVEL">1 Scroll: Enchant Weapon (R-grade)</font>. Pretty cheap, right?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3421205">"I want to purchase an Elysium weapon."</button>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest RedLibra 34212-1.htm">Back.</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Grocer Pink:<br>
I'm Grocer Pink, one of the Red Libra merchants. I'm the prettiest and cutest out of us.<br>
I've been collecting <font color="LEVEL">dyes</font> from this place. If you have anything you need, take a look around.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RedLibra 34213-2.htm">"I want to exchange dyes."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest RedLibra 34213-3.htm">"I want to exchange supplies."</button>
</body></html>

Some files were not shown because too many files have changed in this diff Show More