Hardin AI.

Contributed by Stayway.
This commit is contained in:
MobiusDev
2016-03-10 07:31:50 +00:00
parent 88cde4a168
commit fcd639299b
6 changed files with 98 additions and 22 deletions

View File

@@ -0,0 +1,6 @@
<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>

View File

@@ -0,0 +1,5 @@
<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>

View File

@@ -0,0 +1,4 @@
<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>

View File

@@ -0,0 +1,75 @@
/*
* 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;
switch (npc.getId())
{
case HARDIN:
{
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";
}
break;
}
}
return htmltext;
}
public static void main(String[] args)
{
new Hardin();
}
}