Secret Experience

Secret Experience (https://secretexperience.net/index.php)
-   [Lineage] Java Mods (https://secretexperience.net/forumdisplay.php?f=636)
-   -   [L2JEmu] Modificando LvL Inicial (https://secretexperience.net/showthread.php?t=34253)

Setokaiba 03-10-2013 05:19 PM

Modificando LvL Inicial
 
Descrição: Permite configurar para que o personagem já seja criado em determinado level.

Testado no Gracia Parte 2.

Patch:
Código:

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

Se você configurar como 85, será assim level 85 e 0% de EXP.
Se você quer o level 85 com 100% de EXP, basta colocar 86 na configuração.


Horários baseados na GMT -3. Agora são 11:50 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.