This commit is contained in:
4
trunk/dist/game/data/scripts/events/CharacterBirthday/32600-no.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/CharacterBirthday/32600-no.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/CharacterBirthday/32600-nohat.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/CharacterBirthday/32600-nohat.htm
vendored
Normal 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>
|
6
trunk/dist/game/data/scripts/events/CharacterBirthday/32600-yes.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/CharacterBirthday/32600-yes.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest CharacterBirthday change">"My mind's made"</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Chat 0">"Hmm. Maybe you're right." (Back)</a>
|
||||
</body></html>
|
131
trunk/dist/game/data/scripts/events/CharacterBirthday/CharacterBirthday.java
vendored
Normal file
131
trunk/dist/game/data/scripts/events/CharacterBirthday/CharacterBirthday.java
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.CharacterBirthday;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Character Birthday event AI.<br>
|
||||
* Updated to H5 by Nyaran.
|
||||
* @author Gnacik
|
||||
*/
|
||||
public final class CharacterBirthday extends Quest
|
||||
{
|
||||
private static final int ALEGRIA = 32600;
|
||||
private static int SPAWNS = 0;
|
||||
|
||||
private final static 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;
|
||||
QuestState st = getQuestState(player, false);
|
||||
|
||||
if (event.equalsIgnoreCase("despawn_npc"))
|
||||
{
|
||||
npc.doDie(player);
|
||||
SPAWNS--;
|
||||
|
||||
htmltext = null;
|
||||
}
|
||||
else if (event.equalsIgnoreCase("change"))
|
||||
{
|
||||
// Change Hat
|
||||
if (st.hasQuestItems(10250))
|
||||
{
|
||||
st.takeItems(10250, 1); // Adventurer Hat (Event)
|
||||
st.giveItems(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";
|
||||
}
|
||||
|
||||
QuestState st = getQuestState(player, true);
|
||||
|
||||
if (!Util.checkIfInRange(10, npc, player, true))
|
||||
{
|
||||
L2Npc spawned = st.addSpawn(32600, player.getX() + 10, player.getY() + 10, player.getZ() + 10, 0, false, 0, true);
|
||||
st.setState(State.STARTED);
|
||||
st.startQuestTimer("despawn_npc", 180000, spawned);
|
||||
SPAWNS++;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "tooclose.htm";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new CharacterBirthday();
|
||||
}
|
||||
}
|
3
trunk/dist/game/data/scripts/events/CharacterBirthday/busy.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/CharacterBirthday/busy.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>
|
||||
Alegria is very busy now. Try again later.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/CharacterBirthday/tooclose.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/CharacterBirthday/tooclose.htm
vendored
Normal 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>
|
7
trunk/dist/game/data/scripts/events/FreyaCelebration/13296.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/FreyaCelebration/13296.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest FreyaCelebration give_potion">Give one Adena to Freya.</a>
|
||||
</body></html>
|
167
trunk/dist/game/data/scripts/events/FreyaCelebration/FreyaCelebration.java
vendored
Normal file
167
trunk/dist/game/data/scripts/events/FreyaCelebration/FreyaCelebration.java
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.FreyaCelebration;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Freya Celebration event AI.
|
||||
* @author Gnacik
|
||||
*/
|
||||
public 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)
|
||||
{
|
||||
QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (event.equalsIgnoreCase("give_potion"))
|
||||
{
|
||||
if (st.getQuestItemsCount(Inventory.ADENA_ID) > 1)
|
||||
{
|
||||
long _curr_time = System.currentTimeMillis();
|
||||
String value = loadGlobalQuestVar(player.getAccountName());
|
||||
long _reuse_time = value == "" ? 0 : Long.parseLong(value);
|
||||
|
||||
if (_curr_time > _reuse_time)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.takeItems(Inventory.ADENA_ID, 1);
|
||||
st.giveItems(FREYA_POTION, 1);
|
||||
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (HOURS * 3600000)));
|
||||
}
|
||||
else
|
||||
{
|
||||
long remainingTime = (_reuse_time - System.currentTimeMillis()) / 1000;
|
||||
int hours = (int) (remainingTime / 3600);
|
||||
int minutes = (int) ((remainingTime % 3600) / 60);
|
||||
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
|
||||
{
|
||||
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)
|
||||
{
|
||||
CreatureSay cs = new CreatureSay(npc.getObjectId(), Say2.NPC_ALL, 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(), Say2.NPC_ALL, 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)
|
||||
{
|
||||
getQuestState(player, true);
|
||||
return "13296.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new FreyaCelebration();
|
||||
}
|
||||
}
|
39
trunk/dist/game/data/scripts/events/FreyaCelebration/config.xml
vendored
Normal file
39
trunk/dist/game/data/scripts/events/FreyaCelebration/config.xml
vendored
Normal 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>
|
9
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-02.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-02.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality memories_player">Receive the Memories of a Newbie.</a><br><br>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-03.htm
vendored
Normal file
8
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-03.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality memories_summon">Receive the Memories of a Newbie for summons.</a><br><br>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-04.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-04.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306-05.htm">What should I do?</a><br><br>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-05.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-nolevel.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-nolevel.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-nosummon.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-nosummon.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-notime.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-notime.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-okbuff.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-okbuff.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-okvitality.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/GiftOfVitality/4306-okvitality.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306.htm">Back</a>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/events/GiftOfVitality/4306.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/GiftOfVitality/4306.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest GiftOfVitality vitality">Receive the Gift of Vitality.</a><br><br>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306-02.htm">Ask about the Memories of a Newbie.</a><br><br>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306-03.htm">Ask about the Memories of a Newbie for summons.</a><br><br>
|
||||
<a action="bypass -h Quest GiftOfVitality 4306-04.htm">What is the great danger you're talking about?</a>
|
||||
</body></html>
|
186
trunk/dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java
vendored
Normal file
186
trunk/dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.GiftOfVitality;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* Gift of Vitality event AI.
|
||||
* @author Gnacik, Adry_85
|
||||
*/
|
||||
public 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
|
||||
};
|
||||
|
||||
private GiftOfVitality()
|
||||
{
|
||||
super(GiftOfVitality.class.getSimpleName(), "events");
|
||||
addStartNpc(STEVE_SHYAGEL);
|
||||
addFirstTalkId(STEVE_SHYAGEL);
|
||||
addTalkId(STEVE_SHYAGEL);
|
||||
}
|
||||
|
||||
// Misc
|
||||
private static final int HOURS = 5; // Reuse between buffs
|
||||
private static final int MIN_LEVEL = 75;
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
QuestState st = getQuestState(player, false);
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "vitality":
|
||||
{
|
||||
long _reuse = 0;
|
||||
String _streuse = st.get("reuse");
|
||||
if (_streuse != null)
|
||||
{
|
||||
_reuse = Long.parseLong(_streuse);
|
||||
}
|
||||
if (_reuse > System.currentTimeMillis())
|
||||
{
|
||||
long remainingTime = (_reuse - System.currentTimeMillis()) / 1000;
|
||||
int hours = (int) (remainingTime / 3600);
|
||||
int minutes = (int) ((remainingTime % 3600) / 60);
|
||||
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());
|
||||
st.setState(State.STARTED);
|
||||
st.set("reuse", String.valueOf(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.hasServitor())
|
||||
{
|
||||
htmltext = "4306-nosummon.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setTarget(player.getSummon());
|
||||
for (SkillHolder sk : SERVITOR_SKILLS)
|
||||
{
|
||||
npc.doCast(sk.getSkill());
|
||||
}
|
||||
htmltext = "4306-okbuff.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
{
|
||||
newQuestState(player);
|
||||
}
|
||||
return "4306.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new GiftOfVitality();
|
||||
}
|
||||
}
|
26
trunk/dist/game/data/scripts/events/GiftOfVitality/config.xml
vendored
Normal file
26
trunk/dist/game/data/scripts/events/GiftOfVitality/config.xml
vendored
Normal 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>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31228-1.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31228-1.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal 31228.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-2.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-2.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal 31228.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-0.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-0.htm
vendored
Normal 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>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122800">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-1.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-1.htm
vendored
Normal 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>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122801">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-2.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-2.htm
vendored
Normal 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>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122802">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-3.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-3.htm
vendored
Normal 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>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122803">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-4.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-4.htm
vendored
Normal 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>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122804">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/events/HeavyMedal/31228.htm
vendored
Normal file
8
trunk/dist/game/data/scripts/events/HeavyMedal/31228.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal talk">"I want to trade medals for prizes."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31228-1.htm">"Tell me more about the event."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31228-2.htm">"What are the prizes?"</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-1.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-1.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal 31229.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-2.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-2.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal 31229.htm">Back</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-game.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-game.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal heads">"Heads!"</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal tails">"Tails!"</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-0.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-0.htm
vendored
Normal 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>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-1.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-1.htm
vendored
Normal 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>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-10.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-10.htm
vendored
Normal 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>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-2.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-2.htm
vendored
Normal 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>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-3.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-3.htm
vendored
Normal 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>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-4.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-4.htm
vendored
Normal 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>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-0.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-0.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-1.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-1.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-2.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-2.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-3.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-3.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-4.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-4.htm
vendored
Normal 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>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-no.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-no.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-0.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-0.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-1.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-1.htm
vendored
Normal 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>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-10.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-10.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-2.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-2.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-3.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-3.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-4.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-4.htm
vendored
Normal 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>
|
9
trunk/dist/game/data/scripts/events/HeavyMedal/31229.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/HeavyMedal/31229.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest HeavyMedal talk">"I want to raise my level."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31229-1.htm">"Tell me more about the event."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31229-2.htm">"What are the prizes?"</a>
|
||||
</body></html>
|
151
trunk/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java
vendored
Normal file
151
trunk/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.HeavyMedal;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
|
||||
/**
|
||||
* Heavy Medals event AI.
|
||||
* @author Gnacik
|
||||
*/
|
||||
public final class HeavyMedal extends LongTimeEvent
|
||||
{
|
||||
private final static int CAT_ROY = 31228;
|
||||
private final static int CAT_WINNIE = 31229;
|
||||
private final static int GLITTERING_MEDAL = 6393;
|
||||
|
||||
private final static int WIN_CHANCE = 50;
|
||||
|
||||
private final static int[] MEDALS =
|
||||
{
|
||||
5,
|
||||
10,
|
||||
20,
|
||||
40
|
||||
};
|
||||
private final static 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)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
int level = checkLevel(st);
|
||||
|
||||
if (event.equalsIgnoreCase("game"))
|
||||
{
|
||||
htmltext = st.getQuestItemsCount(GLITTERING_MEDAL) < MEDALS[level] ? "31229-no.htm" : "31229-game.htm";
|
||||
}
|
||||
else if (event.equalsIgnoreCase("heads") || event.equalsIgnoreCase("tails"))
|
||||
{
|
||||
if (st.getQuestItemsCount(GLITTERING_MEDAL) < MEDALS[level])
|
||||
{
|
||||
htmltext = "31229-" + event.toLowerCase() + "-10.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.takeItems(GLITTERING_MEDAL, MEDALS[level]);
|
||||
|
||||
if (getRandom(100) > WIN_CHANCE)
|
||||
{
|
||||
level = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level > 0)
|
||||
{
|
||||
st.takeItems(BADGES[level - 1], -1);
|
||||
}
|
||||
st.giveItems(BADGES[level], 1);
|
||||
st.playSound(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(QuestState st)
|
||||
{
|
||||
int _lev = 0;
|
||||
if (st.hasQuestItems(6402))
|
||||
{
|
||||
_lev = 4;
|
||||
}
|
||||
else if (st.hasQuestItems(6401))
|
||||
{
|
||||
_lev = 3;
|
||||
}
|
||||
else if (st.hasQuestItems(6400))
|
||||
{
|
||||
_lev = 2;
|
||||
}
|
||||
else if (st.hasQuestItems(6399))
|
||||
{
|
||||
_lev = 1;
|
||||
}
|
||||
return _lev;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HeavyMedal();
|
||||
}
|
||||
}
|
93
trunk/dist/game/data/scripts/events/HeavyMedal/config.xml
vendored
Normal file
93
trunk/dist/game/data/scripts/events/HeavyMedal/config.xml
vendored
Normal 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>
|
11
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-1.htm
vendored
Normal file
11
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-1.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477.htm">Back</a>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-2.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-2.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper transform_stick">Donate 10,000 Adena.</a><br>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477-4.htm">"I won't give up my precious Adena!"</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-3.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-3.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-4.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-4.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477.htm">Go back.</a>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-5.htm
vendored
Normal file
8
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477-5.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper transform">"Yes, please!"</a><br>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477.htm">"I don't know. It sounds scary."</a>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477.htm
vendored
Normal file
8
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/32477.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477-1.htm">Learn about the campaign.</a><br>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477-2.htm">Purchase a Transformation Stick.</a><br>
|
||||
<a action="bypass -h Quest LoveYourGatekeeper 32477-5.htm">Encourage the gatekeeper.</a>
|
||||
</body></html>
|
129
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/LoveYourGatekeeper.java
vendored
Normal file
129
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/LoveYourGatekeeper.java
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.LoveYourGatekeeper;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* Love Your Gatekeeper event.
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class LoveYourGatekeeper extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int GATEKEEPER = 32477;
|
||||
// Item
|
||||
private static final int GATEKEEPER_TRANSFORMATION_STICK = 12814;
|
||||
// Misc
|
||||
private static final int HOURS = 24;
|
||||
private static final int PRICE = 10000;
|
||||
// Skills
|
||||
private static SkillHolder TELEPORTER_TRANSFORM = new SkillHolder(5655, 1);
|
||||
|
||||
private LoveYourGatekeeper()
|
||||
{
|
||||
super(LoveYourGatekeeper.class.getSimpleName(), "events");
|
||||
addStartNpc(GATEKEEPER);
|
||||
addFirstTalkId(GATEKEEPER);
|
||||
addTalkId(GATEKEEPER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "transform_stick":
|
||||
{
|
||||
if (player.getAdena() >= PRICE)
|
||||
{
|
||||
long _reuse = 0;
|
||||
String _streuse = st.get("reuse");
|
||||
if (_streuse != null)
|
||||
{
|
||||
_reuse = Long.parseLong(_streuse);
|
||||
}
|
||||
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
|
||||
{
|
||||
st.takeItems(Inventory.ADENA_ID, PRICE);
|
||||
st.giveItems(GATEKEEPER_TRANSFORMATION_STICK, 1);
|
||||
st.setState(State.STARTED);
|
||||
st.set("reuse", String.valueOf(System.currentTimeMillis() + (HOURS * 3600000)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return "32477-3.htm";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "transform":
|
||||
{
|
||||
if (player.isTransformed())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
player.doCast(TELEPORTER_TRANSFORM.getSkill());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
{
|
||||
newQuestState(player);
|
||||
}
|
||||
return "32477.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new LoveYourGatekeeper();
|
||||
}
|
||||
}
|
40
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/config.xml
vendored
Normal file
40
trunk/dist/game/data/scripts/events/LoveYourGatekeeper/config.xml
vendored
Normal 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>
|
12
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-1.htm
vendored
Normal file
12
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-1.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-2.htm">Ask about the prizes.</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Participate in the event.</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
|
||||
</body></html>
|
27
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-2.htm
vendored
Normal file
27
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-2.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-bidth.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-bidth.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Master Yogi:<br>
|
||||
I'm sorry but you create character after event start...<br><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-participate.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-participate.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting buy_staff">Purchase Staff of Master Yogi (1,000,000 Adena).</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting buy_scroll_24">Purchase 24 enchant Scrolls (5,000,000 adena).</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting buy_scroll_1">Purchase 1 Enchant Scroll (500,000 Adena).</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting buy_scroll_10">Purchase 10 Enchant Scrolls (5,000,000 Adena)</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-2.htm">View the prize list.</a><br><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-rewardnostaff.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-rewardnostaff.htm
vendored
Normal 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>
|
4
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-rewardok.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-rewardok.htm
vendored
Normal 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>
|
5
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-s1-no.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-s1-no.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-s10-no.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-s10-no.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-s24-no.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-s24-no.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-scroll-ok.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-scroll-ok.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-scroll24.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-scroll24.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-staffbuyed.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-staffbuyed.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-staffcant.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599-staffcant.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/MasterOfEnchanting/32599.htm
vendored
Normal 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>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-1.htm">Ask about the event.</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Participate in the event.</a><br>
|
||||
<a action="bypass -h Quest MasterOfEnchanting receive_reward">Receive reward.</a>
|
||||
</body></html>
|
288
trunk/dist/game/data/scripts/events/MasterOfEnchanting/MasterOfEnchanting.java
vendored
Normal file
288
trunk/dist/game/data/scripts/events/MasterOfEnchanting/MasterOfEnchanting.java
vendored
Normal file
@@ -0,0 +1,288 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.MasterOfEnchanting;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* Master of Enchanting event AI.
|
||||
* @author Gnacik
|
||||
*/
|
||||
public 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 _eventStart = 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;
|
||||
QuestState st = getQuestState(player, false);
|
||||
if (event.equalsIgnoreCase("buy_staff"))
|
||||
{
|
||||
if (!st.hasQuestItems(MASTER_YOGI_STAFF) && (st.getQuestItemsCount(Inventory.ADENA_ID) > STAFF_PRICE))
|
||||
{
|
||||
st.takeItems(Inventory.ADENA_ID, STAFF_PRICE);
|
||||
st.giveItems(MASTER_YOGI_STAFF, 1);
|
||||
htmltext = "32599-staffbuyed.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32599-staffcant.htm";
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("buy_scroll_24"))
|
||||
{
|
||||
long _curr_time = System.currentTimeMillis();
|
||||
String value = loadGlobalQuestVar(player.getAccountName());
|
||||
long _reuse_time = value == "" ? 0 : Long.parseLong(value);
|
||||
if (player.getCreateDate().after(_eventStart))
|
||||
{
|
||||
return "32599-bidth.htm";
|
||||
}
|
||||
|
||||
if (_curr_time > _reuse_time)
|
||||
{
|
||||
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_24_PRICE)
|
||||
{
|
||||
st.takeItems(Inventory.ADENA_ID, SCROLL_24_PRICE);
|
||||
st.giveItems(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
|
||||
{
|
||||
long _remaining_time = (_reuse_time - _curr_time) / 1000;
|
||||
int hours = (int) _remaining_time / 3600;
|
||||
int minutes = ((int) _remaining_time % 3600) / 60;
|
||||
if (hours > 0)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Little glitch. There is no SystemMessage with seconds only.
|
||||
// If time is less than 1 minute player can buy scrolls
|
||||
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_24_PRICE)
|
||||
{
|
||||
st.takeItems(Inventory.ADENA_ID, SCROLL_24_PRICE);
|
||||
st.giveItems(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 (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_1_PRICE)
|
||||
{
|
||||
st.takeItems(Inventory.ADENA_ID, SCROLL_1_PRICE);
|
||||
st.giveItems(MASTER_YOGI_SCROLL, 1);
|
||||
htmltext = "32599-scroll-ok.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32599-s1-no.htm";
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("buy_scroll_10"))
|
||||
{
|
||||
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_10_PRICE)
|
||||
{
|
||||
st.takeItems(Inventory.ADENA_ID, SCROLL_10_PRICE);
|
||||
st.giveItems(MASTER_YOGI_SCROLL, 10);
|
||||
htmltext = "32599-scroll-ok.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32599-s10-no.htm";
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("receive_reward"))
|
||||
{
|
||||
if ((st.getItemEquipped(Inventory.PAPERDOLL_RHAND) == MASTER_YOGI_STAFF) && (st.getEnchantLevel(MASTER_YOGI_STAFF) > 3))
|
||||
{
|
||||
switch (st.getEnchantLevel(MASTER_YOGI_STAFF))
|
||||
{
|
||||
case 4:
|
||||
st.giveItems(6406, 1); // Firework
|
||||
break;
|
||||
case 5:
|
||||
st.giveItems(6406, 2); // Firework
|
||||
st.giveItems(6407, 1); // Large Firework
|
||||
break;
|
||||
case 6:
|
||||
st.giveItems(6406, 3); // Firework
|
||||
st.giveItems(6407, 2); // Large Firework
|
||||
break;
|
||||
case 7:
|
||||
st.giveItems(HAT_SHADOW_REWARD[getRandom(3)], 1);
|
||||
break;
|
||||
case 8:
|
||||
st.giveItems(955, 1); // Scroll: Enchant Weapon (D)
|
||||
break;
|
||||
case 9:
|
||||
st.giveItems(955, 1); // Scroll: Enchant Weapon (D)
|
||||
st.giveItems(956, 1); // Scroll: Enchant Armor (D)
|
||||
break;
|
||||
case 10:
|
||||
st.giveItems(951, 1); // Scroll: Enchant Weapon (C)
|
||||
break;
|
||||
case 11:
|
||||
st.giveItems(951, 1); // Scroll: Enchant Weapon (C)
|
||||
st.giveItems(952, 1); // Scroll: Enchant Armor (C)
|
||||
break;
|
||||
case 12:
|
||||
st.giveItems(948, 1); // Scroll: Enchant Armor (B)
|
||||
break;
|
||||
case 13:
|
||||
st.giveItems(729, 1); // Scroll: Enchant Weapon (A)
|
||||
break;
|
||||
case 14:
|
||||
st.giveItems(HAT_EVENT_REWARD[getRandom(3)], 1);
|
||||
break;
|
||||
case 15:
|
||||
st.giveItems(13992, 1); // Grade S Accessory Chest (Event)
|
||||
break;
|
||||
case 16:
|
||||
st.giveItems(8762, 1); // Top-Grade Life Stone: level 76
|
||||
break;
|
||||
case 17:
|
||||
st.giveItems(959, 1); // Scroll: Enchant Weapon (S)
|
||||
break;
|
||||
case 18:
|
||||
st.giveItems(13991, 1); // Grade S Armor Chest (Event)
|
||||
break;
|
||||
case 19:
|
||||
st.giveItems(13990, 1); // Grade S Weapon Chest (Event)
|
||||
break;
|
||||
case 20:
|
||||
st.giveItems(CRYSTAL_REWARD[getRandom(3)], 1); // Red/Blue/Green Soul Crystal - Stage 14
|
||||
break;
|
||||
case 21:
|
||||
st.giveItems(8762, 1); // Top-Grade Life Stone: level 76
|
||||
st.giveItems(8752, 1); // High-Grade Life Stone: level 76
|
||||
st.giveItems(CRYSTAL_REWARD[getRandom(3)], 1); // Red/Blue/Green Soul Crystal - Stage 14
|
||||
break;
|
||||
case 22:
|
||||
st.giveItems(13989, 1); // S80 Grade Armor Chest (Event)
|
||||
break;
|
||||
case 23:
|
||||
st.giveItems(13988, 1); // S80 Grade Weapon Chest (Event)
|
||||
default:
|
||||
if (st.getEnchantLevel(MASTER_YOGI_STAFF) > 23)
|
||||
{
|
||||
st.giveItems(13988, 1); // S80 Grade Weapon Chest (Event)
|
||||
}
|
||||
break;
|
||||
}
|
||||
st.takeItems(MASTER_YOGI_STAFF, 1);
|
||||
htmltext = "32599-rewardok.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32599-rewardnostaff.htm";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
{
|
||||
newQuestState(player);
|
||||
}
|
||||
return npc.getId() + ".htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MasterOfEnchanting();
|
||||
}
|
||||
}
|
47
trunk/dist/game/data/scripts/events/MasterOfEnchanting/config.xml
vendored
Normal file
47
trunk/dist/game/data/scripts/events/MasterOfEnchanting/config.xml
vendored
Normal 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>
|
10
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-1.htm
vendored
Normal file
10
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-1.htm
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<html><body>
|
||||
Meow~ You're really a lovable person.<br>
|
||||
I'll definitely help you show your heart to the one who's precious to you.<br>
|
||||
If you use the <font color="LEVEL">Valentine Secret Spell</font> that I gave you, you can find out the <font color="LEVEL">way to make a special Valentine Cake</font> for the person you love~ meow~.<br>
|
||||
If you register the Valentine Secret Spell as a recipe, then collect 10 dark chocolates, 10 white chocolates, and 5 fresh creams, you can make a cake. It can fail sometimes, so pray for success in your heart~ meow~~<br>
|
||||
But, I can't give you the chocolates and fresh cream. Some unknown monsters took them after raiding the warehouse awhile ago.<br>
|
||||
But with the courage that comes from making a gift for someone precious to you, you should be able to retrieve the cake ingredients from the monsters.<br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301-2.htm">I'm curious about the event rewards.</a><br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301.htm">To the beginning</a>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-2.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-2.htm
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>
|
||||
Meow~ It's a reward for the person receiving the gift.<br>
|
||||
If you take the Valentine Secret Spell and collect chocolates and fresh cream, you can make a special Valentine cake. The first cake that you make will probably look shabby. But with a little effort, you can turn it into a great cake.<br>
|
||||
First, the <font color="LEVEL">Simple Valentine Cake</font> - Transformation Scroll, Healing Potion, Ordinary Valentine Cake<br>
|
||||
Second, the <font color="LEVEL">Velvety Valentine Cake</font> - Armor Enchant Scroll, Blessed Scroll of Return, Blessed Scroll of Resurrection, 3 Day Energy Agathion of Love, Delicious Valentine Cake<br>
|
||||
Third, the <font color="LEVEL">Delectable Valentine Cake</font> - Weapon Enchant Scroll, 7 Day Energy Agathion of Love, Perfect Valentine Cake<br>
|
||||
Fourth, the <font color="LEVEL">Decadent Valentine Cake</font> - Top-grade Armor Enchant Scroll, 15 Day Energy Agathion of Love, 30 Day Energy Agathion of Love<br><br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301.htm">To the beginning</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-3.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-3.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Meow~<br>
|
||||
Please take the <font color="LEVEL">Valentine Secret Spell</font> to help you make a special Valentine cake.<br><br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301.htm">To the beginning</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-4.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/TheValentineEvent/4301-4.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>
|
||||
Meow~<br>
|
||||
I already gave you Valentine Secret Spell, but you're back for me. How greedy.<br>
|
||||
I can't give it to you~<br><br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301.htm">To the beginning</a>
|
||||
</body></html>
|
10
trunk/dist/game/data/scripts/events/TheValentineEvent/4301.htm
vendored
Normal file
10
trunk/dist/game/data/scripts/events/TheValentineEvent/4301.htm
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<html><body>
|
||||
Meow~ meow~<br>
|
||||
I'm <font color="LEVEL">Valentine messenger Queen Yang</font><br>
|
||||
The goddess of love Aphrodite gave me a special mission.<br>
|
||||
She told me to help lovers stay in love forever, to deliver comaraderie to friends who are always by your side, and to give something to those who are precious to you.<br>
|
||||
I want to give all of you a special gift today. Lalala~ Lala~<br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301-1.htm">See detailed event explanation.</a><br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301-2.htm">I'm curious about the event rewards.</a><br>
|
||||
<a action="bypass -h Quest TheValentineEvent 4301-3.htm">Receive Valentine Secret Spell.</a>
|
||||
</body></html>
|
87
trunk/dist/game/data/scripts/events/TheValentineEvent/TheValentineEvent.java
vendored
Normal file
87
trunk/dist/game/data/scripts/events/TheValentineEvent/TheValentineEvent.java
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package events.TheValentineEvent;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* The Valentine Event event AI.
|
||||
* @author Gnacik
|
||||
*/
|
||||
public final class TheValentineEvent extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int NPC = 4301;
|
||||
// Item
|
||||
private static final int RECIPE = 20191;
|
||||
|
||||
private TheValentineEvent()
|
||||
{
|
||||
super(TheValentineEvent.class.getSimpleName(), "events");
|
||||
addStartNpc(NPC);
|
||||
addFirstTalkId(NPC);
|
||||
addTalkId(NPC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
if (event.equalsIgnoreCase("4301-3.htm"))
|
||||
{
|
||||
if (st.isCompleted())
|
||||
{
|
||||
htmltext = "4301-4.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveItems(RECIPE, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
st.setState(State.COMPLETED);
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
{
|
||||
newQuestState(player);
|
||||
}
|
||||
return npc.getId() + ".htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new TheValentineEvent();
|
||||
}
|
||||
}
|
55
trunk/dist/game/data/scripts/events/TheValentineEvent/config.xml
vendored
Normal file
55
trunk/dist/game/data/scripts/events/TheValentineEvent/config.xml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Valentine Event" active="15 12 2001-16 12 2001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<droplist>
|
||||
<add item="20192" min="1" max="1" chance="5%" /> <!-- Valentine Dark Chocolate -->
|
||||
<add item="20193" min="1" max="1" chance="5%" /> <!-- Valentine White Chocolate -->
|
||||
<add item="20194" min="1" max="1" chance="5%" /> <!-- Valentine Fresh Cream -->
|
||||
</droplist>
|
||||
<spawnlist>
|
||||
<add npc="4301" x="87792" y="-142240" z="-1343" heading="44000" />
|
||||
<add npc="4301" x="87616" y="-140688" z="-1542" heading="16500" />
|
||||
<add npc="4301" x="114733" y="-178691" z="-821" heading="0" />
|
||||
<add npc="4301" x="115708" y="-182362" z="-1449" heading="0" />
|
||||
<add npc="4301" x="-44337" y="-113669" z="-224" heading="0" />
|
||||
<add npc="4301" x="-44628" y="-115409" z="-240" heading="22500" />
|
||||
<add npc="4301" x="-13073" y="122801" z="-3117" heading="0" />
|
||||
<add npc="4301" x="-13949" y="121934" z="-2988" heading="32768" />
|
||||
<add npc="4301" x="-14822" y="123708" z="-3117" heading="8192" />
|
||||
<add npc="4301" x="-80762" y="151118" z="-3043" heading="28672" />
|
||||
<add npc="4301" x="-84049" y="150176" z="-3129" heading="4096" />
|
||||
<add npc="4301" x="-82623" y="151666" z="-3129" heading="49152" />
|
||||
<add npc="4301" x="-84516" y="242971" z="-3730" heading="34000" />
|
||||
<add npc="4301" x="-86003" y="243205" z="-3730" heading="60000" />
|
||||
<add npc="4301" x="11281" y="15652" z="-4584" heading="25000" />
|
||||
<add npc="4301" x="11303" y="17732" z="-4574" heading="57344" />
|
||||
<add npc="4301" x="47151" y="49436" z="-3059" heading="32000" />
|
||||
<add npc="4301" x="79806" y="55570" z="-1560" heading="0" />
|
||||
<add npc="4301" x="83328" y="55824" z="-1525" heading="32768" />
|
||||
<add npc="4301" x="80986" y="54504" z="-1525" heading="32768" />
|
||||
<add npc="4301" x="18178" y="145149" z="-3054" heading="7400" />
|
||||
<add npc="4301" x="19208" y="144380" z="-3097" heading="32768" />
|
||||
<add npc="4301" x="19508" y="145775" z="-3086" heading="48000" />
|
||||
<add npc="4301" x="17396" y="170259" z="-3507" heading="30000" />
|
||||
<add npc="4301" x="83332" y="149160" z="-3405" heading="49152" />
|
||||
<add npc="4301" x="82277" y="148598" z="-3467" heading="0" />
|
||||
<add npc="4301" x="81621" y="148725" z="-3467" heading="32768" />
|
||||
<add npc="4301" x="81680" y="145656" z="-3533" heading="32768" />
|
||||
<add npc="4301" x="117498" y="76630" z="-2695" heading="38000" />
|
||||
<add npc="4301" x="115914" y="76449" z="-2711" heading="59000" />
|
||||
<add npc="4301" x="119536" y="76988" z="-2275" heading="40960" />
|
||||
<add npc="4301" x="147120" y="27312" z="-2192" heading="40960" />
|
||||
<add npc="4301" x="147920" y="25664" z="-2000" heading="16384" />
|
||||
<add npc="4301" x="111776" y="221104" z="-3543" heading="16384" />
|
||||
<add npc="4301" x="107904" y="218096" z="-3675" heading="0" />
|
||||
<add npc="4301" x="114920" y="220020" z="-3632" heading="32768" />
|
||||
<add npc="4301" x="147888" y="-58048" z="-2979" heading="49000" />
|
||||
<add npc="4301" x="147285" y="-56461" z="-2776" heading="11500" />
|
||||
<add npc="4301" x="44176" y="-48732" z="-800" heading="33000" />
|
||||
<add npc="4301" x="44294" y="-47642" z="-792" heading="50000" />
|
||||
<add npc="4301" x="-116677" y="46824" z="360" heading="34828" />
|
||||
</spawnlist>
|
||||
<messages>
|
||||
<add type="onEnd" text="The Valentine Event end!" />
|
||||
<add type="onEnter" text="Valentine's Event is currently active. Collect all items and make your Valentine Cake!" />
|
||||
</messages>
|
||||
</event>
|
Reference in New Issue
Block a user