Jump to content
  • 0

[question]how to change the subclass lvl?


jossoo

Question

12 answers to this question

Recommended Posts

  • 0
Index: config/main/custom.properties
===================================================================
--- config/main/other.properties	(revision 1600)
+++ config/main/other.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/l2j/Config.java
===================================================================
--- src/main/java/net/l2j/Config.java	(revision 1600)
+++ src/main/java/net/l2j/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(otherSettings.getProperty("AllowTeleportInSiegeTown", "false"));
			ALT_MANA_POTIONS = Boolean.parseBoolean(otherSettings.getProperty("AllowManaPotions", "false"));
			FORCE_UPDATE_RAIDBOSS_ON_DB = Boolean.parseBoolean(otherSettings.getProperty("ForceUpdateRaidBossOnDB", "false"));
+
+			// ----------- custom subclass lvl ------------
+			CUSTOM_SUBCLASS_LVL = Integer.parseInt(otherSettings.getProperty("CustomSubclassLvl", "40"));
+
		}
		catch (Exception e)
		{
Index: src/main/java/net/l2j/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.l2j.gameserver.model.base;

+import net.l2j.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 

credits: iNos

Link to comment
Share on other sites

  • 0

gameserver/model/base/SubClass.java

 

    private PlayerClass _class;
    private long _exp = Experience.LEVEL[40];
    private int _sp = 0;
    private byte _level = 40;
    private int _classIndex = 1;

 

Allakse ekei p leei 40, me oti 8es..  Dn xreiazete n kaneis config gia ka8e ti..

Link to comment
Share on other sites

  • 0

i have 1 litle problem(big)

first when i get 1 level i get also 1 hp/1cp 1 mp

2nd when i make restart i am again 40 level(i was 1 before restart)

i paste the code...if u can tell me what to change

 

public final class SubClass

{

private static final byte _maxLevel = Config.MAX_SUBCLASS_LEVEL < Experience.MAX_LEVEL ? Config.MAX_SUBCLASS_LEVEL : Experience.MAX_LEVEL - 1;

 

private PlayerClass _class;

private long _exp = Experience.LEVEL[40];

private int _sp = 0;

private byte _level = 40;

private int _classIndex = 1;

 

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

{

_class = PlayerClass.values()[classId];

_exp = exp;

_sp = sp;

_level = level;

_classIndex = classIndex;

}

 

public SubClass(int classId, int classIndex)

{

// Used for defining a sub class using default values for XP, SP and player level.

_class = PlayerClass.values()[classId];

_classIndex = classIndex;

}

 

public SubClass()

{

// Used for specifying ALL attributes of a sub class directly,

// using the preset default values.

}

 

public PlayerClass getClassDefinition()

{

return _class;

}

 

public int getClassId()

{

return _class.ordinal();

}

 

public long getExp()

{

return _exp;

}

 

public int getSp()

{

return _sp;

}

 

public byte getLevel()

{

return _level;

}

 

public int getClassIndex()

{

return _classIndex;

}

 

public void setClassId(int classId)

{

_class = PlayerClass.values()[classId];

}

 

public void setExp(long expValue)

{

if (expValue > (Experience.LEVEL[_maxLevel + 1] - 1))

expValue = (Experience.LEVEL[_maxLevel + 1] - 1);

 

_exp = expValue;

}

 

public void setSp(int spValue)

{

_sp = spValue;

}

 

public void setClassIndex(int classIndex)

{

_classIndex = classIndex;

}

 

public void setLevel(byte levelValue)

{

if (levelValue > _maxLevel)

levelValue = _maxLevel;

else if (levelValue < 40)

levelValue = 40;

 

_level = levelValue;

}

 

public void incLevel()

{

if (getLevel() == _maxLevel)

return;

 

_level++;

setExp(Experience.LEVEL[getLevel()]);

}

 

public void decLevel()

{

if (getLevel() == 40)

return;

 

_level--;

setExp(Experience.LEVEL[getLevel()]);

}

}

Link to comment
Share on other sites

  • 0

see the bug...

http://img695.imageshack.us/img695/5457/levelzm.jpg

 

also can i configure the class that char takes ?i dont want to take 2nd class..i want the first one ?

 

can i ?

Link to comment
Share on other sites

  • 0

see the bug...

http://img695.imageshack.us/img695/5457/levelzm.jpg

 

also can i configure the class that char takes ?i dont want to take 2nd class..i want the first one ?

 

can i ?

 

You can configure class master in config to allow only 1st class change, in configs.

Link to comment
Share on other sites

  • 0

look man i want to create somethink like rebirth ..

when u make subclass you will get the first class of your subclass and u will be 1 level..

 

if u can help me or post anything that will help me i will apriciate it much :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Thank you 😊👍 working great! 
    • MidnightSell team WTB/WTS GOLD TWW EU/US all servers Cataclysm all servers Payment Visa/Master/Btc/Eth/Trc-20/Erc-20 (all payments within 10 min) For all question pls dm Discord https://discord.gg/h8AN57qJjK Or Telegram @MidnightSell
    • GOSTEI MUITO DO VIASUAL DO SERVE COMO POSSO ADQUIRI ESSA REV PACK   
    • Helly everyone . I use L2jmobius interlude , i did everything , installed the db compiled the Build in eclipse Gameserver seems to lead OK , but it fails to connect to loginserver When i click to start the loginserver it says  "Loginserver terminated abnormally" This is wheat gameserver shows me :    [05/10 17:25:12] LoginServerThread: Connecting to login on 127.0.0.1:9014 [05/10 17:25:12] LoginServerThread: LoginServer not available, trying to reconnect... [05/10 17:25:17] LoginServerThread: Connecting to login on 127.0.0.1:9014 [05/10 17:25:17] LoginServerThread: LoginServer not available, trying to reconnect... [05/10 17:25:22] LoginServerThread: Connecting to login on 127.0.0.1:9014 [05/10 17:25:22] LoginServerThread: LoginServer not available, trying to reconnect...   And This is my login config file:   # --------------------------------------------------------------------------- # Login Server Settings # --------------------------------------------------------------------------- # This is the server configuration file. Here you can set up the connection information for your server. # This was written with the assumption that you are behind a router. # Dumbed Down Definitions... # LAN (LOCAL area network) - typically consists of computers connected to the same router as you. # WAN (WIDE area network) - typically consists of computers OUTSIDE of your router (ie. the internet). # x.x.x.x - Format of an IP address. Do not include the x'es into settings. Must be real numbers. # --------------------------------------------------------------------------- # Networking # --------------------------------------------------------------------------- # Bind ip of the LoginServer, use 0.0.0.0 to bind on all available IPs # WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u> # WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u> # Default: 0.0.0.0 LoginserverHostname = 0.0.0.0 # Default: 2106 LoginserverPort = 2106 # The address on which login will listen for GameServers, use * to bind on all available IPs # WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u> # WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u> # Default: 127.0.0.1 LoginHostname = 127.0.0.1 # The port on which login will listen for GameServers # Default: 9014 LoginPort = 9014 # --------------------------------------------------------------------------- # Database # --------------------------------------------------------------------------- # Specify the JDBC driver class for your database. # Default: org.mariadb.jdbc.Driver Driver = org.mariadb.jdbc.Driver # Database URL # Default: jdbc:mariadb://localhost/l2jmobiusinterlude?useUnicode=true&characterEncoding=utf-8&useSSL=false&connectTimeout=10000&interactiveClient=true&sessionVariables=wait_timeout=600,interactive_timeout=600&autoReconnect=true URL = jdbc:mariadb://localhost/l2jmobiusinterlude?useUnicode=true&characterEncoding=utf-8&useSSL=false&connectTimeout=10000&interactiveClient=true&sessionVariables=wait_timeout=600,interactive_timeout=600&autoReconnect=true # Database user info. Default is "root" but it's not recommended. Login = root # Database user password, leave empty for no password. Password = root # Maximum number of database connections to maintain in the pool. # Default: 5 MaximumDatabaseConnections = 5 # Determine whether database connections should be tested for availability. # Default: False TestDatabaseConnections = False # --------------------------------------------------------------------------- # Automatic Database Backup Settings # --------------------------------------------------------------------------- # Generate database backups when server restarts or shuts down.  BackupDatabase = False # Path to MySQL bin folder. Only necessary on Windows. MySqlBinLocation = C:/xampp/mysql/bin/ # Path where MySQL backups are stored. BackupPath = ../backup/ # Maximum number of days that backups will be kept. # Old files in backup folder will be deleted. # Set to 0 to disable. BackupDays = 30 # --------------------------------------------------------------------------- # Thread Configuration # --------------------------------------------------------------------------- # Defines the number of threads in the scheduled thread pool. # If set to -1, this will be determined by available processors divided by 2. ScheduledThreadPoolSize = 2 # Defines the number of threads in the instant thread pool. # If set to -1, this will be determined by available processors divided by 2. InstantThreadPoolSize = 2 # --------------------------------------------------------------------------- # Security # --------------------------------------------------------------------------- # How many times you can provide an invalid account/pass before the IP gets banned. # Default: 5 LoginTryBeforeBan = 5 # Time you won't be able to login back again after LoginTryBeforeBan tries to login. # Default: 900 (15 minutes) LoginBlockAfterBan = 900 # If set to True any GameServer can register on your login's free slots # Default: True AcceptNewGameServer = True # Flood Protection. All values are in milliseconds. # Default: True EnableFloodProtection = True # Default: 15 FastConnectionLimit = 15 # Default: 700 NormalConnectionTime = 700 # Default: 350 FastConnectionTime = 350 # Default: 50 MaxConnectionPerIP = 50 # --------------------------------------------------------------------------- # Misc Login Settings # --------------------------------------------------------------------------- # If False, the license (after the login) will not be shown. # Default: True ShowLicence = True # Default: True AutoCreateAccounts = True # Datapack root directory. # Defaults to current directory from which the server is started. DatapackRoot = . # --------------------------------------------------------------------------- # Scheduled Login Restart # --------------------------------------------------------------------------- # Enable disable scheduled login restart. # Default: False LoginRestartSchedule = False # Time in hours. # Default: 24 LoginRestartTime = 24    
  • Topics

×
×
  • Create New...