Sync with L2JServer Jan 9th 2015.

This commit is contained in:
mobius
2015-01-09 19:55:02 +00:00
parent 9c9b0aaff7
commit 4c2db62a63
618 changed files with 19803 additions and 7853 deletions

View File

@@ -0,0 +1,6 @@
<html><head><body>Magister Ayanthe:<br>
Break's over. It's time to begin some earnest training.<br>
We're going to the training camp. The monsters there are illusions based on actual monsters that live outside this town. Practice means getting some real battle experience while overcoming its dangers. I'll be going with you, so don't be scared.<br>
So, are we ready?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10735_ASpecialPower 33942-02.htm">"I am ready."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><head><body>Magister Ayanthe:<br>
Good. Shall we start?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest FaeronTrainingGrounds1 enter_instance">"Let's enter the training camp."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><head><body>Magister Ayanthe:<br>
Meeting outside is a nice change, isn't it?<br>
You've certainly worked very hard. I'm proud to call you my pupil.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><head><body>Magister Ayanthe:<br>
It's not a good habit to leave while training. You need to focus when you're back in there.<br>
Are you ready<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest FaeronTrainingGrounds1 enter_instance">"I'm ready"</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><head><body>Magister Ayanthe:<br>
The monsters are coming. Concentrate and attack!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Magister Ayanthe:<br>
Focus on the fight!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10735_ASpecialPower 33944-03.htm">"Create more monsters so I can train."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><head><body>Magister Ayanthe:<br>
Good. It pleases me that you're taking your training so seriously.<br>
But bear in mind that this is training, and not the real world. We will limit the number of monsters you face in a single encounter.
</body></html>

View File

@@ -0,0 +1,7 @@
<html><head><body>Magister Ayanthe:<br>
You're better than I expected. Feels different from training with a dummy, right?<br>
Here, take these <font color="LEVEL">Spiritshots</font>. Right now, your weapon has no grade, but as you become stronger, you'll be using D-grade, C-grade, and even R-grade weapons. They're proving to be very valuable in the Material Realm.<br>
Go ahead and <font color="LEVEL">activate the Spiritshots</font>.<br>
I'll go prepare more monsters for your next training session, so let me know when the Spiritshots have been activated.<br>
(You can conveniently automate your Spiritshots by creating a <font color="LEVEL">shortcut</font> and then <font color="LEVEL">right-click</font> on it.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><head><body>Magister Ayanthe:<br>
All right, now your training begins again!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Magister Ayanthe:<br>
I see you're a quick study. I'm impressed. I can't wait to see how much you'll have improved in the future. You have recovered some of your power that has been sealed while passing through the Dimensional Rift. These are called <font color="LEVEL">Skills</font>.<br>
The more abilities you recover, the stronger you'll grow.<br>
Now that you've recovered some of your power, shall we face tougher enemies? Are you ready?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10735_ASpecialPower 33944-07.htm">"My body is ready."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><head><body>Magister Ayanthe:<br>
If you don't use your <font color="LEVEL">skills</font>, this next battle will be difficult!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Magister Ayanthe:<br>
Great work. You've made me very proud. You must be exhausted. Shall we steep outside?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest FaeronTrainingGrounds1 exit_instance">"I'd like to go outside."</Button>
</body></html>

View File

@@ -0,0 +1,278 @@
/*
* Copyright (C) 2004-2015 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 quests.Q10735_ASpecialPower;
import quests.Q10734_DoOrDie.Q10734_DoOrDie;
import com.l2jserver.gameserver.enums.QuestSound;
import com.l2jserver.gameserver.enums.Race;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.model.holders.ItemHolder;
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.network.NpcStringId;
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jserver.gameserver.network.serverpackets.TutorialShowHtml;
/**
* @author Sdw
*/
public class Q10735_ASpecialPower extends Quest
{
// NPC's
private static final int AYANTHE = 33942;
private static final int AYANTHE_2 = 33944;
private static final int FLOATO = 27526;
private static final int RATEL = 27527;
// Misc
private static final int MIN_LEVEL = 4;
private static final int MAX_LEVEL = 20;
// Items
private static final ItemHolder SPIRITSHOTS_TRAINING = new ItemHolder(2509, 150);
private static final ItemHolder SPIRITSHOTS_REWARD = new ItemHolder(2509, 500);
// Locations
private static final Location MOB_1 = new Location(-75112, 240760, -3615);
private static final Location MOB_2 = new Location(-75016, 240456, -3628);
private static final int KILL_COUNT_ID = 0;
public Q10735_ASpecialPower()
{
super(10735, Q10735_ASpecialPower.class.getSimpleName(), "A Special Power");
addStartNpc(AYANTHE);
addTalkId(AYANTHE, AYANTHE_2);
addKillId(FLOATO, RATEL);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "fixme.htm");
addCondRace(Race.ERTHEIA, "fixme.htm");
addCondClassId(ClassId.ERTHEIA_WIZARD, "fixme.html");
addCondCompletedQuest(Q10734_DoOrDie.class.getSimpleName(), "fixme.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "33942-02.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "33944-03.htm":
{
htmltext = event;
showOnScreenMsg(player, NpcStringId.ATTACK_THE_MONSTER, ExShowScreenMessage.TOP_CENTER, 4500);
break;
}
case "showscreen_1":
{
showOnScreenMsg(player, NpcStringId.AUTOMATE_SPIRITSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500);
break;
}
case "33944-07.htm":
{
if (qs.isCond(5))
{
qs.setCond(6);
showOnScreenMsg(player, NpcStringId.FIGHT_USING_SKILLS, ExShowScreenMessage.TOP_CENTER, 4500);
addSpawn(RATEL, MOB_1, false, 0, false, player.getInstanceId());
addSpawn(RATEL, MOB_2, false, 0, false, player.getInstanceId());
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs.isCompleted())
{
htmltext = getAlreadyCompletedMsg(player);
}
switch (npc.getId())
{
case AYANTHE:
{
switch (qs.getState())
{
case State.CREATED:
{
htmltext = "33942-01.htm";
break;
}
case State.STARTED:
{
switch (qs.getCond())
{
case 1:
{
htmltext = "33942-02.htm";
break;
}
case 2:
case 3:
case 4:
case 5:
case 6:
{
htmltext = "33942-04.htm";
break;
}
case 7:
{
htmltext = "33942-03.htm";
giveAdena(player, 900, true);
rewardItems(player, SPIRITSHOTS_REWARD);
addExpAndSp(player, 3154, 0);
qs.exitQuest(false, true);
break;
}
}
break;
}
}
break;
}
case AYANTHE_2:
{
switch (qs.getCond())
{
case 1:
{
showOnScreenMsg(player, NpcStringId.ATTACK_THE_MONSTER, ExShowScreenMessage.TOP_CENTER, 4500);
qs.setCond(2, true);
addSpawn(FLOATO, MOB_1, false, 0, false, player.getInstanceId());
addSpawn(FLOATO, MOB_2, false, 0, false, player.getInstanceId());
htmltext = "33944-01.htm";
break;
}
case 2:
case 4:
case 6:
{
htmltext = "33944-02.htm";
break;
}
case 3:
{
if (qs.getInt("ss") == 1)
{
addSpawn(FLOATO, MOB_1, false, 0, false, player.getInstanceId());
addSpawn(FLOATO, MOB_2, false, 0, false, player.getInstanceId());
showOnScreenMsg(player, NpcStringId.ATTACK_THE_MONSTER, ExShowScreenMessage.TOP_CENTER, 4500);
htmltext = "33944-05.htm";
qs.setCond(4, true);
}
else
{
giveItems(player, SPIRITSHOTS_TRAINING);
showOnScreenMsg(player, NpcStringId.SPIRITSHOT_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
startQuestTimer("showscreen_1", 4500, npc, player);
player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_003_bullet_01.htm", TutorialShowHtml.LARGE_WINDOW));
htmltext = "33944-04.htm";
qs.set("ss", 1);
}
break;
}
case 5:
{
htmltext = "33944-06.htm";
player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_004_skill_01.htm", TutorialShowHtml.LARGE_WINDOW));
break;
}
case 7:
{
htmltext = "33944-08.htm";
break;
}
}
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if (qs != null)
{
final int cond = qs.getCond();
if (npc.getId() == FLOATO)
{
if ((cond == 2) || (cond == 4))
{
final int value = qs.getMemoStateEx(KILL_COUNT_ID) + 1;
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (value >= 2)
{
qs.setCond(cond + 1, true);
qs.setMemoStateEx(KILL_COUNT_ID, 0);
}
else
{
qs.setMemoStateEx(KILL_COUNT_ID, value);
}
}
}
else if (npc.getId() == RATEL)
{
if (cond == 6)
{
final int value = qs.getMemoStateEx(KILL_COUNT_ID) + 1;
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (value >= 2)
{
qs.setCond(cond + 1, true);
qs.setMemoStateEx(KILL_COUNT_ID, 0);
showOnScreenMsg(killer, NpcStringId.TALK_TO_AYANTHE_TO_LEAVE_THE_TRAINING_GROUNDS, ExShowScreenMessage.TOP_CENTER, 4500);
}
else
{
qs.setMemoStateEx(KILL_COUNT_ID, value);
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
}