Jump to content

[Share]Custom subclass starting level


iNos

Recommended Posts

as title says with this when someone add new subclass will start with custom lvl

 

1st:

 

open net.l2emuproject.gameserver.model.base.SubClass.java

add this import

import net.l2emuproject.Config;

find this line:

	private long	_exp		= Experience.LEVEL[40];

and change it to:

	private long	_exp		= Experience.LEVEL[Config.CUSTOM_SUBCLASS_LVL];

after find this line:

	private byte	_level		= 40;

and change it to:

	private byte	_level		= (byte)Config.CUSTOM_SUBCLASS_LVL;

 

2nd:

 

open net.l2emuproject.Config.java

 

search for this:

	public static int			TITLE_COLOR_FOR_AMMOUNT5;

and after this line insert this:

	public static int			CUSTOM_SUBCLASS_LVL;

now search for this:

			PVP_AMMOUNT5 = Integer.parseInt(customSettings.getProperty("PvpAmmount5", "500"));

after this line insert this:

			CUSTOM_SUBCLASS_LVL = Integer.parseInt(customSettings.getProperty("CustomSubclassLvl", "40"));

 

3rd

 

open /config/main/custom.properties

go to end of the file and insert this:

#Custom lvl when player add new subclass
#min = 40 max = 80
#default = 40
CustomSubclassLvl = 40

 

Warning:  if you put lower number than 40 lvl when the char take 1 lvl goes to 40 lvl

and if you put more than 80 when the char kills one mob goes to 80 lvl

 

here is the .patch

Index: config/main/custom.properties
===================================================================
--- config/main/custom.properties	(revision 1600)
+++ config/main/custom.properties	(working copy)
@@ -97,6 +97,11 @@
# default = 3
MaxSubClass = 3

+#Custom lvl when player add new subclass
+#min = 40 max = 80 dont put more
+#default = 40
+CustomSubclassLvl = 40
+
# ------------------------------------------
# Section: Grade & Weight Penalties Controls
# ------------------------------------------
Index: src/main/java/net/l2emuproject/Config.java
===================================================================
--- src/main/java/net/l2emuproject/Config.java	(revision 1600)
+++ src/main/java/net/l2emuproject/Config.java	(working copy)
@@ -830,6 +830,9 @@
	public static int			TITLE_COLOR_FOR_AMMOUNT4;
	public static int			TITLE_COLOR_FOR_AMMOUNT5;

+	// ----------- custom subclass lvl --------------
+	public static int			CUSTOM_SUBCLASS_LVL;
+
	//*********************************************************
	public static void loadCustomConfig()
	{
@@ -894,6 +897,10 @@
			ALLOW_TELE_IN_SIEGE_TOWN = Boolean.parseBoolean(customSettings.getProperty("AllowTeleportInSiegeTown", "false"));
			ALT_MANA_POTIONS = Boolean.parseBoolean(customSettings.getProperty("AllowManaPotions", "false"));
			FORCE_UPDATE_RAIDBOSS_ON_DB = Boolean.parseBoolean(customSettings.getProperty("ForceUpdateRaidBossOnDB", "false"));
+
+			// ----------- custom subclass lvl ------------
+			CUSTOM_SUBCLASS_LVL = Integer.parseInt(customSettings.getProperty("CustomSubclassLvl", "40"));
+
		}
		catch (Exception e)
		{
Index: src/main/java/net/l2emuproject/gameserver/model/base/SubClass.java
===================================================================
--- src/main/java/net/l2emuproject/gameserver/model/base/SubClass.java	(revision 1600)
+++ src/main/java/net/l2emuproject/gameserver/model/base/SubClass.java	(working copy)
@@ -14,6 +14,8 @@
  */
package net.l2emuproject.gameserver.model.base;

+import net.l2emuproject.Config;
+
/**
  * Character Sub-Class Definition
  * <BR>
@@ -24,9 +26,9 @@
public final class SubClass
{
	private ClassId	_class;
-	private long	_exp		= Experience.LEVEL[40];
+	private long	_exp		= Experience.LEVEL[Config.CUSTOM_SUBCLASS_LVL];
	private int		_sp			= 0;
-	private byte	_level		= 40;
+	private byte	_level		= (byte)Config.CUSTOM_SUBCLASS_LVL;
	private int		_classIndex	= 1;

	public SubClass(int classId, long exp, int sp, byte level, int classIndex)

 

works fine for me i use l2emu gracia pt2

Link to comment
Share on other sites

  • 2 weeks later...

here is the .patch file

Index: config/main/custom.properties
===================================================================
--- config/main/custom.properties	(revision 1600)
+++ config/main/custom.properties	(working copy)
@@ -97,6 +97,11 @@
# default = 3
MaxSubClass = 3

+#Custom lvl when player add new subclass
+#min = 40 max = 80 dont put more
+#default = 40
+CustomSubclassLvl = 40
+
# ------------------------------------------
# Section: Grade & Weight Penalties Controls
# ------------------------------------------
Index: src/main/java/net/l2emuproject/Config.java
===================================================================
--- src/main/java/net/l2emuproject/Config.java	(revision 1600)
+++ src/main/java/net/l2emuproject/Config.java	(working copy)
@@ -830,6 +830,9 @@
	public static int			TITLE_COLOR_FOR_AMMOUNT4;
	public static int			TITLE_COLOR_FOR_AMMOUNT5;

+	// ----------- custom subclass lvl --------------
+	public static int			CUSTOM_SUBCLASS_LVL;
+
	//*********************************************************
	public static void loadCustomConfig()
	{
@@ -894,6 +897,10 @@
			ALLOW_TELE_IN_SIEGE_TOWN = Boolean.parseBoolean(customSettings.getProperty("AllowTeleportInSiegeTown", "false"));
			ALT_MANA_POTIONS = Boolean.parseBoolean(customSettings.getProperty("AllowManaPotions", "false"));
			FORCE_UPDATE_RAIDBOSS_ON_DB = Boolean.parseBoolean(customSettings.getProperty("ForceUpdateRaidBossOnDB", "false"));
+
+			// ----------- custom subclass lvl ------------
+			CUSTOM_SUBCLASS_LVL = Integer.parseInt(customSettings.getProperty("CustomSubclassLvl", "40"));
+
		}
		catch (Exception e)
		{
Index: src/main/java/net/l2emuproject/gameserver/model/base/SubClass.java
===================================================================
--- src/main/java/net/l2emuproject/gameserver/model/base/SubClass.java	(revision 1600)
+++ src/main/java/net/l2emuproject/gameserver/model/base/SubClass.java	(working copy)
@@ -14,6 +14,8 @@
 */
package net.l2emuproject.gameserver.model.base;

+import net.l2emuproject.Config;
+
/**
 * Character Sub-Class Definition
 * <BR>
@@ -24,9 +26,9 @@
public final class SubClass
{
	private ClassId	_class;
-	private long	_exp		= Experience.LEVEL[40];
+	private long	_exp		= Experience.LEVEL[Config.CUSTOM_SUBCLASS_LVL];
	private int		_sp			= 0;
-	private byte	_level		= 40;
+	private byte	_level		= (byte)Config.CUSTOM_SUBCLASS_LVL;
	private int		_classIndex	= 1;

	public SubClass(int classId, long exp, int sp, byte level, int classIndex)

added on first post

also i add one import that i forgot sorry

Link to comment
Share on other sites

  • 2 months later...
Guest
This topic is now closed to further replies.


  • Posts

    • How's the project doing? Is there any news? It really interesting 🤔
    • thx for answer, i tried and woks encrypting, but i still having crashes 😞 i changed the icon in skillgrp.dat from "icon.skill0003" to "Myicons.misil" as i saved the file before endec and nothing. this is the report i got
    • New Season coming May 2024! First post updated      Website: L2Kain.net  Discord: https://discord.gg/l2kain  Wiki: https://info.kain.ws/   Important Dates   Server Start: TBD  Open Beta Test: 10th of May 2024!   Basic Information     Briefly about the concept of the server! We decided to move away from the standard Mid-Rate server concept and keep the mechanics of our beloved Lineage 2 that everyone loves! Massive battles for epic bosses, battles for profitable farming locations, resource spoilage and equipment crafting, daily instances, a balanced economy and much more. This server is build as a Craft-PvP concept. The goal is to gather players with a variety of preferences in the game and make a high-quality and interesting server with alternative character development options. We are well aware that "grinding" is an integral part of the game, but we diluted the boring and the same type of farming with interesting solutions and non-standard mechanics!   We have prepared a new High Five x25 on Modern Client for you. This server will be another step in the development of the platform and the project as a whole! Your appeals to those. support was not ignored, which means the new server will be even better than the previous one!      ⭐ Promotions and Bonuses for new players!     ⭐ Events and Giveaways daily!   ⭐ Rewards for Voting!   ℹ️ Server Rates Learn more about server rates! Server rates are configured in such a way that farming is best rewarded. Adena, drops, quests, various rewards and prices in the game store are well balanced among themselves!   Basic Server Rates:  ⭐ Experience & Skill Points - x25  ⭐ Adena Drop - x15 & Fixed Chance 66%  ⭐ Drop Rates - x10  ⭐ Spoil Rates - x10   Crafting keys, recipes drop & spoil with fixed amount from 2 to 3 and increased chances on all locations and quests  related to farm them.  ⭐ Quest Rates - x5  ⭐ Fortresses & Sieges - x5  ⭐ Raid Bosses & Epic Bosses - x1  ⭐ Weight Limit - x10      Connect with Us:  Discord: https://discord.gg/l2kain  Facebook: https://www.facebook.com/KainLineage2  TikTok: https://www.tiktok.com/@l2kain.net  YouTube: https://www.youtube.com/@Lineage2Kain
  • Topics

×
×
  • Create New...