Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java
index f07202db51..331dcf1efe 100644
--- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java
@@ -119,12 +119,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1147,6 +1149,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1205,6 +1211,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3127,6 +3138,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3224,6 +3244,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java
index 40759dc1f1..27cc230738 100644
--- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1154,6 +1156,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1212,6 +1219,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3144,6 +3156,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3241,6 +3262,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java
index cfff6d8bde..07f90dfe53 100644
--- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1167,6 +1169,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1225,6 +1232,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3168,6 +3180,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3265,6 +3286,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java
index ffe499b5a3..c9f044483c 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1154,6 +1156,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1212,6 +1219,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3142,6 +3154,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3239,6 +3260,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java
index bf44f11cb4..38b3149fd9 100644
--- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java
@@ -121,12 +121,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1149,6 +1151,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1207,6 +1214,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3144,6 +3156,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3241,6 +3262,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java
index bf44f11cb4..38b3149fd9 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java
@@ -121,12 +121,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1149,6 +1151,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1207,6 +1214,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3144,6 +3156,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3241,6 +3262,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java
index 1ec8e4d419..0ae30f3d6c 100644
--- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java
@@ -121,12 +121,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1171,6 +1173,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1229,6 +1236,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3187,6 +3199,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3284,6 +3305,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..5f66c72365
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/NoblessMaster.ini
@@ -0,0 +1,25 @@
+# ---------------------------------------------------------------------------
+# 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
+
+# Nobless level to reward.
+# Default: 1
+# Exalted: 2
+LevelRewarded = 1
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..a35318a192
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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.getNobleLevel() > 0)
+ {
+ return "1003000-3.htm";
+ }
+ if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
+ {
+ if (Config.NOBLESS_MASTER_REWARD_TIARA)
+ {
+ giveItems(player, NOBLESS_TIARA, 1);
+ }
+ player.setNobleLevel(Config.NOBLESS_MASTER_LEVEL_REWARDED);
+ 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();
+ }
+}
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java
index d9cad9e634..fb7b9397d1 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java
@@ -121,12 +121,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1172,6 +1174,11 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
+ public static int NOBLESS_MASTER_LEVEL_REWARDED;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1230,6 +1237,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3189,6 +3201,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3286,6 +3307,15 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+ NOBLESS_MASTER_LEVEL_REWARDED = NoblessMaster.getInt("LevelRewarded", 1);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..d7baaf287a
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,18 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+By the name of Shilen! I am sure! De-level me!
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..c674fb725a
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,15 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java
index c456ada1b2..b5e66cb380 100644
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java
@@ -115,6 +115,7 @@ public class Config
private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
@@ -122,6 +123,7 @@ public class Config
private static final String CUSTOM_HELLBOUND_STATUS_CONFIG_FILE = "./config/Custom/HellboundStatus.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1222,6 +1224,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1278,6 +1284,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -2794,6 +2805,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -2895,6 +2915,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..d7baaf287a
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,18 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+By the name of Shilen! I am sure! De-level me!
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..c674fb725a
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,15 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java
index 81f7c8eedb..9bcac3b1cb 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java
@@ -115,6 +115,7 @@ public class Config
private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
@@ -122,6 +123,7 @@ public class Config
private static final String CUSTOM_HELLBOUND_STATUS_CONFIG_FILE = "./config/Custom/HellboundStatus.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1223,6 +1225,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1279,6 +1285,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -2801,6 +2812,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -2902,6 +2922,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java
index 26e4dd1874..8038a17439 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1090,6 +1092,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1148,6 +1154,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3003,6 +3014,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3100,6 +3120,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java
index 2d73395e60..5846ec3b55 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1094,6 +1096,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1152,6 +1158,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3010,6 +3021,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3107,6 +3127,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java
index 2d73395e60..5846ec3b55 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1094,6 +1096,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1152,6 +1158,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3010,6 +3021,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3107,6 +3127,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java
index 2d73395e60..5846ec3b55 100644
--- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1094,6 +1096,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1152,6 +1158,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3010,6 +3021,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3107,6 +3127,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java
index 741fe5cece..57b475da6e 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1099,6 +1101,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1157,6 +1163,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3018,6 +3029,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3115,6 +3135,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
index ecfc01daef..c2ab4f5b23 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
@@ -120,12 +120,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1098,6 +1100,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1156,6 +1162,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3016,6 +3027,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3113,6 +3133,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/DelevelManager.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/DelevelManager.ini
new file mode 100644
index 0000000000..ee0a800cf2
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/DelevelManager.ini
@@ -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
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/NoblessMaster.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/NoblessMaster.ini
new file mode 100644
index 0000000000..80071d1e71
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/NoblessMaster.ini
@@ -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
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
new file mode 100644
index 0000000000..21c1bd0895
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
@@ -0,0 +1,3 @@
+Jeadin:
+You do not have enough Gold Einhasad!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
new file mode 100644
index 0000000000..bdfe21a84f
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
@@ -0,0 +1,4 @@
+Jeadin:
+You are too young...
+Go away!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000.htm
new file mode 100644
index 0000000000..b9fe44cee6
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000.htm
@@ -0,0 +1,15 @@
+Jeadin:
+
+You want to De-level?
+Certainly mortal... As you wish...
+It will cost you 2x Gold Einhasad per level.
+We will destroy the coins in Shilens name.
+
+
+I have to warn you!
+When it is done, it cannot be undone!
+Are you certain?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
new file mode 100644
index 0000000000..503a71dda0
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
new file mode 100644
index 0000000000..8dd00632bd
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
@@ -0,0 +1,5 @@
+
+Noblesse Master:
+Congratulations!
+You are now a Noblesse.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
new file mode 100644
index 0000000000..3b826ce3cc
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You must be at least level 80!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
new file mode 100644
index 0000000000..4abb26c64c
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
@@ -0,0 +1,4 @@
+
+Noblesse Master:
+You already are a noble.
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000.htm b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
new file mode 100644
index 0000000000..f73659249e
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
@@ -0,0 +1,14 @@
+
+Noblesse Master:
+
+If you are at least level 80,
+I can promote you to Noblesse.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
new file mode 100644
index 0000000000..29229076c2
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
@@ -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 .
+ */
+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();
+ }
+}
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/npcs/custom/DelevelManager.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/npcs/custom/DelevelManager.xml
new file mode 100644
index 0000000000..cea06b682b
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/npcs/custom/DelevelManager.xml
@@ -0,0 +1,21 @@
+
+
+
+ HUMANOID
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/npcs/custom/NoblesseMaster.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
new file mode 100644
index 0000000000..304a5c7d83
--- /dev/null
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
@@ -0,0 +1,21 @@
+
+
+
+ KAMAEL
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java
index dc1e399011..e22a69a596 100644
--- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java
@@ -121,12 +121,14 @@ public class Config
private static final String CUSTOM_CLASS_BALANCE_CONFIG_FILE = "./config/Custom/ClassBalance.ini";
private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini";
private static final String CUSTOM_CUSTOM_MAIL_MANAGER_CONFIG_FILE = "./config/Custom/CustomMailManager.ini";
+ private static final String CUSTOM_DELEVEL_MANAGER_CONFIG_FILE = "./config/Custom/DelevelManager.ini";
private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini";
private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini";
private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini";
private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini";
private static final String CUSTOM_MERCHANT_ZERO_SELL_PRICE_CONFIG_FILE = "./config/Custom/MerchantZeroSellPrice.ini";
private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini";
+ private static final String CUSTOM_NOBLESS_MASTER_CONFIG_FILE = "./config/Custom/NoblessMaster.ini";
private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini";
private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
@@ -1101,6 +1103,10 @@ public class Config
public static List MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT;
public static boolean MULTILANG_VOICED_ALLOW;
+ public static boolean NOBLESS_MASTER_ENABLED;
+ public static int NOBLESS_MASTER_NPCID;
+ public static int NOBLESS_MASTER_LEVEL_REQUIREMENT;
+ public static boolean NOBLESS_MASTER_REWARD_TIARA;
public static boolean L2WALKER_PROTECTION;
public static int DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
@@ -1159,6 +1165,11 @@ public class Config
public static Map COMMUNITY_AVAILABLE_TELEPORTS;
public static boolean CUSTOM_MAIL_MANAGER_ENABLED;
public static int CUSTOM_MAIL_MANAGER_DELAY;
+ public static boolean DELEVEL_MANAGER_ENABLED;
+ public static int DELEVEL_MANAGER_NPCID;
+ public static int DELEVEL_MANAGER_ITEMID;
+ public static int DELEVEL_MANAGER_ITEMCOUNT;
+ public static int DELEVEL_MANAGER_MINIMUM_DELEVEL;
public static boolean FACTION_SYSTEM_ENABLED;
public static Location FACTION_STARTING_LOCATION;
public static Location FACTION_MANAGER_LOCATION;
@@ -3022,6 +3033,15 @@ public class Config
CUSTOM_MAIL_MANAGER_ENABLED = CustomMailManager.getBoolean("CustomMailManagerEnabled", false);
CUSTOM_MAIL_MANAGER_DELAY = CustomMailManager.getInt("DatabaseQueryDelay", 30) * 1000;
+ // Load DelevelManager config file (if exists)
+ final PropertiesParser DelevelManager = new PropertiesParser(CUSTOM_DELEVEL_MANAGER_CONFIG_FILE);
+
+ DELEVEL_MANAGER_ENABLED = DelevelManager.getBoolean("Enabled", false);
+ DELEVEL_MANAGER_NPCID = DelevelManager.getInt("NpcId", 1002000);
+ DELEVEL_MANAGER_ITEMID = DelevelManager.getInt("RequiredItemId", 4356);
+ DELEVEL_MANAGER_ITEMCOUNT = DelevelManager.getInt("RequiredItemCount", 2);
+ DELEVEL_MANAGER_MINIMUM_DELEVEL = DelevelManager.getInt("MimimumDelevel", 20);
+
// Load DualboxCheck config file (if exists)
final PropertiesParser DualboxCheck = new PropertiesParser(CUSTOM_DUALBOX_CHECK_CONFIG_FILE);
@@ -3119,6 +3139,14 @@ public class Config
}
MULTILANG_VOICED_ALLOW = MultilingualSupport.getBoolean("MultiLangVoiceCommand", true);
+ // Load NoblessMaster config file (if exists)
+ final PropertiesParser NoblessMaster = new PropertiesParser(CUSTOM_NOBLESS_MASTER_CONFIG_FILE);
+
+ NOBLESS_MASTER_ENABLED = NoblessMaster.getBoolean("Enabled", false);
+ NOBLESS_MASTER_NPCID = NoblessMaster.getInt("NpcId", 1003000);
+ NOBLESS_MASTER_LEVEL_REQUIREMENT = NoblessMaster.getInt("LevelRequirement", 80);
+ NOBLESS_MASTER_REWARD_TIARA = NoblessMaster.getBoolean("RewardTiara", false);
+
// Load OfflineTrade config file (if exists)
final PropertiesParser OfflineTrade = new PropertiesParser(CUSTOM_OFFLINE_TRADE_CONFIG_FILE);