Moved Talking Island scripts to zones package.
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
<html><body>Apprentice:<br>
|
||||
Have you seen the Dwarven Workshop here?<br>
|
||||
They're working on some kind of new product, and they're offering people a sneak peek at it.<br>
|
||||
It's not complete, or anything, so don't judge too harshly, but do you want to give it a go?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Apprentice rideKukuru">"Why not?"</Button>
|
||||
</body></html>
|
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Apprentice;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Apprentice AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
final class Apprentice extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int APPRENTICE = 33124;
|
||||
// Skill
|
||||
private static final SkillHolder KUKURU = new SkillHolder(9204, 1); // Kukuru
|
||||
|
||||
private Apprentice()
|
||||
{
|
||||
super(Apprentice.class.getSimpleName(), "ai/npc");
|
||||
addSpawnId(APPRENTICE);
|
||||
addStartNpc(APPRENTICE);
|
||||
addTalkId(APPRENTICE);
|
||||
addFirstTalkId(APPRENTICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("rideKukuru"))
|
||||
{
|
||||
if (!player.isTransformed())
|
||||
{
|
||||
KUKURU.getSkill().applyEffects(npc, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_T_RIDE_A_KUKURI_NOW);
|
||||
}
|
||||
}
|
||||
else if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TRY_RIDING_A_KUKURI, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 12000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Apprentice();
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Master Defender:<br>
|
||||
The <font color="LEVEL">Sigel Knight's</font> <font color="af9878">power is growing.</font>
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureKnight">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as a Sigel Knight.<br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.) </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureKnight">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You are not walking the Knight's path. You must seek the mark that is
|
||||
appropriate for you.<br> <font color="af9878">(Only Knight Class characters may
|
||||
Awaken <font color="LEVEL">as Sigel Knights</font>.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureKnight">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Sigel Knight</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Weapon/Force Master:<br>
|
||||
The <font color="LEVEL">Tyrr Warrior's</font> <font color="af9878">power is growing</font>.
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureWarrior">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as a Tyrr Warrior. <br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.) </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureWarrior">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">The path you walk is not that of a Warrior. Seek the mark that is
|
||||
appropriate for you.<br> <font color="af9878">(Only Warrior Class characters may
|
||||
Awaken as a Tyrr Warrior.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureWarrior">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Tyrr Warrior</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Dagger Master:<br>
|
||||
The <font color="LEVEL">Othell Rogue's</font> <font color="af9878">power is growing.</font>
|
||||
</body></html>
|
@@ -1,32 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureRogue">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as an Othell Rogue.<br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureRogue">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You do not walk the Rogue’s path. You must seek another that is
|
||||
appropriate for your class.<br> <font color="af9878">(Only Rogue Type Class
|
||||
characters may Awaken as an Othell Rogue.) </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureRogue">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Othell Rogue</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Bow/Crossbow Master:<br>
|
||||
The <font color="LEVEL">Yul Archer's </font><font color="af9878">power is growing</font>.
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureArcher">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as a Yul Archer. <br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.) </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureArcher">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You do not walk the Archer’s path. You must seek another that is
|
||||
appropriate for your class.<br> <font color="af9878">(Only Archer Class characters
|
||||
may Awaken as a Yul Archer.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureArcher">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Yul Archer</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Master Wizard: <br>
|
||||
The <font color="LEVEL">Feoh Wizard's</font> <font color="af9878">power is growing</font>.
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureWizard">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as a Feoh Wizard.<br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureWizard">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You do not walk the Wizard’s path. You must seek another that is
|
||||
appropriate for your class.<br> <font color="af9878">(Only Wizard Class characters
|
||||
may Awaken as a Feoh Wizard.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureWizard">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Feoh Wizard</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Buff Master:<br>
|
||||
The <font color="LEVEL">Iss Enchanter's</font> <font color="af9878">power is growing</font>.
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureEnchanter">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as an Iss Enchanter. <br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureEnchanter">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You do not walk the Enchanter’s path. You must seek another that is
|
||||
appropriate for your class.<br> <font color="af9878">(Only Enchanter Class
|
||||
characters may Awaken as an Iss Enchanter.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureEnchanter">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Iss Enchanter</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Master Summoner:<br>
|
||||
The <font color="LEVEL">Wynn Summoner's</font> <font color="af9878">power is growing</font>.
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureSummoner">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as a Wynn Summoner. <br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.) </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureSummoner">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You do not walk the Summoner’s path. You must seek another that is
|
||||
appropriate for your class.<br> <font color="af9878">(Only Summoner Class
|
||||
characters may Awaken as an Wynn Summoner.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureSummoner">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Wynn Summoner</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Master Defender:<br>
|
||||
The <font color="LEVEL">Aeore Wizard's</font> <font color="af9878">power is growing.</font>
|
||||
</body></html>
|
@@ -1,33 +0,0 @@
|
||||
<html>
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureHealer">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">It is not possible for you to Awaken as an Aeore Healer. <br>
|
||||
<font color="af9878">(Only characters level 85 or above who have completed their 3rd
|
||||
class transfer and possess the Scroll of Afterlife may Awaken.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292"
|
||||
background="L2UI_CT1.HtmlWnd_DF_TextureHealer">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr>
|
||||
<td height="150"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">You do not walk the Healer’s path. You must seek another that is
|
||||
appropriate for your class.<br> <font color="af9878">(Only Healer Class characters
|
||||
may Awaken as an Aeore Healer.)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body>
|
||||
</html>
|
@@ -1,19 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<!-- Edge Decoration Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" height="358" background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td>
|
||||
<!-- Class Mark Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="292" background="L2UI_CT1.HtmlWnd_DF_TextureHealer">
|
||||
<tr><td align="center">
|
||||
<!-- Text Table -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="272" height="338">
|
||||
<tr><td height="216"> </td></tr>
|
||||
<tr><td height="100" align="center" valign="bottom">You are brave to take this road!<br>Will you accept the help of the ancient hero Nabiarov and be awoken as a <font color="LEVEL">Aeore Healer</font>?</td></tr>
|
||||
<tr><td align="center"><button value="Awaken" action="bypass -h Quest AwakeningMaster awakening" width="200" height="31" back="L2UI_CT1.HtmlWnd_DF_Awake_Down" fore="L2UI_CT1.HtmlWnd_DF_Awake"></td></tr>
|
||||
</table>
|
||||
<!-- //Text Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Class Mark Table -->
|
||||
</td></tr></table>
|
||||
<!-- //Edge Decoration -->
|
||||
</body></html>
|
@@ -1,406 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.AwakeningMaster;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerChangeToAwakenedClass;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExChangeToAwakenedClass;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowUsm;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
import quests.Q10338_SeizeYourDestiny.Q10338_SeizeYourDestiny;
|
||||
import quests.Q10472_WindsOfFate_EncroachingShadows.Q10472_WindsOfFate_EncroachingShadows;
|
||||
|
||||
/**
|
||||
* AwakeningMaster AI.
|
||||
* @author Sdw
|
||||
*/
|
||||
public final class AwakeningMaster extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int SIGEL_MASTER = 33397;
|
||||
private static final int TYRR_MASTER = 33398;
|
||||
private static final int OTHELL_MASTER = 33399;
|
||||
private static final int YUL_MASTER = 33400;
|
||||
private static final int FEOH_MASTER = 33401;
|
||||
private static final int ISS_MASTER = 33402;
|
||||
private static final int WYNN_MASTER = 33403;
|
||||
private static final int AEORE_MASTER = 33404;
|
||||
// Skills
|
||||
private static final SkillHolder NPC_WYNN = new SkillHolder(16390, 1);
|
||||
private static final SkillHolder NPC_FEOH = new SkillHolder(16391, 1);
|
||||
private static final SkillHolder NPC_TYRR = new SkillHolder(16392, 1);
|
||||
private static final SkillHolder NPC_OTHELL = new SkillHolder(16393, 1);
|
||||
private static final SkillHolder NPC_YUL = new SkillHolder(16394, 1);
|
||||
private static final SkillHolder NPC_ISS = new SkillHolder(16395, 1);
|
||||
private static final SkillHolder NPC_SIGEL = new SkillHolder(16396, 1);
|
||||
private static final SkillHolder NPC_AEORE = new SkillHolder(16397, 1);
|
||||
// Items
|
||||
private static final int SCROLL_OF_AFTERLIFE = 17600;
|
||||
private static final int ABELIUS_POWER = 32264;
|
||||
private static final int SAPYROS_POWER = 32265;
|
||||
private static final int ASHAGEN_POWER = 32266;
|
||||
private static final int CRANIGG_POWER = 32267;
|
||||
private static final int SOLTKREIG_POWER = 32268;
|
||||
private static final int NAVIAROPE_POWER = 32269;
|
||||
private static final int LEISTER_POWER = 32270;
|
||||
private static final int LAKCIS_POWER = 32271;
|
||||
private static final int COUNTERFEIT_ATELIA = 40059;
|
||||
// Other
|
||||
private static final int AWAKENING_END_USM_ID = 10;
|
||||
|
||||
private AwakeningMaster()
|
||||
{
|
||||
super(AwakeningMaster.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(SIGEL_MASTER, TYRR_MASTER, OTHELL_MASTER, YUL_MASTER, FEOH_MASTER, ISS_MASTER, WYNN_MASTER, AEORE_MASTER);
|
||||
addTalkId(SIGEL_MASTER, TYRR_MASTER, OTHELL_MASTER, YUL_MASTER, FEOH_MASTER, ISS_MASTER, WYNN_MASTER, AEORE_MASTER);
|
||||
addFirstTalkId(SIGEL_MASTER, TYRR_MASTER, OTHELL_MASTER, YUL_MASTER, FEOH_MASTER, ISS_MASTER, WYNN_MASTER, AEORE_MASTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "awakening":
|
||||
{
|
||||
final QuestState qs2 = player.getQuestState(Q10338_SeizeYourDestiny.class.getSimpleName());
|
||||
if (hasQuestItems(player, SCROLL_OF_AFTERLIFE) && (player.getLevel() > 84) && (!player.isSubClassActive() || player.isDualClassActive()) && player.isInCategory(CategoryType.FOURTH_CLASS_GROUP) && (qs2 != null) && qs2.isCompleted())
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case SIGEL_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.SIGEL_CANDIDATE))
|
||||
{
|
||||
return SIGEL_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TYRR_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.TYRR_CANDIDATE))
|
||||
{
|
||||
return TYRR_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OTHELL_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.OTHELL_CANDIDATE))
|
||||
{
|
||||
return OTHELL_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case YUL_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.YUL_CANDIDATE))
|
||||
{
|
||||
return YUL_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FEOH_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.FEOH_CANDIDATE))
|
||||
{
|
||||
return FEOH_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ISS_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.ISS_CANDIDATE))
|
||||
{
|
||||
return ISS_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WYNN_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.WYNN_CANDIDATE))
|
||||
{
|
||||
return WYNN_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AEORE_MASTER:
|
||||
{
|
||||
if (!player.isInCategory(CategoryType.AEORE_CANDIDATE))
|
||||
{
|
||||
return AEORE_MASTER + "-no_class.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (ClassId newClass : player.getClassId().getNextClassIds())
|
||||
{
|
||||
player.sendPacket(new ExChangeToAwakenedClass(newClass.getId()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return npc.getId() + "-no.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getRace() != Race.ERTHEIA)
|
||||
{
|
||||
return npc.getId() + ".html";
|
||||
}
|
||||
|
||||
final QuestState qs3 = player.getQuestState(Q10472_WindsOfFate_EncroachingShadows.class.getSimpleName());
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
|
||||
switch (npc.getId())
|
||||
{
|
||||
case WYNN_MASTER:
|
||||
{
|
||||
if (qs3.isCond(8) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33403-01.html";
|
||||
npc.doCast(NPC_WYNN.getSkill());
|
||||
qs3.setCond(9, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FEOH_MASTER:
|
||||
{
|
||||
if (qs3.isCond(9) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33401-01.html";
|
||||
npc.doCast(NPC_FEOH.getSkill());
|
||||
qs3.setCond(10, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TYRR_MASTER:
|
||||
{
|
||||
if (qs3.isCond(10) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33398-01.html";
|
||||
npc.doCast(NPC_TYRR.getSkill());
|
||||
qs3.setCond(11, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OTHELL_MASTER:
|
||||
{
|
||||
if (qs3.isCond(11) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33399-01.html";
|
||||
npc.doCast(NPC_OTHELL.getSkill());
|
||||
qs3.setCond(12, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ISS_MASTER:
|
||||
{
|
||||
if (qs3.isCond(12) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33402-01.html";
|
||||
npc.doCast(NPC_ISS.getSkill());
|
||||
qs3.setCond(13, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case YUL_MASTER:
|
||||
{
|
||||
if (qs3.isCond(13) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33400-01.html";
|
||||
npc.doCast(NPC_YUL.getSkill());
|
||||
qs3.setCond(14, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SIGEL_MASTER:
|
||||
{
|
||||
if (qs3.isCond(14) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33397-01.html";
|
||||
npc.doCast(NPC_SIGEL.getSkill());
|
||||
qs3.setCond(15, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AEORE_MASTER:
|
||||
{
|
||||
if (qs3.isCond(15) && (getQuestItemsCount(player, COUNTERFEIT_ATELIA) >= 1))
|
||||
{
|
||||
htmltext = "33404-01.html";
|
||||
npc.doCast(NPC_AEORE.getSkill());
|
||||
qs3.setCond(16, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_PLAYER_CHANGE_TO_AWAKENED_CLASS)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void OnPlayerChangeToAwakenedClass(OnPlayerChangeToAwakenedClass event)
|
||||
{
|
||||
final L2PcInstance player = event.getActiveChar();
|
||||
|
||||
if (player.isSubClassActive() && !player.isDualClassActive())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((player.getLevel() < 85) || !player.isInCategory(CategoryType.FOURTH_CLASS_GROUP))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final QuestState st = player.getQuestState(Q10338_SeizeYourDestiny.class.getSimpleName());
|
||||
|
||||
if ((st == null) || !st.isCompleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AWAKEN_WHEN_YOU_ARE_A_HERO_OR_ON_THE_WAIT_LIST_FOR_HERO_STATUS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getInventory().getSize(false) >= (player.getInventoryLimit() * 0.8))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AWAKEN_DUE_TO_YOUR_CURRENT_INVENTORY_WEIGHT_PLEASE_ORGANIZE_YOUR_INVENTORY_AND_TRY_AGAIN_DWARVEN_CHARACTERS_MUST_BE_AT_20_OR_BELOW_THE_INVENTORY_MAX_TO_AWAKEN);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isMounted() || player.isTransformed())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_AWAKEN_WHILE_YOU_RE_TRANSFORMED_OR_RIDING);
|
||||
return;
|
||||
}
|
||||
|
||||
final L2ItemInstance item = player.getInventory().getItemByItemId(SCROLL_OF_AFTERLIFE);
|
||||
if (item == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player.destroyItem("Awakening", item, player, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (ClassId newClass : player.getClassId().getNextClassIds())
|
||||
{
|
||||
player.setClassId(newClass.getId());
|
||||
if (player.isDualClassActive())
|
||||
{
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClassId());
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setBaseClassId(player.getActiveClassId());
|
||||
}
|
||||
player.sendPacket(SystemMessageId.CONGRATULATIONS_YOU_VE_COMPLETED_A_CLASS_TRANSFER);
|
||||
final UserInfo ui = new UserInfo(player, false);
|
||||
ui.addComponentType(UserInfoType.BASIC_INFO);
|
||||
ui.addComponentType(UserInfoType.MAX_HPCPMP);
|
||||
player.sendPacket(ui);
|
||||
player.broadcastInfo();
|
||||
|
||||
int itemId = ABELIUS_POWER; // Sigel
|
||||
if (player.isInCategory(CategoryType.TYRR_GROUP))
|
||||
{
|
||||
itemId = SAPYROS_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.OTHELL_GROUP))
|
||||
{
|
||||
itemId = ASHAGEN_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.YUL_GROUP))
|
||||
{
|
||||
itemId = CRANIGG_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.FEOH_GROUP))
|
||||
{
|
||||
itemId = SOLTKREIG_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.ISS_GROUP))
|
||||
{
|
||||
itemId = NAVIAROPE_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.WYNN_GROUP))
|
||||
{
|
||||
itemId = LEISTER_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.AEORE_GROUP))
|
||||
{
|
||||
itemId = LAKCIS_POWER;
|
||||
}
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 20));
|
||||
giveItems(player, itemId, 1);
|
||||
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendSkillList();
|
||||
}
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(() ->
|
||||
{
|
||||
player.sendPacket(new ExShowUsm(AWAKENING_END_USM_ID));
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new AwakeningMaster();
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Hardin:<br><br>
|
||||
I sense there is little Power of God in you.<br>
|
||||
I'm afraid you don't qualify to receive the Power of God.<br>
|
||||
You'll have to go back.<br>
|
||||
(Awakening specialization is possible for the 3rd class through the Stone Statue of the Giant. You can use Fragments of Chaos after using all your <font color="af9878">Chaos Essence</font>.)<br>
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Hardin:<br><br>
|
||||
You've already obtained all the powers.<br>
|
||||
You don't even have any Chaos Essence for any class. You'll have to go back.<br>
|
||||
(Only characters who have the Chaos Essence appropriate for their class can select the Power of Chaos. Only after using all the Chaos Essence for your main class, can you change your dual class.)<br>
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Hardin the Agent of Chaos:<br>
|
||||
This place is a tomb for your soul. The <font color="LEVEL">strength of the giants</font> sleep here.<br>
|
||||
Why has an Ertheia of the Wind race come here?<br><Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest">Quest</Button>
|
||||
</body></html>
|
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Hardin;
|
||||
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Hardin AI.
|
||||
* @author Stayway
|
||||
*/
|
||||
final class Hardin extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int HARDIN = 33870;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
|
||||
private Hardin()
|
||||
{
|
||||
super(Hardin.class.getSimpleName(), "ai/npc");
|
||||
addFirstTalkId(HARDIN);
|
||||
addCondRace(Race.ERTHEIA, "no_race.html"); // TODO: Find proper HTML
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
|
||||
if ((player.getRace() != Race.ERTHEIA) && (player.getLevel() < MIN_LEVEL))
|
||||
{
|
||||
htmltext = "33870-01.html";
|
||||
}
|
||||
else if ((player.getRace() != Race.ERTHEIA) && CategoryData.getInstance().isInCategory(CategoryType.AWAKEN_GROUP, player.getBaseClassId()))
|
||||
{
|
||||
htmltext = "33870-02.html";
|
||||
}
|
||||
else if ((player.getRace() == Race.ERTHEIA) && (player.getLevel() >= MIN_LEVEL))
|
||||
{
|
||||
htmltext = "33870-03.html";
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Hardin();
|
||||
}
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Milia;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Milia AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
final class Milia extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MILIA = 30006;
|
||||
// Locations
|
||||
private static final Location GLUDIO_AIRSHIP = new Location(-149406, 255247, -80);
|
||||
|
||||
private Milia()
|
||||
{
|
||||
super(Milia.class.getSimpleName(), "ai/npc");
|
||||
addSpawnId(MILIA);
|
||||
addStartNpc(MILIA);
|
||||
addTalkId(MILIA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("gludioAirship"))
|
||||
{
|
||||
player.teleToLocation(GLUDIO_AIRSHIP);
|
||||
}
|
||||
else if (event.equals("TEXT_SPAM") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.SPEAK_WITH_ME_ABOUT_TRAVELING_AROUND_ADEN, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("TEXT_SPAM", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Milia();
|
||||
}
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
The skills that were once given to each race to balance their power have been taken back. Through the will of Chaos, you can learn the skills of other races as long as you have a Chaos Pomander.<br>
|
||||
Chaos Pomander is a crystal of power that can combine anything. If you have one, you have been selected by my master to work for a balanced world.<br>
|
||||
Are you ready for that world? If so, select the Revelation of Chaos, and through it a power appropriate for you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MonkOfChaos LearnRevelationSkills">Receive the Revelation of Chaos.</Button><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MonkOfChaos CancelRevelationSkills">Reset the Revelation skill.(100,000,000 Adena)</Button><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MonkOfChaos 33880-2.html">"Who are Monks of Chaos?"</Button><br>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
We, the Monks of Chaos, serve the balance.<br>
|
||||
You may think chaos is a destructive force, but nothing could be further from the truth.
|
||||
<font color="LEVEL">Chaos</font> seeks to balance light and darkness by reverting them to the original energies.<br>
|
||||
We who respect his will are the only ones truly free to act on it.
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
Nothing could be created or destroyed without chaos. It is the beginning and the end of all things.<br>
|
||||
We, the Monks of Chaos, understand this. It is the law of the universe.<br>
|
||||
If you wish, we will reveal our master's will to you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest MonkOfChaos 33880-1.html">"So tell me about this Revelation of Chaos."</Button>
|
||||
</body></html>
|
@@ -1,179 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.MonkOfChaos;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.SubclassType;
|
||||
import com.l2jmobius.gameserver.model.L2SkillLearn;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.base.AcquireSkillType;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExAcquirableSkillListByClass;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Monk of Chaos AI.
|
||||
* @author Sdw
|
||||
*/
|
||||
final class MonkOfChaos extends AbstractNpcAI
|
||||
{
|
||||
private static final int MONK_OF_CHAOS = 33880;
|
||||
private static final int MIN_LEVEL = 85;
|
||||
private static final long CANCEL_FEE = 100000000;
|
||||
private static final int CHAOS_POMANDER = 37374;
|
||||
private static final int CHAOS_POMANDER_DUALCLASS = 37375;
|
||||
private static final String[] REVELATION_VAR_NAMES =
|
||||
{
|
||||
"RevelationSkill1",
|
||||
"RevelationSkill2"
|
||||
};
|
||||
|
||||
private static final String[] DUALCLASS_REVELATION_VAR_NAMES =
|
||||
{
|
||||
"DualclassRevelationSkill1",
|
||||
"DualclassRevelationSkill2"
|
||||
};
|
||||
|
||||
private MonkOfChaos()
|
||||
{
|
||||
super(MonkOfChaos.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(MONK_OF_CHAOS);
|
||||
addTalkId(MONK_OF_CHAOS);
|
||||
addFirstTalkId(MONK_OF_CHAOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "33880-1.html":
|
||||
case "33880-2.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "LearnRevelationSkills":
|
||||
{
|
||||
if ((player.getLevel() < MIN_LEVEL) || !player.isInCategory(CategoryType.AWAKEN_GROUP))
|
||||
{
|
||||
htmltext = "no-learn.html";
|
||||
break;
|
||||
}
|
||||
|
||||
if (player.isSubClassActive() && !player.isDualClassActive())
|
||||
{
|
||||
htmltext = "no-subclass.html";
|
||||
break;
|
||||
}
|
||||
|
||||
if (player.isDualClassActive())
|
||||
{
|
||||
final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailableRevelationSkills(player, SubclassType.DUALCLASS);
|
||||
|
||||
if (skills.size() > 0)
|
||||
{
|
||||
player.sendPacket(new ExAcquirableSkillListByClass(skills, AcquireSkillType.REVELATION_DUALCLASS));
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(SystemMessageId.THERE_ARE_NO_OTHER_SKILLS_TO_LEARN);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailableRevelationSkills(player, SubclassType.BASECLASS);
|
||||
|
||||
if (skills.size() > 0)
|
||||
{
|
||||
player.sendPacket(new ExAcquirableSkillListByClass(skills, AcquireSkillType.REVELATION));
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(SystemMessageId.THERE_ARE_NO_OTHER_SKILLS_TO_LEARN);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "CancelRevelationSkills":
|
||||
{
|
||||
if (player.isSubClassActive() && !player.isDualClassActive())
|
||||
{
|
||||
htmltext = "no-subclass.html";
|
||||
break;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
|
||||
final String[] varNames = player.isDualClassActive() ? DUALCLASS_REVELATION_VAR_NAMES : REVELATION_VAR_NAMES;
|
||||
final int chaosPomander = player.isDualClassActive() ? CHAOS_POMANDER_DUALCLASS : CHAOS_POMANDER;
|
||||
|
||||
for (String varName : varNames)
|
||||
{
|
||||
if (player.getVariables().getInt(varName, 0) > 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if ((player.getLevel() < MIN_LEVEL) || !player.isInCategory(CategoryType.AWAKEN_GROUP) || (count == 0))
|
||||
{
|
||||
htmltext = "no-cancel.html";
|
||||
break;
|
||||
}
|
||||
|
||||
if (player.getAdena() < CANCEL_FEE)
|
||||
{
|
||||
htmltext = "no-adena.html";
|
||||
break;
|
||||
}
|
||||
|
||||
for (String varName : varNames)
|
||||
{
|
||||
final int skillId = player.getVariables().getInt(varName, 0);
|
||||
final Skill sk = SkillData.getInstance().getSkill(skillId, 1);
|
||||
if (sk != null)
|
||||
{
|
||||
player.removeSkill(sk);
|
||||
player.getVariables().remove(varName);
|
||||
giveItems(player, chaosPomander, count);
|
||||
}
|
||||
}
|
||||
|
||||
htmltext = "canceled.html";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MonkOfChaos();
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
Heh! The Revelation of Chaos has been canceled. But you can pass it again when you come back to your senses.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
You do not have enough <font color="level">Adena</font> to cancel the Revelation of Chaos.<br>
|
||||
Come back another time.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
You cannot cancel the Revelation of Chaos, because you have not passed it.<br>
|
||||
Come back another time.
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
You are not strong enough to fulfill the Revelation of Chaos.<br>
|
||||
Come back another time.<br>
|
||||
(Available only to Awaken characters level 85 or above.)
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Monk of Chaos:<br>
|
||||
The skills that weYou are not strong enough to fulfill the Revelation of Chaos.<br>
|
||||
Come back another time.<br>
|
||||
(Not available on subclasses.)
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
The Airborne Island came crashing down here, but it was the Giants' ruins that got everyone's attention.<br>
|
||||
Aden hired scholars and workers, and the town was quickly reconstructed as a mishmash of two architectural philosophies.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Your level is not sufficient for the museum. Come back when you are qualified.<br>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Pantheon:<br>
|
||||
Welcome to the Talking Island! Ask me anything you need to know.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Pantheon teleport_museum">"I want to go inside the museum."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Pantheon 32972-1.html">"Can you tell me about Talking Island?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Pantheon;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare;
|
||||
|
||||
/**
|
||||
* Pantheon AI.
|
||||
* @author Gladicek
|
||||
*/
|
||||
final class Pantheon extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int PANTHEON = 32972;
|
||||
// Location
|
||||
private static final Location MUSEUM = new Location(-114711, 243911, -7968);
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 6;
|
||||
|
||||
private Pantheon()
|
||||
{
|
||||
super(Pantheon.class.getSimpleName(), "ai/npc");
|
||||
addSpawnId(PANTHEON);
|
||||
addStartNpc(PANTHEON);
|
||||
addFirstTalkId(PANTHEON);
|
||||
addTalkId(PANTHEON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32972-1.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "teleport_museum":
|
||||
{
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
player.teleToLocation(MUSEUM);
|
||||
break;
|
||||
}
|
||||
htmltext = "32972-noteleport.html";
|
||||
break;
|
||||
}
|
||||
case "TEXT_SPAM":
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IS_IT_BETTER_TO_END_DESTINY_OR_START_DESTINY);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10320_LetsGoToTheCentralSquare.class.getSimpleName());
|
||||
if (qs == null)
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.BEGIN_TUTORIAL_QUESTS, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
}
|
||||
return super.onFirstTalk(npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("TEXT_SPAM", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Pantheon();
|
||||
}
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
<html><head><body>Subclass/Dual Class Master Raina:<br>
|
||||
So you need to <font color="LEVEL">create/reset a subclass</font>?<br>
|
||||
<font color="af9878">A new class subclass starts at </font><font color="LEVEL">level 40</font><font color="af9878">.<br>
|
||||
</font><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addSubclass">"I'll add a new subclass (create new)."</Button><br>
|
||||
(<font color="af9878">Change dual classes and your level will be </font><font color="LEVEL">reset to level 40</font><font color="af9878">.)<br>
|
||||
</font><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina removeSubclass">"I'll eliminate a subclass and add another one (reset)."</Button><br>
|
||||
<font color="LEVEL">Maintain your level while changing classes</font><font color="af9878">.<br>
|
||||
</font><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina changeSubclass">"I'll change my subclass (requires Subclass Change Certificate)."</Button>
|
||||
</body></html>
|
@@ -1,7 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br>
|
||||
I heard that Ertheia are curious people. But a gem that absorbs power... I still can't help thinking that it's really dangerous. You could have died. <br>
|
||||
But thanks to your efforts, even Ertheia can use the power of the giants now.<br>
|
||||
But because you're different than the race from the Material Realm, your power will not merge with the giants'. Because they do not mingle, you will not be able to use your power while using the giants' power. Of course, you can use your original power instead of the giants' power anytime you wish.<br>
|
||||
Now! Would you like to use the power of the giants?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina ertheiaDualClass">"Yes, on with a dual class!"</Button>
|
||||
</body></html>
|
@@ -1,7 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br>
|
||||
Hello!<br1>
|
||||
I will be assisting you with <font color="LEVEL">reawakening an Awakened dual class</font>.<br1>
|
||||
To reawaken a dual class, you need to have an Awakened dual class. After reawakening, your level will be reduced to level 85, and all the skills you've learned will be forgotten.<br>
|
||||
(<font color="af9878">Change dual classes and your level will be </font><font color="LEVEL">reset to level 85</font><font color="af9878"></font>).<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawekenDualclass">"I'll reawaken."</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br>
|
||||
So you want to know about <font color="LEVEL">items designated for a dual class</font>?<br1>
|
||||
They're for those who grow their dual class powers beyond imaginable limits.<br1>
|
||||
You can purchase as many as you want, but <font color="LEVEL">you have to be at certain level with your main and dual classes in order to use them</font>.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2027">"Let me take a look at the items for dual classes."</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body> Subclass/Dual Class Master Raina:<br><br>
|
||||
Hello!<br>
|
||||
I'm collecting XP Bottles.<br>
|
||||
I'll give you items if you bring me XP Bottles, how's that?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 857">"I have XP bottles right here."</Button>
|
||||
</body> </html>
|
@@ -1,10 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br>
|
||||
Hello!<br1>
|
||||
You have a question about subclass or dual class?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina 33491-01.html">"Yeah. How do I create or reset a subclass?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina 33491-02.html">"I want to add a dual class." (for Ertheia only)</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina 33491-03.html">"Can I reawaken my Awakened dual class?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina 33491-04.html">"So...what are the items for dual classes?" </Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina 33491-05.html">"What's with these XP Bottles?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
857
trunk/dist/game/data/scripts/ai/npc/Raina/Raina.java
vendored
857
trunk/dist/game/data/scripts/ai/npc/Raina/Raina.java
vendored
@@ -1,857 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Raina;
|
||||
|
||||
import static com.l2jmobius.gameserver.model.base.ClassLevel.THIRD;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumMap;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
import com.l2jmobius.gameserver.model.base.ClassLevel;
|
||||
import com.l2jmobius.gameserver.model.base.PlayerClass;
|
||||
import com.l2jmobius.gameserver.model.base.SubClass;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.Id;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMenuSelect;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Raina AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Raina extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int RAINA = 33491;
|
||||
// Items
|
||||
private static final int SUBCLASS_CERTIFICATE = 30433;
|
||||
private static final int ABELIUS_POWER = 32264;
|
||||
private static final int SAPYROS_POWER = 32265;
|
||||
private static final int ASHAGEN_POWER = 32266;
|
||||
private static final int CRANIGG_POWER = 32267;
|
||||
private static final int SOLTKREIG_POWER = 32268;
|
||||
private static final int NAVIAROPE_POWER = 32269;
|
||||
private static final int LEISTER_POWER = 32270;
|
||||
private static final int LAKCIS_POWER = 32271;
|
||||
// Misc
|
||||
private static final Set<PlayerClass> mainSubclassSet;
|
||||
private static final Set<PlayerClass> neverSubclassed = EnumSet.of(PlayerClass.Overlord, PlayerClass.Warsmith);
|
||||
private static final Set<PlayerClass> subclasseSet1 = EnumSet.of(PlayerClass.DarkAvenger, PlayerClass.Paladin, PlayerClass.TempleKnight, PlayerClass.ShillienKnight);
|
||||
private static final Set<PlayerClass> subclasseSet2 = EnumSet.of(PlayerClass.TreasureHunter, PlayerClass.AbyssWalker, PlayerClass.Plainswalker);
|
||||
private static final Set<PlayerClass> subclasseSet3 = EnumSet.of(PlayerClass.Hawkeye, PlayerClass.SilverRanger, PlayerClass.PhantomRanger);
|
||||
private static final Set<PlayerClass> subclasseSet4 = EnumSet.of(PlayerClass.Warlock, PlayerClass.ElementalSummoner, PlayerClass.PhantomSummoner);
|
||||
private static final Set<PlayerClass> subclasseSet5 = EnumSet.of(PlayerClass.Sorceror, PlayerClass.Spellsinger, PlayerClass.Spellhowler);
|
||||
private static final EnumMap<PlayerClass, Set<PlayerClass>> subclassSetMap = new EnumMap<>(PlayerClass.class);
|
||||
static
|
||||
{
|
||||
final Set<PlayerClass> subclasses = PlayerClass.getSet(null, THIRD);
|
||||
subclasses.removeAll(neverSubclassed);
|
||||
mainSubclassSet = subclasses;
|
||||
subclassSetMap.put(PlayerClass.DarkAvenger, subclasseSet1);
|
||||
subclassSetMap.put(PlayerClass.Paladin, subclasseSet1);
|
||||
subclassSetMap.put(PlayerClass.TempleKnight, subclasseSet1);
|
||||
subclassSetMap.put(PlayerClass.ShillienKnight, subclasseSet1);
|
||||
subclassSetMap.put(PlayerClass.TreasureHunter, subclasseSet2);
|
||||
subclassSetMap.put(PlayerClass.AbyssWalker, subclasseSet2);
|
||||
subclassSetMap.put(PlayerClass.Plainswalker, subclasseSet2);
|
||||
subclassSetMap.put(PlayerClass.Hawkeye, subclasseSet3);
|
||||
subclassSetMap.put(PlayerClass.SilverRanger, subclasseSet3);
|
||||
subclassSetMap.put(PlayerClass.PhantomRanger, subclasseSet3);
|
||||
subclassSetMap.put(PlayerClass.Warlock, subclasseSet4);
|
||||
subclassSetMap.put(PlayerClass.ElementalSummoner, subclasseSet4);
|
||||
subclassSetMap.put(PlayerClass.PhantomSummoner, subclasseSet4);
|
||||
subclassSetMap.put(PlayerClass.Sorceror, subclasseSet5);
|
||||
subclassSetMap.put(PlayerClass.Spellsinger, subclasseSet5);
|
||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||
}
|
||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||
{
|
||||
classCloak.put(CategoryType.SIGEL_GROUP, 30310); // Abelius Cloak
|
||||
classCloak.put(CategoryType.TYRR_GROUP, 30311); // Sapyros Cloak Grade
|
||||
classCloak.put(CategoryType.OTHELL_GROUP, 30312); // Ashagen Cloak Grade
|
||||
classCloak.put(CategoryType.YUL_GROUP, 30313); // Cranigg Cloak Grade
|
||||
classCloak.put(CategoryType.FEOH_GROUP, 30314); // Soltkreig Cloak Grade
|
||||
classCloak.put(CategoryType.ISS_GROUP, 30315); // Naviarope Cloak Grade
|
||||
classCloak.put(CategoryType.WYNN_GROUP, 30316); // Leister Cloak Grade
|
||||
classCloak.put(CategoryType.AEORE_GROUP, 30317); // Laksis Cloak Grade
|
||||
}
|
||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||
{
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.othellAdventurer, PlayerClass.othellWindRider, PlayerClass.othellGhostHunter, PlayerClass.othellFortuneSeeker));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.yulSagittarius, PlayerClass.yulMoonlightSentinel, PlayerClass.yulGhostSentinel, PlayerClass.yulTrickster));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.feohArchmage, PlayerClass.feohSoultaker, PlayerClass.feohMysticMuse, PlayerClass.feoStormScreamer, PlayerClass.feohSoulHound));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.issHierophant, PlayerClass.issSwordMuse, PlayerClass.issSpectralDancer, PlayerClass.issDoomcryer));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.wynnArcanaLord, PlayerClass.wynnElementalMaster, PlayerClass.wynnSpectralMaster));
|
||||
dualClassList.addAll(Arrays.asList(PlayerClass.aeoreCardinal, PlayerClass.aeoreEvaSaint, PlayerClass.aeoreShillienSaint));
|
||||
}
|
||||
// @formatter:off
|
||||
private static final int[] REAWAKEN_PRICE =
|
||||
{
|
||||
100_000_000, 90_000_000, 80_000_000, 70_000_000, 60_000_000, 50_000_000, 40_000_000, 30_000_000, 20_000_000, 10_000_000
|
||||
};
|
||||
// @formatter:on
|
||||
|
||||
private Raina()
|
||||
{
|
||||
super(Raina.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(RAINA);
|
||||
addFirstTalkId(RAINA);
|
||||
addTalkId(RAINA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "33491-01.html":
|
||||
case "33491-02.html":
|
||||
case "33491-03.html":
|
||||
case "33491-04.html":
|
||||
case "33491-05.html":
|
||||
case "reawakenCancel.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "addSubclass":
|
||||
{
|
||||
if (player.isTransformed())
|
||||
{
|
||||
htmltext = "noTransform.html";
|
||||
break;
|
||||
}
|
||||
else if (player.hasSummon())
|
||||
{
|
||||
htmltext = "noSummon.html";
|
||||
break;
|
||||
}
|
||||
else if (player.getRace() == Race.ERTHEIA)
|
||||
{
|
||||
htmltext = "noErtheia.html";
|
||||
break;
|
||||
}
|
||||
else if (!haveDoneQuest(player) && Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS && !player.isGM())
|
||||
{
|
||||
htmltext = "noQuest.html";
|
||||
break;
|
||||
}
|
||||
else if (!hasAllSubclassLeveled(player) || (player.getTotalSubClasses() >= Config.MAX_SUBCLASS))
|
||||
{
|
||||
htmltext = "addFailed.html";
|
||||
break;
|
||||
}
|
||||
else if (!player.isInventoryUnder90(true) || (player.getWeightPenalty() >= 2))
|
||||
{
|
||||
htmltext = "inventoryLimit.html";
|
||||
break;
|
||||
}
|
||||
|
||||
final Set<PlayerClass> availSubs = getAvailableSubClasses(player);
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "subclassList.html");
|
||||
|
||||
if ((availSubs == null) || availSubs.isEmpty())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
for (PlayerClass subClass : availSubs)
|
||||
{
|
||||
if (subClass != null)
|
||||
{
|
||||
final int classId = subClass.ordinal();
|
||||
final int npcStringId = 11170000 + classId;
|
||||
sb.append("<fstring p1=\"0\" p2=\"" + classId + "\">" + npcStringId + "</fstring>");
|
||||
}
|
||||
}
|
||||
html.replace("%subclassList%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case "removeSubclass":
|
||||
{
|
||||
if (player.isTransformed())
|
||||
{
|
||||
htmltext = "noTransform.html";
|
||||
break;
|
||||
}
|
||||
else if (player.hasSummon())
|
||||
{
|
||||
htmltext = "noSummon.html";
|
||||
break;
|
||||
}
|
||||
else if (player.getRace() == Race.ERTHEIA)
|
||||
{
|
||||
htmltext = "noErtheia.html";
|
||||
break;
|
||||
}
|
||||
else if (!player.isInventoryUnder90(true) || (player.getWeightPenalty() >= 2))
|
||||
{
|
||||
htmltext = "inventoryLimit.html";
|
||||
break;
|
||||
}
|
||||
else if (player.getSubClasses().isEmpty())
|
||||
{
|
||||
htmltext = "noSubChange.html";
|
||||
break;
|
||||
}
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "subclassRemoveList.html");
|
||||
|
||||
for (SubClass subClass : player.getSubClasses().values())
|
||||
{
|
||||
if (subClass != null)
|
||||
{
|
||||
final int classId = subClass.getClassId();
|
||||
final int npcStringId = 11170000 + classId;
|
||||
sb.append("<fstring p1=\"2\" p2=\"" + subClass.getClassIndex() + "\">" + npcStringId + "</fstring>");
|
||||
}
|
||||
}
|
||||
html.replace("%removeList%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case "changeSubclass":
|
||||
{
|
||||
if (player.isTransformed())
|
||||
{
|
||||
htmltext = "noTransform.html";
|
||||
break;
|
||||
}
|
||||
else if (player.hasSummon())
|
||||
{
|
||||
htmltext = "noSummon.html";
|
||||
break;
|
||||
}
|
||||
else if (player.getRace() == Race.ERTHEIA)
|
||||
{
|
||||
htmltext = "noErtheia.html";
|
||||
break;
|
||||
}
|
||||
else if (player.getSubClasses().isEmpty())
|
||||
{
|
||||
htmltext = "noSubChange.html";
|
||||
break;
|
||||
}
|
||||
else if (!hasQuestItems(player, SUBCLASS_CERTIFICATE))
|
||||
{
|
||||
htmltext = "noCertificate.html";
|
||||
break;
|
||||
}
|
||||
|
||||
player.sendMessage("Not done yet.");
|
||||
break;
|
||||
}
|
||||
case "ertheiaDualClass":
|
||||
{
|
||||
if ((player.getRace() != Race.ERTHEIA) || (player.getLevel() < 85) || player.hasDualClass())
|
||||
{
|
||||
htmltext = "addDualClassErtheiaFailed.html";
|
||||
break;
|
||||
}
|
||||
htmltext = "addDualClassErtheia.html";
|
||||
break;
|
||||
}
|
||||
case "addDualClass_SIGEL_GROUP":
|
||||
case "addDualClass_TYRR_GROUP":
|
||||
case "addDualClass_OTHELL_GROUP":
|
||||
case "addDualClass_YUL_GROUP":
|
||||
case "addDualClass_FEOH_GROUP":
|
||||
case "addDualClass_ISS_GROUP":
|
||||
case "addDualClass_WYNN_GROUP":
|
||||
case "addDualClass_AEORE_GROUP":
|
||||
{
|
||||
final CategoryType cType = CategoryType.valueOf(event.replace("addDualClass_", ""));
|
||||
|
||||
if (cType == null)
|
||||
{
|
||||
_log.log(Level.WARNING, getClass().getSimpleName() + ": Cannot parse CategoryType, event: " + event);
|
||||
}
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addDualClassErtheiaList.html");
|
||||
|
||||
for (PlayerClass dualClasses : getDualClasses(player, cType))
|
||||
{
|
||||
if (dualClasses != null)
|
||||
{
|
||||
sb.append("<button value=\"" + ClassListData.getInstance().getClass(dualClasses.ordinal()).getClassName() + "\" action=\"bypass -h menu_select?ask=6&reply=" + dualClasses.ordinal() + "\" width=\"200\" height=\"31\" back=\"L2UI_CT1.HtmlWnd_DF_Awake_Down\" fore=\"L2UI_CT1.HtmlWnd_DF_Awake\"><br>");
|
||||
}
|
||||
}
|
||||
html.replace("%dualclassList%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case "reawekenDualclass":
|
||||
{
|
||||
if (player.isTransformed())
|
||||
{
|
||||
htmltext = "noTransform.html";
|
||||
break;
|
||||
}
|
||||
else if (player.hasSummon())
|
||||
{
|
||||
htmltext = "noSummon.html";
|
||||
break;
|
||||
}
|
||||
else if (!player.hasDualClass() || !player.isDualClassActive() || (player.getClassId().level() != ClassLevel.AWAKEN.ordinal()))
|
||||
{
|
||||
htmltext = "reawakenNoDual.html";
|
||||
break;
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawaken.html");
|
||||
final int index = player.getLevel() > 94 ? REAWAKEN_PRICE.length - 1 : player.getLevel() - 85;
|
||||
html.replace("%price%", REAWAKEN_PRICE[index]);
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case "reawakenDualclassConfirm":
|
||||
{
|
||||
final int index = player.getLevel() > 94 ? REAWAKEN_PRICE.length - 1 : player.getLevel() - 85;
|
||||
if (player.isTransformed())
|
||||
{
|
||||
htmltext = "noTransform.html";
|
||||
break;
|
||||
}
|
||||
else if (player.hasSummon())
|
||||
{
|
||||
htmltext = "noSummon.html";
|
||||
break;
|
||||
}
|
||||
else if (!player.hasDualClass() || !player.isDualClassActive() || (player.getClassId().level() != ClassLevel.AWAKEN.ordinal()))
|
||||
{
|
||||
htmltext = "reawakenNoDual.html";
|
||||
break;
|
||||
}
|
||||
else if ((player.getAdena() < REAWAKEN_PRICE[index]) || !hasQuestItems(player, getCloakId(player)))
|
||||
{
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawakenNoFee.html");
|
||||
html.replace("%price%", REAWAKEN_PRICE[index]);
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawakenList.html");
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case "reawaken_SIGEL_GROUP":
|
||||
case "reawaken_TYRR_GROUP":
|
||||
case "reawaken_OTHELL_GROUP":
|
||||
case "reawaken_YUL_GROUP":
|
||||
case "reawaken_FEOH_GROUP":
|
||||
case "reawaken_ISS_GROUP":
|
||||
case "reawaken_WYNN_GROUP":
|
||||
case "reawaken_AEORE_GROUP":
|
||||
{
|
||||
final CategoryType cType = CategoryType.valueOf(event.replace("reawaken_", ""));
|
||||
|
||||
if (cType == null)
|
||||
{
|
||||
_log.log(Level.WARNING, getClass().getSimpleName() + ": Cannot parse CategoryType, event: " + event);
|
||||
}
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawakenClassList.html");
|
||||
|
||||
for (PlayerClass dualClasses : getDualClasses(player, cType))
|
||||
{
|
||||
if (dualClasses != null)
|
||||
{
|
||||
sb.append("<button value=\"" + ClassListData.getInstance().getClass(dualClasses.ordinal()).getClassName() + "\" action=\"bypass -h menu_select?ask=5&reply=" + dualClasses.ordinal() + "\" width=\"200\" height=\"31\" back=\"L2UI_CT1.HtmlWnd_DF_Awake_Down\" fore=\"L2UI_CT1.HtmlWnd_DF_Awake\"><br>");
|
||||
}
|
||||
}
|
||||
html.replace("%dualclassList%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_NPC_MENU_SELECT)
|
||||
@RegisterType(ListenerRegisterType.NPC)
|
||||
@Id(RAINA)
|
||||
public final void OnNpcMenuSelect(OnNpcMenuSelect event)
|
||||
{
|
||||
final L2PcInstance player = event.getTalker();
|
||||
final L2Npc npc = event.getNpc();
|
||||
switch (event.getAsk())
|
||||
{
|
||||
case 0: // Add subclass confirm menu
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addConfirm.html");
|
||||
|
||||
if (!isValidNewSubClass(player, classId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int npcStringId = 11170000 + classId;
|
||||
sb.append("<fstring p1=\"1\" p2=\"" + classId + "\">" + npcStringId + "</fstring>");
|
||||
html.replace("%confirmButton%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case 1: // Add subclass
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
if (!isValidNewSubClass(player, classId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player.addSubClass(classId, player.getTotalSubClasses() + 1, false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.setActiveClass(player.getTotalSubClasses());
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.NEW_SLOT_USED));
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED);
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "addSuccess.html"));
|
||||
break;
|
||||
}
|
||||
case 2: // Remove (change) subclass list
|
||||
{
|
||||
final int subclassIndex = event.getReply();
|
||||
final Set<PlayerClass> availSubs = getAvailableSubClasses(player);
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "removeSubclassList.html");
|
||||
|
||||
if ((availSubs == null) || availSubs.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (PlayerClass subClass : availSubs)
|
||||
{
|
||||
if (subClass != null)
|
||||
{
|
||||
final int classId = subClass.ordinal();
|
||||
final int npcStringId = 11170000 + classId;
|
||||
sb.append("<fstring p1=\"3\" p2=\"" + classId + "\">" + npcStringId + "</fstring>");
|
||||
}
|
||||
}
|
||||
npc.getVariables().set("SUBCLASS_INDEX_" + player.getObjectId(), subclassIndex);
|
||||
html.replace("%subclassList%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case 3: // Remove (change) subclass confirm menu
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
final int classIndex = npc.getVariables().getInt("SUBCLASS_INDEX_" + player.getObjectId(), -1);
|
||||
if (classIndex < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addConfirm2.html");
|
||||
final int npcStringId = 11170000 + classId;
|
||||
sb.append("<fstring p1=\"4\" p2=\"" + classId + "\">" + npcStringId + "</fstring>");
|
||||
html.replace("%confirmButton%", sb.toString());
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
case 4: // Remove (change) subclass
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
final int classIndex = npc.getVariables().getInt("SUBCLASS_INDEX_" + player.getObjectId(), -1);
|
||||
if (classIndex < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.modifySubClass(classIndex, classId, false))
|
||||
{
|
||||
player.abortCast();
|
||||
player.stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||
player.stopAllEffectsNotStayOnSubclassChange();
|
||||
player.stopCubics();
|
||||
player.setActiveClass(classIndex);
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED));
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "addSuccess.html"));
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5: // Reawaken (change dual class)
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
if (player.isTransformed() || player.hasSummon() || !player.hasDualClass() || !player.isDualClassActive() || (player.getClassId().level() != ClassLevel.AWAKEN.ordinal()))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Validating classId
|
||||
if (!getDualClasses(player, null).contains(PlayerClass.values()[classId]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
final int index = player.getLevel() > 94 ? REAWAKEN_PRICE.length - 1 : player.getLevel() - 85;
|
||||
if ((player.getAdena() < REAWAKEN_PRICE[index]) || !hasQuestItems(player, getCloakId(player)))
|
||||
{
|
||||
final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawakenNoFee.html");
|
||||
html.replace("%price%", REAWAKEN_PRICE[index]);
|
||||
player.sendPacket(html);
|
||||
break;
|
||||
}
|
||||
|
||||
player.reduceAdena(getClass().getSimpleName() + "_Reawaken", REAWAKEN_PRICE[index], npc, true);
|
||||
takeItems(player, getCloakId(player), 1);
|
||||
|
||||
final int classIndex = player.getClassIndex();
|
||||
if (player.modifySubClass(classIndex, classId, true))
|
||||
{
|
||||
player.abortCast();
|
||||
player.stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||
player.stopAllEffectsNotStayOnSubclassChange();
|
||||
player.stopCubics();
|
||||
player.setActiveClass(classIndex);
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED));
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "reawakenSuccess.html"));
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendSkillList();
|
||||
addPowerItem(player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 6: // Add dual class for ertheia
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
if (player.isTransformed() || player.hasSummon())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Validating classId
|
||||
if (!getDualClasses(player, null).contains(PlayerClass.values()[classId]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (player.addSubClass(classId, player.getTotalSubClasses() + 1, true))
|
||||
{
|
||||
player.setActiveClass(player.getTotalSubClasses());
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.NEW_SLOT_USED));
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED);
|
||||
player.sendPacket(getNpcHtmlMessage(player, npc, "addSuccess.html"));
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendSkillList();
|
||||
addPowerItem(player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addPowerItem(L2PcInstance player)
|
||||
{
|
||||
int itemId = ABELIUS_POWER; // Sigel
|
||||
if (player.isInCategory(CategoryType.TYRR_GROUP))
|
||||
{
|
||||
itemId = SAPYROS_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.OTHELL_GROUP))
|
||||
{
|
||||
itemId = ASHAGEN_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.YUL_GROUP))
|
||||
{
|
||||
itemId = CRANIGG_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.FEOH_GROUP))
|
||||
{
|
||||
itemId = SOLTKREIG_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.ISS_GROUP))
|
||||
{
|
||||
itemId = NAVIAROPE_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.WYNN_GROUP))
|
||||
{
|
||||
itemId = LEISTER_POWER;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.AEORE_GROUP))
|
||||
{
|
||||
itemId = LAKCIS_POWER;
|
||||
}
|
||||
giveItems(player, itemId, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of available subclasses Base class and already used subclasses removed
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
private Set<PlayerClass> getAvailableSubClasses(L2PcInstance player)
|
||||
{
|
||||
final int currentBaseId = player.getBaseClassId();
|
||||
final ClassId baseCID = ClassId.getClassId(currentBaseId);
|
||||
final int baseClassId = (baseCID.level() > 2) ? baseCID.getParent().ordinal() : currentBaseId;
|
||||
|
||||
final Set<PlayerClass> availSubs = getSubclasses(player, baseClassId);
|
||||
|
||||
if ((availSubs != null) && !availSubs.isEmpty())
|
||||
{
|
||||
for (PlayerClass pclass : availSubs)
|
||||
{
|
||||
// scan for already used subclasses
|
||||
for (SubClass subList : player.getSubClasses().values())
|
||||
{
|
||||
if (ClassId.getClassId(subList.getClassId()).equalsOrChildOf(ClassId.getClassId(pclass.ordinal())))
|
||||
{
|
||||
availSubs.remove(pclass);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return availSubs;
|
||||
}
|
||||
|
||||
private boolean haveDoneQuest(L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = player.getQuestState("Q10385_RedThreadOfFate"); // TODO: Replace with class name
|
||||
return (qs != null) && qs.isCompleted();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check new subclass classId for validity. Base class not added into allowed subclasses.
|
||||
* @param player
|
||||
* @param classId
|
||||
* @return
|
||||
*/
|
||||
private boolean isValidNewSubClass(L2PcInstance player, int classId)
|
||||
{
|
||||
final ClassId cid = ClassId.values()[classId];
|
||||
ClassId subClassId;
|
||||
for (SubClass subList : player.getSubClasses().values())
|
||||
{
|
||||
subClassId = ClassId.values()[subList.getClassId()];
|
||||
|
||||
if (subClassId.equalsOrChildOf(cid))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// get player base class
|
||||
final int currentBaseId = player.getBaseClassId();
|
||||
final ClassId baseCID = ClassId.getClassId(currentBaseId);
|
||||
|
||||
// we need 2nd occupation ID
|
||||
final int baseClassId = baseCID.level() > 2 ? baseCID.getParent().ordinal() : currentBaseId;
|
||||
final Set<PlayerClass> availSubs = getSubclasses(player, baseClassId);
|
||||
|
||||
if ((availSubs == null) || availSubs.isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean found = false;
|
||||
for (PlayerClass pclass : availSubs)
|
||||
{
|
||||
if (pclass.ordinal() == classId)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
private boolean hasAllSubclassLeveled(L2PcInstance player)
|
||||
{
|
||||
boolean leveled = true;
|
||||
|
||||
for (SubClass sub : player.getSubClasses().values())
|
||||
{
|
||||
if ((sub != null) && (sub.getLevel() < 75))
|
||||
{
|
||||
leveled = false;
|
||||
}
|
||||
}
|
||||
return leveled;
|
||||
}
|
||||
|
||||
public final List<PlayerClass> getAvailableDualclasses(L2PcInstance player)
|
||||
{
|
||||
final List<PlayerClass> dualClasses = new ArrayList<>();
|
||||
|
||||
for (PlayerClass playerClass : PlayerClass.values())
|
||||
{
|
||||
if (!playerClass.isOfRace(Race.ERTHEIA) && playerClass.isOfLevel(ClassLevel.AWAKEN) && (playerClass.ordinal() != player.getClassId().getId()))
|
||||
{
|
||||
dualClasses.add(playerClass);
|
||||
}
|
||||
}
|
||||
return dualClasses;
|
||||
}
|
||||
|
||||
private List<PlayerClass> getDualClasses(L2PcInstance player, CategoryType cType)
|
||||
{
|
||||
final List<PlayerClass> tempList = new ArrayList<>();
|
||||
final int baseClassId = player.getBaseClassId();
|
||||
final int dualClassId = player.getClassId().getId();
|
||||
|
||||
for (PlayerClass temp : dualClassList)
|
||||
{
|
||||
if ((temp.ordinal() != baseClassId) && (temp.ordinal() != dualClassId) && ((cType == null) || CategoryData.getInstance().isInCategory(cType, temp.ordinal())))
|
||||
{
|
||||
tempList.add(temp);
|
||||
}
|
||||
}
|
||||
return tempList;
|
||||
}
|
||||
|
||||
public final Set<PlayerClass> getSubclasses(L2PcInstance player, int classId)
|
||||
{
|
||||
Set<PlayerClass> subclasses = null;
|
||||
final PlayerClass pClass = PlayerClass.values()[classId];
|
||||
|
||||
if ((pClass.getLevel() == ClassLevel.THIRD) || (pClass.getLevel() == ClassLevel.FOURTH))
|
||||
{
|
||||
subclasses = EnumSet.copyOf(mainSubclassSet);
|
||||
|
||||
subclasses.remove(this);
|
||||
|
||||
subclasses.removeAll(PlayerClass.getSet(Race.ERTHEIA, THIRD));
|
||||
|
||||
if (player.getRace() == Race.KAMAEL)
|
||||
{
|
||||
if (player.getAppearance().getSex())
|
||||
{
|
||||
subclasses.remove(PlayerClass.femaleSoulbreaker);
|
||||
}
|
||||
else
|
||||
{
|
||||
subclasses.remove(PlayerClass.maleSoulbreaker);
|
||||
}
|
||||
|
||||
if (!player.getSubClasses().containsKey(2) || (player.getSubClasses().get(2).getLevel() < 75))
|
||||
{
|
||||
subclasses.remove(PlayerClass.inspector);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only Kamael can take Kamael classes as subclasses.
|
||||
subclasses.removeAll(PlayerClass.getSet(Race.KAMAEL, THIRD));
|
||||
}
|
||||
|
||||
final Set<PlayerClass> unavailableClasses = subclassSetMap.get(this);
|
||||
|
||||
if (unavailableClasses != null)
|
||||
{
|
||||
subclasses.removeAll(unavailableClasses);
|
||||
}
|
||||
}
|
||||
return subclasses;
|
||||
}
|
||||
|
||||
private NpcHtmlMessage getNpcHtmlMessage(L2PcInstance player, L2Npc npc, String fileName)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/ai/npc/Raina/" + fileName));
|
||||
return html;
|
||||
}
|
||||
|
||||
private int getCloakId(L2PcInstance player)
|
||||
{
|
||||
CategoryType catType = null;
|
||||
|
||||
if (player.isInCategory(CategoryType.SIGEL_GROUP))
|
||||
{
|
||||
catType = CategoryType.SIGEL_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.TYRR_GROUP))
|
||||
{
|
||||
catType = CategoryType.TYRR_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.OTHELL_GROUP))
|
||||
{
|
||||
catType = CategoryType.OTHELL_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.YUL_GROUP))
|
||||
{
|
||||
catType = CategoryType.YUL_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.FEOH_GROUP))
|
||||
{
|
||||
catType = CategoryType.FEOH_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.ISS_GROUP))
|
||||
{
|
||||
catType = CategoryType.ISS_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.WYNN_GROUP))
|
||||
{
|
||||
catType = CategoryType.WYNN_GROUP;
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.AEORE_GROUP))
|
||||
{
|
||||
catType = CategoryType.AEORE_GROUP;
|
||||
}
|
||||
return classCloak.get(catType);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Raina();
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
The choice is no easy one.<br>
|
||||
The new subclass will be a level 40, 2nd-transfer class. <br>
|
||||
Are you sure you want to go ahead with this decision? <br>
|
||||
%confirmButton%
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
The choice is no easy one.<br>
|
||||
<font="LEVEL">The new subclass will have none of the skill enchants or the skills you learned through codices. Think carefully.</font><br>
|
||||
Are you sure you want to go ahead with this decision? <br>
|
||||
%confirmButton%
|
||||
</body></html>
|
@@ -1,12 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
So, into which class would you like to Reawaken?<br>
|
||||
Remember that if you proceed, you will go back to <font color="LEVEL">Lv. 85, and all your skills will be reset.</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_SIGEL_GROUP">"I will change to the Knight class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_TYRR_GROUP">"I will change to the Warrior class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_OTHELL_GROUP">"I will change to the Rogue class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_YUL_GROUP">"I will change to the Archer class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_FEOH_GROUP">"I will change to the Wizard class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_ISS_GROUP">"I will change to the Enchanter class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_WYNN_GROUP">"I will change to the Summoner class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina addDualClass_AEORE_GROUP">"I will change to the Healer class."</Button>
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You do not meet the conditions to add a dual class.<br>
|
||||
Come back when you're ready, or ask for something else.<br>
|
||||
(Only Ertheia characters Lv. 85 or above may add a dual class once.)
|
||||
</body></html>
|
@@ -1,9 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td valign="top" align="center"><br><br><br><br>
|
||||
These are the classes available to you.<br1>
|
||||
You must choose which you want to be.<br><br>
|
||||
%dualclassList%
|
||||
</td></tr>
|
||||
</table>
|
||||
</body></html>
|
@@ -1,8 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Sorry, but you're not qualified to add a subclass.<br1>
|
||||
To add a new subclass, you need the following qualifications:<br>
|
||||
First, <font color="LEVEL">you've completed the 'Red Thread of Fate' quest</font>. If you want to get on that, let me know.<br>
|
||||
Second, <font color="LEVEL">your current class has done the 2nd class transfer, and all your subclass levels are 75 or higher</font>. For example, if your subclasses are Temple Knight and Silver Ranger, they must both be level 75 for you to add a third subclass.<br>
|
||||
Third, you may only have <font color="LEVEL">up to 3 subclasses</font>, I'm afraid.<br>
|
||||
Got it?
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Congratulations!<br>
|
||||
Your new subclass has been added.<br>
|
||||
I look forward to your future endeavors with your new subclass!<br>
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You need inventory space and free weight to create or renew a subclass. Go free up your weight and inventory to less than 80%, and I'll see what I can do.
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You need a Subclass Change Certificate in order to receive the power of the gods. This was given to heroes long before Shilen's destructive rampages came about, so you can't find new ones anymore.<br>
|
||||
But if you have the certificate, talk to me again as a subclass ready to receive the power of the gods.<br>
|
||||
<font color="af9878">But a dual class isn't ready to receive the power of the gods, so I can't change classes for that.</font>
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Ertheia cannot add or modify subclasses.<br>
|
||||
Please talk to me when you're ready to add a dual class.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You haven't completed the 'Red Thread of Fate' quest yet.<br>
|
||||
To create a subclass, you have to <font color="LEVEL">complete the 'Red Thread of Fate' quest</font>. If you want to work on the quest, let me know.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You don't have a subclass to change.<br>
|
||||
Make a subclass.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You cannot create a new subclass<br>
|
||||
when there is a pet or servitor.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
I cannot create a new subclass while you're transformed.<br>
|
||||
Change back to your original form, then talk to me again.
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You do not meet the conditions to add a dual class.<br>
|
||||
Come back when you're ready, or ask for something else.<br>
|
||||
(Only Ertheia characters Lv. 85 or above may add a dual class once.)
|
||||
</body></html>
|
@@ -1,10 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
In order to reawaken your dual class,<br>
|
||||
<font color="LEVEL">you need the cloak you received when you first awakened it,<br>
|
||||
and some %price% Adena</font> to pay the fee.<br>
|
||||
Upon reawakening, zou will lose zour current<br>
|
||||
abilities, but gain new powers is exchange. You will be reducted to <font color="LEVEL">level 85, and all your skills will be reset.</font> You can choose the class you want, but <font color="LEVEL">you cannot receive powers from the same class as your main class</font>.<br>
|
||||
<font color="af9878">(After reawakening, the 3rd skills provided will be based on human classes.)</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawakenDualclassConfirm">"I'll reawaken."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawakenCancel.html">"I will think about it."</Button>
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
I see.<br>
|
||||
Make a carful decision because you will lose the power you have, to get new power.<br>
|
||||
When you make up your mind, come back to me.
|
||||
</body></html>
|
@@ -1,9 +0,0 @@
|
||||
<html><body scroll="no">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td valign="top" align="center"><br><br><br><br>
|
||||
These are the classes available to you.<br1>
|
||||
You must choose which you want to be.<br><br>
|
||||
%dualclassList%
|
||||
</td></tr>
|
||||
</table>
|
||||
</body></html>
|
@@ -1,12 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
So, into which class would you like to Reawaken?<br>
|
||||
Remember that if you proceed, you will go back to <font color="LEVEL">Lv. 85, and all your skills will be reset.</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_SIGEL_GROUP">"I will change to the Knight class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_TYRR_GROUP">"I will change to the Warrior class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_OTHELL_GROUP">"I will change to the Rogue class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_YUL_GROUP">"I will change to the Archer class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_FEOH_GROUP">"I will change to the Wizard class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_ISS_GROUP">"I will change to the Enchanter class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_WYNN_GROUP">"I will change to the Summoner class."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Raina reawaken_AEORE_GROUP">"I will change to the Healer class."</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
You don't look like a Awakened dual class.<br>
|
||||
If you want to Reawaken, you must be an <font color="LEVEL">Awakened dual class</font>.<br>
|
||||
Please come find me when you have Awakened as a dual class.<br><br>
|
||||
(You can become a specialized Awakened class through Hardin or the Giant's stone statue at the Reliquary of the Giants.)
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
To change your dual class,<br>
|
||||
<font color="LEVEL">you need the cloak you received when you awakened your dual class,<br>
|
||||
and %price% Adena</font> for a fee.<br>
|
||||
Please come back with everything you need.
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Congratulations!<br>
|
||||
I've <font color="LEVEL">awakened your dual class again</font>.<br>
|
||||
I look forward to your future accomplishments.
|
||||
</body></html>
|
@@ -1,7 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Which subclass would you like to change to?<br>
|
||||
Please select a subclass from the list below.<br>
|
||||
<font color="LEVEL">The new subclas will be a level 40, 2nd-transfer class with none of the skill enchants or the skills you learned through codices. Think carefully.</font><br>
|
||||
Also, dual classes can't be reset.<br>
|
||||
%subclassList%
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Select a Subclass.<br><br>
|
||||
%subclassList%
|
||||
</body></html>
|
@@ -1,7 +0,0 @@
|
||||
<html><body>Subclass/Dual Class Master Raina:<br><br>
|
||||
Which subclass would you like to change to?<br>
|
||||
Please select a subclass from the list below.<br>
|
||||
<font color="LEVEL">The new subclas will be a level 40, 2nd-transfer class with none of the skill enchants or the skills you learned through codices. Think carefully.</font><br>
|
||||
Also, dual classes can't be reset.<br>
|
||||
%removeList%
|
||||
</body></html>
|
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Teleports.HarnakUnderground;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author hlwrave
|
||||
*/
|
||||
final class HarnakUnderground extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int HADEL = 33344;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 85;
|
||||
// Location
|
||||
private static final Location HARNAK_UNDERGROUND = new Location(-114700, 147909, -7720);
|
||||
|
||||
private HarnakUnderground()
|
||||
{
|
||||
super(HarnakUnderground.class.getSimpleName(), "ai/npc/Teleports");
|
||||
addStartNpc(HADEL);
|
||||
addTalkId(HADEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if ((player.getLevel() >= MIN_LEVEL) && player.isAwaken())
|
||||
{
|
||||
player.teleToLocation(HARNAK_UNDERGROUND);
|
||||
}
|
||||
else if (player.getLevel() < MIN_LEVEL)
|
||||
{
|
||||
return "no_level.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "non_awakened.htm";
|
||||
}
|
||||
return super.onTalk(npc, player);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HarnakUnderground();
|
||||
}
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Hadel:<br>
|
||||
I do not believe our paths are meant to cross here. Perhaps later down the road.<br>
|
||||
(Only characters Lv. 85. or Above)
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Hadel:<br>
|
||||
Sorry, I can't teleport you to "Harnak Underground Ruins!". Come back when you have Awakened to it.
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Ye Sagira Teleport Device:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest YeSagiraTeleporter teleport">Enter the Ruins of Ye Sagira</Button>
|
||||
</body></html>
|
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Teleports.YeSagiraTeleporter;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerCreate;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Neanrakyr
|
||||
*/
|
||||
public final class YeSagiraTeleporter extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int YE_SAGIRA_TELEPORTER = 33180;
|
||||
// Location
|
||||
private static final Location TELEPORT = new Location(-114675, 230171, -1648);
|
||||
// Misc
|
||||
private static final int MAX_LEVEL = 20;
|
||||
// Variables names
|
||||
private static final String MOVIE_VAR = "TI_YeSagira_movie";
|
||||
// Movies
|
||||
public static final int YE_SAGIRA = 103;
|
||||
|
||||
private YeSagiraTeleporter()
|
||||
{
|
||||
super(YeSagiraTeleporter.class.getSimpleName(), "ai/npc/Teleports");
|
||||
addStartNpc(YE_SAGIRA_TELEPORTER);
|
||||
addFirstTalkId(YE_SAGIRA_TELEPORTER);
|
||||
addTalkId(YE_SAGIRA_TELEPORTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("teleport"))
|
||||
{
|
||||
if (player.getVariables().getBoolean(MOVIE_VAR, false))
|
||||
{
|
||||
if (player.getLevel() <= MAX_LEVEL)
|
||||
{
|
||||
player.showQuestMovie(YE_SAGIRA);
|
||||
}
|
||||
player.getVariables().remove(MOVIE_VAR);
|
||||
}
|
||||
player.teleToLocation(TELEPORT);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_PLAYER_CREATE)
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void OnPlayerCreate(OnPlayerCreate event)
|
||||
{
|
||||
event.getActiveChar().getVariables().set(MOVIE_VAR, true);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new YeSagiraTeleporter();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user