Addition of custom Noble Master and Delevel Manager NPCs.

This commit is contained in:
MobiusDevelopment
2020-01-16 03:51:57 +00:00
parent 25b4b4fe00
commit b25b259665
238 changed files with 5565 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# ---------------------------------------------------------------------------
# Delevel Manager (instant delevel NPC)
# ---------------------------------------------------------------------------
# Enable Delevel Manager NPC.
# Default: False
Enabled = False
# Delevel Manager NPC id.
# Default: 1002000
NpcId = 1002000
# Required item id.
# Default: 4356 (Gold Einhasad)
RequiredItemId = 4356
# Required item count.
# Default: 2
RequiredItemCount = 2
# Mimimum level you can reach.
# Default: 20
MimimumDelevel = 20

View File

@@ -0,0 +1,20 @@
# ---------------------------------------------------------------------------
# Nobless Master (instant nobless NPC)
# ---------------------------------------------------------------------------
# Enable Nobless Master NPC.
# Default: False
Enabled = False
# Nobless Master NPC id.
# Default: 1003000
NpcId = 1003000
# Level required to become nobless.
# Consider changing htmls if you modify this.
# Default: 80
LevelRequirement = 80
# Reward nobless tiara item.
# Default: True
RewardTiara = True

View File

@@ -0,0 +1,3 @@
<html><body>Jeadin:<br>
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Jeadin:<br>
You are too young...<br1>
Go away!
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Jeadin:<br>
<br>
You want to De-level?<br>
Certainly mortal... As you wish...<br>
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
We will destroy the coins in Shilens name.<br>
<br>
<br>
I have to warn you!<br>
When it is done, it cannot be undone!<br>
Are you certain?<br>
<br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
</body></html>

View File

@@ -0,0 +1,78 @@
/*
* 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 custom.DelevelManager;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import ai.AbstractNpcAI;
/**
* @author Mobius
*/
public class DelevelManager extends AbstractNpcAI
{
private DelevelManager()
{
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
addTalkId(Config.DELEVEL_MANAGER_NPCID);
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
if (!Config.DELEVEL_MANAGER_ENABLED)
{
return null;
}
switch (event)
{
case "delevel":
{
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
{
return "1002000-2.htm";
}
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
{
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
player.broadcastUserInfo();
return "1002000.htm";
}
return "1002000-1.htm";
}
}
return null;
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return "1002000.htm";
}
public static void main(String[] args)
{
new DelevelManager();
}
}

View File

@@ -0,0 +1,5 @@
<html><body>
Noblesse Master:<br>
Congratulations!<br1>
You are now a Noblesse.<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>
Noblesse Master:<br>
You must be at least level 80!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>
Noblesse Master:<br>
You already are a noble.
</body></html>

View File

@@ -0,0 +1,14 @@
<html><body>
Noblesse Master:<br>
<br>
If you are at least level 80,<br>
I can promote you to Noblesse.<br>
<br>
<br>
<br>
<br>
<br>
<center>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
</center>
</body></html>

View File

@@ -0,0 +1,84 @@
/*
* 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 custom.NoblessMaster;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import ai.AbstractNpcAI;
/**
* @author Mobius
*/
public class NoblessMaster extends AbstractNpcAI
{
// Item
private static final int NOBLESS_TIARA = 7694;
private NoblessMaster()
{
addStartNpc(Config.NOBLESS_MASTER_NPCID);
addTalkId(Config.NOBLESS_MASTER_NPCID);
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
if (!Config.NOBLESS_MASTER_ENABLED)
{
return null;
}
switch (event)
{
case "noblesse":
{
if (player.isNoble())
{
return "1003000-3.htm";
}
if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
{
if (Config.NOBLESS_MASTER_REWARD_TIARA)
{
giveItems(player, NOBLESS_TIARA, 1);
}
player.setNoble(true);
player.sendPacket(QuestSound.ITEMSOUND_QUEST_FINISH.getPacket());
return "1003000-1.htm";
}
return "1003000-2.htm";
}
}
return null;
}
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
return "1003000.htm";
}
public static void main(String[] args)
{
new NoblessMaster();
}
}

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
<race>HUMANOID</race>
<sex>MALE</sex>
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
<defence physical="295.91597" magical="216.53847" />
<speed>
<walk ground="73" />
<run ground="170" />
</speed>
</stats>
<status attackable="false" canMove="false" />
<collision>
<radius normal="19" />
<height normal="44" />
</collision>
</npc>
</list>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
<race>KAMAEL</race>
<sex>MALE</sex>
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
<defence physical="295.91597" magical="216.53847" />
<speed>
<walk ground="20" />
<run ground="120" />
</speed>
</stats>
<status attackable="false" canMove="false" />
<collision>
<radius normal="18" />
<height normal="28" />
</collision>
</npc>
</list>