This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
<html><body>Jack Sage:<br><br>
The Oracle said that the great danger coming from the Frozen Labyrinth in the Schuttgart territory will affect the whole world. Since the Archbishop has received this revelation from Eva, his nights have been sleepless. He finally went to the Magic Research Institute and came to an important decision: the Gift of Vitality must be unleashed. This shall help Aden's adventurers to reveal their maximum potential.<br>
The Gift was sealed centuries ago and a huge amount of money and effort from the highest ranked wizards was required for this decision to become real. The Magic Research Institute made it happen.<br>
Now everyone must work together to face the approaching evil.<br><br>
<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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,9 @@
<html><body>Jack Sage:<br><br>
Greetings, brave adventurer of Aden!<br>
My name is Jack Sage from Eva's Temple. According to Eva's Oracle, <font color="LEVEL">the world is now facing a great danger</font>. So great, in fact, that in our current state we cannot cope with it. As a consequence, Eva's Temple and the Magic Research Institute have decided to provide an ancient magic, which had been sealed long ago, to every adventurer who wishes to improve their abilities. It is called the <font color="LEVEL">Gift of Vitality</font>. The Gift of Vitality <font color="LEVEL">fills the vitality up to level 4 and maintains that state for 2 hours!</font> We shall do our best to overcome the imminent danger.<br>
May Eva's blessing accompany you on your journey.<br><br>
<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>

View 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();
}
}

View File

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