Sync with L2JServer Jan 9th 2015.

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

View File

@@ -0,0 +1,12 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,10 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,8 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,180 @@
/*
* Copyright (C) 2004-2015 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.npc.MonkOfChaos;
import java.util.List;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.datatables.SkillData;
import com.l2jserver.gameserver.datatables.SkillTreesData;
import com.l2jserver.gameserver.enums.CategoryType;
import com.l2jserver.gameserver.enums.SubclassType;
import com.l2jserver.gameserver.model.L2SkillLearn;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.base.AcquireSkillType;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.ExAcquirableSkillListByClass;
/**
* @author Sdw
*/
public 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();
}
}

View File

@@ -0,0 +1,7 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,8 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,8 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,9 @@
<html>
<head></head>
<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>

View File

@@ -0,0 +1,9 @@
<html>
<head></head>
<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>