Jump to content
  • 0

Set Character Level in charactercreate.java?


Question

Posted

Ok well as the title says I would like to set the character level from the configs:

 

Here is what I have coded so far:

//SWS FACTION MOD
	if (Config.FACTION_SYSTEM_ENABLE_SET_NEW_CHAR_LEVEL;)
	{
		newChar.
	}

 

So from my code you can see that I have a boolean config to enable the function and inside the function at:

newChar.

I don't know what to code to add in order to be able to specify from the configs that i want to set the level ingame.

 

Anyway I want it to look something like this:

//SWS FACTION MOD
	if (Config.FACTION_SYSTEM_ENABLE_SET_NEW_CHAR_LEVEL;)
	{
		newChar.SetLevel(Config.FACTION_SYSTEM_SET_NEW_CHAR_LEVEL;)
	}

 

 

3 answers to this question

Recommended Posts

  • 0
Posted

Code for CharacterCreate.java

 

		if (Config.STARTING_LEVEL > 1)
	{
		if(Config.STARTING_LEVEL > Experience.MAX_LEVEL)
			Config.STARTING_LEVEL = Experience.MAX_LEVEL;
		newChar.addExpAndSp(Experience.LEVEL[Config.STARTING_LEVEL], 0);
	}

 

Code for Config.java

 

Variable at begining:

 

public static byte STARTING_LEVEL;

 

Second part:

 

int startLevel = Integer.parseInt(L2JModSettings.getProperty("StartingLevel", "1"));
STARTING_LEVEL = (byte) startLevel;

 

At the end:

 

		else if (pName.equalsIgnoreCase("StartingLevel"))
	{
		STARTING_LEVEL = Byte.parseByte(pValue);
	}

 

Done, I won't make patch its so easy to add it.

  • 0
Posted

Wow that was really helpful Matim thanks worked like a charm.

 

Good, problem solved, topic locked.

Guest
This topic is now closed to further replies.


×
×
  • Create New...