Addition of Lionel Hunter AI.

Contributed by Sero.
This commit is contained in:
MobiusDevelopment
2021-04-23 12:49:18 +00:00
parent 92fac5f930
commit de94da094a
28 changed files with 2726 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You have received the missing books for the quest (Exalted One Who Faces The Limit).
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You have received the missing books for the quest (Exalted One Who Overcomes The Limit).
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You have received the missing books for the quest (Exalted One Who Shatters The Limit).
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You have received the missing books for the quest (Exalted Reaching Another Level).
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You have received the missing books for the quest (Exalted Guide To Power).
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You have received the missing books for the quest (Obtaining New Power).
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Knight Lionel Hunter:<br>
You haven't complete the quest.
</body></html>

View File

@@ -0,0 +1,173 @@
/*
* 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.areas.Heine.LionelHunter;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.QuestState;
import ai.AbstractNpcAI;
import quests.Q10507_ObtainingNewPower.Q10507_ObtainingNewPower;
import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit;
import quests.Q10817_ExaltedOneWhoOvercomesTheLimit.Q10817_ExaltedOneWhoOvercomesTheLimit;
import quests.Q10823_ExaltedOneWhoShattersTheLimit.Q10823_ExaltedOneWhoShattersTheLimit;
import quests.Q10873_ExaltedReachingAnotherLevel.Q10873_ExaltedReachingAnotherLevel;
import quests.Q10879_ExaltedGuideToPower.Q10879_ExaltedGuideToPower;
/**
* Lionel Hunter Exchange AI.
* @Note TODO: Merge with default htmls.
* @author Sero
*/
public class LionelHunter extends AbstractNpcAI
{
// NPC
private static final int LIONEL_HUNTER = 33907;
// Items
private static final int SPELLBOOK_DIGNITY_OF_THE_EXALTED = 45922;
private static final int SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV2 = 45923;
private static final int SPELLBOOK_BELIEF_OF_THE_EXALTED = 45925;
private static final int SPELLBOOK_FAVOR_OF_THE_EXALTED = 45928;
private static final int OBTAIN_EXALTED_STATUS = 45638;
private static final int EXALTED_TIARA = 45644;
private static final int SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV3 = 45924;
private static final int BLESSING_OF_THE_EXALTED = 45926;
private static final int SUMMON_BATTLE_POTION = 45927;
private static final int FATE_OF_THE_EXALTED = 46036;
private static final int SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV4 = 47852;
private static final int VITALITY_OF_THE_EXALTED = 47854;
private static final int SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV5 = 47853;
private static final int VITALITY_OF_THE_EXALTED_LV2 = 47855;
private static final int DIGNITY_OF_THE_EXALTED_LV6 = 80970;
private static final int FAVOR_OF_THE_EXLATED = 45870;
private LionelHunter()
{
addStartNpc(LIONEL_HUNTER);
addTalkId(LIONEL_HUNTER);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
switch (event)
{
case "33907-book1.htm":
{
final QuestState qs = player.getQuestState(Q10811_ExaltedOneWhoFacesTheLimit.class.getSimpleName());
if ((qs != null) && qs.isCompleted())
{
giveItems(player, SPELLBOOK_DIGNITY_OF_THE_EXALTED, 1);
htmltext = event;
}
else
{
htmltext = "33907-not-compeleted.html";
}
break;
}
case "33907-book2.htm":
{
final QuestState qs = player.getQuestState(Q10817_ExaltedOneWhoOvercomesTheLimit.class.getSimpleName());
if ((qs != null) && qs.isCompleted())
{
giveItems(player, SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV2, 1);
giveItems(player, SPELLBOOK_BELIEF_OF_THE_EXALTED, 1);
giveItems(player, SPELLBOOK_FAVOR_OF_THE_EXALTED, 1);
htmltext = event;
}
else
{
htmltext = "33907-not-compeleted.html";
}
break;
}
case "33907-book3.htm":
{
final QuestState qs = player.getQuestState(Q10823_ExaltedOneWhoShattersTheLimit.class.getSimpleName());
if ((qs != null) && qs.isCompleted())
{
giveItems(player, OBTAIN_EXALTED_STATUS, 1);
giveItems(player, EXALTED_TIARA, 1);
giveItems(player, SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV3, 1);
giveItems(player, BLESSING_OF_THE_EXALTED, 1);
giveItems(player, SUMMON_BATTLE_POTION, 1);
giveItems(player, FATE_OF_THE_EXALTED, 1);
giveItems(player, FAVOR_OF_THE_EXLATED, 1);
htmltext = event;
}
else
{
htmltext = "33907-not-compeleted.html";
}
break;
}
case "33907-book4.htm":
{
final QuestState qs = player.getQuestState(Q10873_ExaltedReachingAnotherLevel.class.getSimpleName());
if ((qs != null) && qs.isCompleted())
{
giveItems(player, SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV4, 1);
giveItems(player, VITALITY_OF_THE_EXALTED, 1);
htmltext = event;
}
else
{
htmltext = "33907-not-compeleted.html";
}
break;
}
case "33907-book5.htm":
{
final QuestState qs = player.getQuestState(Q10879_ExaltedGuideToPower.class.getSimpleName());
if ((qs != null) && qs.isCompleted())
{
giveItems(player, SPELLBOOK_DIGNITY_OF_THE_EXALTED_LV5, 1);
giveItems(player, VITALITY_OF_THE_EXALTED_LV2, 1);
htmltext = event;
}
else
{
htmltext = "33907-not-compeleted.html";
}
break;
}
case "33907-book6.htm":
{
final QuestState qs = player.getQuestState(Q10507_ObtainingNewPower.class.getSimpleName());
if ((qs != null) && qs.isCompleted())
{
giveItems(player, DIGNITY_OF_THE_EXALTED_LV6, 1);
htmltext = event;
}
else
{
htmltext = "33907-not-compeleted.html";
}
break;
}
}
return htmltext;
}
public static void main(String[] args)
{
new LionelHunter();
}
}