Addition of custom Noble Master and Delevel Manager NPCs.
This commit is contained in:
parent
25b4b4fe00
commit
b25b259665
23
L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
20
L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
20
L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Nobless Master (instant nobless NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Nobless Master NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Nobless Master NPC id.
|
||||
# Default: 1003000
|
||||
NpcId = 1003000
|
||||
|
||||
# Level required to become nobless.
|
||||
# Consider changing htmls if you modify this.
|
||||
# Default: 80
|
||||
LevelRequirement = 80
|
||||
|
||||
# Reward nobless tiara item.
|
||||
# Default: True
|
||||
RewardTiara = True
|
3
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.isNoble())
|
||||
{
|
||||
return "1003000-3.htm";
|
||||
}
|
||||
if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
|
||||
{
|
||||
if (Config.NOBLESS_MASTER_REWARD_TIARA)
|
||||
{
|
||||
giveItems(player, NOBLESS_TIARA, 1);
|
||||
}
|
||||
player.setNoble(true);
|
||||
player.sendPacket(QuestSound.ITEMSOUND_QUEST_FINISH.getPacket());
|
||||
return "1003000-1.htm";
|
||||
}
|
||||
return "1003000-2.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1003000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new NoblessMaster();
|
||||
}
|
||||
}
|
21
L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_2.5_Underground/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_2.5_Underground/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_2.5_Underground/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_2.5_Underground/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
3
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.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();
|
||||
}
|
||||
}
|
21
L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_3.0_Helios/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_3.0_Helios/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_3.0_Helios/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_3.0_Helios/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
3
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.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();
|
||||
}
|
||||
}
|
21
L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
3
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.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();
|
||||
}
|
||||
}
|
21
L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_5.0_Salvation/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_5.0_Salvation/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_5.0_Salvation/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_5.0_Salvation/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
3
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.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();
|
||||
}
|
||||
}
|
21
L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_5.0_Salvation/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
3
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.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();
|
||||
}
|
||||
}
|
21
L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
3
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.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();
|
||||
}
|
||||
}
|
21
L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
21
L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/DelevelManager.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1002000" displayId="32534" type="Npc" name="Jeadin" usingServerSideName="true" title="Experience Devourer" usingServerSideTitle="true">
|
||||
<race>HUMANOID</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="73" />
|
||||
<run ground="170" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="19" />
|
||||
<height normal="44" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
21
L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
21
L2J_Mobius_6.0_Fafurion/dist/game/data/stats/npcs/custom/NoblesseMaster.xml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="1003000" displayId="32138" type="Npc" name="Kadmos" usingServerSideName="true" title="Noblesse Master" usingServerSideTitle="true">
|
||||
<race>KAMAEL</race>
|
||||
<sex>MALE</sex>
|
||||
<stats str="40" int="21" dex="30" wit="20" con="43" men="20">
|
||||
<vitals hp="2444.46819" hpRegen="7.5" mp="1345.8" mpRegen="2.7" />
|
||||
<attack physical="688.86373" magical="470.40463" random="10" critical="4" accuracy="5" attackSpeed="253" type="FIST" range="40" distance="80" width="120" />
|
||||
<defence physical="295.91597" magical="216.53847" />
|
||||
<speed>
|
||||
<walk ground="20" />
|
||||
<run ground="120" />
|
||||
</speed>
|
||||
</stats>
|
||||
<status attackable="false" canMove="false" />
|
||||
<collision>
|
||||
<radius normal="18" />
|
||||
<height normal="28" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
@ -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<String> 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<String, Location> 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);
|
||||
|
||||
|
23
L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
23
L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/DelevelManager.ini
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Delevel Manager (instant delevel NPC)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable Delevel Manager NPC.
|
||||
# Default: False
|
||||
Enabled = False
|
||||
|
||||
# Delevel Manager NPC id.
|
||||
# Default: 1002000
|
||||
NpcId = 1002000
|
||||
|
||||
# Required item id.
|
||||
# Default: 4356 (Gold Einhasad)
|
||||
RequiredItemId = 4356
|
||||
|
||||
# Required item count.
|
||||
# Default: 2
|
||||
RequiredItemCount = 2
|
||||
|
||||
# Mimimum level you can reach.
|
||||
# Default: 20
|
||||
MimimumDelevel = 20
|
25
L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
25
L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/NoblessMaster.ini
vendored
Normal file
@ -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
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user