Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Start Custom Level

Iniciado por Swarlog, Ago 19, 2022, 12:36 AM

Tema anterior - Siguiente tema

Swarlog

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]);
+ }
  }
 
  /**