Jump to content

Recommended Posts

Posted

as title says when someone login in game and his char is lvl 1 he will get the lvl you put in config

 

here is the patch

Index: config/main/altgame.properties
===================================================================
--- config/main/altgame.properties	(revision 1710)
+++ config/main/altgame.properties	(working copy)
@@ -121,6 +121,11 @@
DwarfRecipeLimit = 50
CommonRecipeLimit = 50

+# Allow custom starting lvl default:false
+AllowCustomStartLvl = false
+#Custom Start lvl for 85 lvl and 100% put 86
+CustomStartLvl = 1
+
# ----------------
# Section: Summons
# ----------------
Index: src/main/java/net/l2emuproject/Config.java
===================================================================
--- src/main/java/net/l2emuproject/Config.java	(revision 1710)
+++ src/main/java/net/l2emuproject/Config.java	(working copy)
@@ -1878,6 +1878,10 @@
	// ---------- Summons ---------------------------------------
	public static float			ALT_GAME_SUMMON_PENALTY_RATE;			// Alternative game summon penalty

+	// ------------ custom start lvl ------------
+	public static boolean		ALLOW_CUSTOM_CHAR_LVL;
+	public static int		CUSTOM_CHAR_LVL;
+
	//********************************************************************************************
	public static void loadAltConfig()
	{
@@ -1926,6 +1930,10 @@

			// ----------- Summmons -------------- 
			ALT_GAME_SUMMON_PENALTY_RATE = Float.parseFloat(altSettings.getProperty("AltSummonPenaltyRate", "1."));
+
+			// ------------ custom start lvl ------------
+			ALLOW_CUSTOM_CHAR_LVL = Boolean.parseBoolean(altSettings.getProperty("AllowCustomStartLvl", "false"));
+			CUSTOM_CHAR_LVL = Integer.parseInt(altSettings.getProperty("CustomStartLvl", "1"));
		}
		catch (Exception e)
		{
Index: src/main/java/net/l2emuproject/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- src/main/java/net/l2emuproject/gameserver/network/clientpackets/EnterWorld.java	(revision 1710)
+++ src/main/java/net/l2emuproject/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -43,6 +43,7 @@
import net.l2emuproject.gameserver.model.L2World;
import net.l2emuproject.gameserver.model.actor.appearance.PcAppearance;
import net.l2emuproject.gameserver.model.actor.instance.L2PcInstance;
+import net.l2emuproject.gameserver.model.base.Experience;
import net.l2emuproject.gameserver.model.entity.Castle;
import net.l2emuproject.gameserver.model.entity.ClanHall;
import net.l2emuproject.gameserver.model.entity.Couple;
@@ -568,6 +569,11 @@

		if (activeChar.isCursedWeaponEquipped())
			CursedWeaponsManager.getInstance().getCursedWeapon(activeChar.getCursedWeaponEquippedId()).cursedOnLogin(activeChar);
+
+		if (Config.ALLOW_CUSTOM_CHAR_LVL && (activeChar.getLevel() == 1))
+		{
+			activeChar.getStat().addExp(Experience.LEVEL[Config.CUSTOM_CHAR_LVL]);
+		}
	}

	/**

 

if you put in config 85 level the char will be 85 lvl and 0% if you need 85 lvl and 100% put in config 86

 

works for me on l2emu gracia part 2

Posted

1st- Using a lot of ifs in that case is just dumb, use switch instead;

2nd- Enterworld is not the proper place to use it, it works indeed, but its not the right place.

3rd- Using that on Enterworld without actually checking if its the main cass is just dumb since if someone relogs with a Sub he'll get max level too ,it may be what you want, but its not safe. Just add a if(getActiveClass().isSub()).

4th- You shouldn't use a switch or ifs at all,just get the value from the Config and Compare it to the CharacterExperience and thus getting the right exp ^^

Posted

the char must be lvl 1 to get the exp this way when someone relogs he wont take more exp

 

 

EDIT: i update the first post now i think the code is better than before

Posted

the char must be lvl 1 to get the exp this way when someone relogs he wont take more exp

 

 

EDIT: i update the first post now i think the code is better than before

Exactly,thats what I meant.That is not only cleaner code ,you also removed useless code and made it faster ^^ gz. But still its not the right place ;)

Posted

I alredy shared that please search before share things.

 

http://www.maxcheaters.com/forum/index.php?topic=46604.0

 

Also what Horus is try to say is that code is better in the charactercreate clientpacket not in enterworld but anyway ok

Posted

lol i search and i saw your topic

on my code you can put what ever you want for start lvl in yours its just full lvl

Posted

I alredy shared that please search before share things.

 

http://www.maxcheaters.com/forum/index.php?topic=46604.0

 

Also what Horus is try to say is that code is better in the charactercreate clientpacket not in enterworld but anyway ok

Sorry I completely forgot about this Thread lool. Indeed its much smarter on charactercreate , that way you avoid a useless check on Enterworld = Slightly (REALLY Slightly lol) more Stable Server.

Posted

i think alrdy posted

Yes indeed its already posted on Intrepid's Thread, although this is a different method which doesn't make much sense but oke ^^

  • 1 month later...
Guest
This topic is now closed to further replies.


  • Posts

    • WTB Character on Lineage 2 Reborn - Origins 1x Server   Looking for lvl 80+ character (3 subclasses )+ clean email  Classes im mostly intrested about are: Mystic Muse Adventurer Ghost Hunter Soul Hound Grand Khavatari Titan   Im looking forward for your PM's here on Max website or leave a comment down below with your discord or any contact in case you have any of those classes. If you have any other class that are not mentioned drop a PM aswell might be intrested in other classes i haven't mentioned aswell if its high lvl and has good potential.
    • Thanks for showing us this post, it is clearly seen that some user names pulling hate in that post, have the same name here in maxcheaters.... it is very interesting information, as it shows that the same users here at maxcheaters are scouring other forum posts to spew their hate. this does not affect much, as the customers understand, that there are only 4 or 5 people globally trying to harm our project.... the rest are all happy, luckily 🙂   Greetings. PD: You still don't understand that this is going to spread to many servers and it's something you can't avoid... you understand that, don't you? By the way, if you used an extender like ours, maybe you wouldn't have to reopen your server hundreds of times over the years.
    • 🚨 L2MID RETURNS IN 2025! 🚨 After 3 long years… The wait is FINALLY over! One of the most legendary Lineage 2 server is coming back stronger, sharper, and more competitive than ever before. 💎 All users who vote will receive exclusive gifts in the future! 👉 Cast your vote now!  https://l2mid.com/vote/ Let’s make this the most epic comeback ever! Stay tuned for more updates and invite your friends L2Mid is BACK!
    • Yeah I also “heard” you are pretty popular over there 🙂 especially in Ukraine/RU   https://mmo-dev.info/threads/⭐-l2off-h5-gx-ext⭐.33144/
    • I do not disclose information about my clients 🙂 you will see them online for example, in brazil, argentina and chile. Have great sales.   Best regards.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock