Jump to content
  • 0

[Help] Removing Kamaels


Question

Posted

Hey i got a freya L2jServer and i want to completly remove the kamaels from the gameplay.

could anyone help me disabling the character creation for the race Kamael?

thx

4 answers to this question

Recommended Posts

  • 0
Posted

edit for  this java code and test :)

Index: L2_GameServer_t1/java/config/altsettings.properties
===================================================================
--- L2_GameServer_t1/java/config/altsettings.properties	(revision 1457)
+++ L2_GameServer_t1/java/config/altsettings.properties	(working copy)
@@ -308,3 +308,11 @@
CaptainCost = 27
CommanderCost = 30
HeroCost = 33
+
+#Allowing race to be created (Default True)
+AltAllowHuman = True
+AltAllowElf = True
+AltAllowDarkElf = True
+AltAllowOrc = True
+AltAllowDwarf = True
+AltAllowKamael = False
\ No newline at end of file
Index: L2_GameServer_t1/java/net/sf/l2j/Config.java
===================================================================
--- L2_GameServer_t1/java/net/sf/l2j/Config.java	(revision 1457)
+++ L2_GameServer_t1/java/net/sf/l2j/Config.java	(working copy)
@@ -1175,6 +1175,14 @@
     /** Alt Settings for devs */
     public static boolean ALT_DEV_NO_QUESTS;
     public static boolean ALT_DEV_NO_SPAWNS;
+    
+    /** Allow races to be created */
+    public static boolean ALLOW_HUMAN;
+    public static boolean ALLOW_ELF;
+    public static boolean ALLOW_DARKELF;
+    public static boolean ALLOW_ORC; 
+    public static boolean ALLOW_DWARF;
+    public static boolean ALLOW_KAMAEL; // Kamel, the new race


     /**
@@ -1729,6 +1737,13 @@

                 ALT_DEV_NO_QUESTS                = Boolean.parseBoolean(altSettings.getProperty("AltDevNoQuests", "False"));
                 ALT_DEV_NO_SPAWNS                = Boolean.parseBoolean(altSettings.getProperty("AltDevNoSpawns", "False"));
+                
+                ALLOW_HUMAN                     = Boolean.parseBoolean(altSettings.getProperty("AltAllowHuman", "True"));
+                ALLOW_ELF                       = Boolean.parseBoolean(altSettings.getProperty("AltAllowElf", "True"));
+                ALLOW_DARKELF                   = Boolean.parseBoolean(altSettings.getProperty("AltAllowDarkElf", "True"));
+                ALLOW_ORC                       = Boolean.parseBoolean(altSettings.getProperty("AltAllowOrc", "True"));
+                ALLOW_DWARF                     = Boolean.parseBoolean(altSettings.getProperty("AltAllowDwarf", "True"));
+                ALLOW_KAMAEL                    = Boolean.parseBoolean(altSettings.getProperty("AltAllowKamael", "True"));

                 // Dimensional Rift Config
                 RIFT_MIN_PARTY_SIZE              = Integer.parseInt(altSettings.getProperty("RiftMinPartySize", "5"));
@@ -2428,6 +2443,14 @@
         else if (pName.equalsIgnoreCase("GlobalChat")) DEFAULT_GLOBAL_CHAT = pValue;
         else if (pName.equalsIgnoreCase("TradeChat"))  DEFAULT_TRADE_CHAT = pValue;
         else if (pName.equalsIgnoreCase("MenuStyle"))  GM_ADMIN_MENU_STYLE = pValue;
+        
+        else if(pName.equalsIgnoreCase("AllowHuman")) ALLOW_HUMAN = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowElf")) ALLOW_ELF = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowDarkElf")) ALLOW_DARKELF = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowOrc")) ALLOW_ORC = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowDwarf")) ALLOW_DWARF = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowKamael")) ALLOW_KAMAEL = Boolean.valueOf(pValue);
+        
         else return false;
         return true;
     }
Index: L2_GameServer_t1/java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java
===================================================================
--- L2_GameServer_t1/java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java	(revision 1457)
+++ L2_GameServer_t1/java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java	(working copy)
@@ -114,6 +114,22 @@
			sendPacket(ccf);
			return;
		}
+        //Disallow a race to be created, Example: Kamael coudn't be created if AltKamaelAllow = False
+        else if(
+                (!Config.ALLOW_HUMAN && (_classId==0x00 || _classId==0x0a))   ||
+                (!Config.ALLOW_ELF && (_classId==0x12 || _classId==0x19))     || 
+                (!Config.ALLOW_DARKELF && (_classId==0x1f || _classId==0x26)) || 
+                (!Config.ALLOW_ORC && (_classId==0x2c || _classId==0x31))     || 
+                (!Config.ALLOW_DWARF && _classId==0x35)                       || 
+                (!Config.ALLOW_KAMAEL && (_classId==0x7b || _classId==0x7C))
+               )
+        {
+            if (Config.DEBUG)
+                _log.fine("charname: "+ _name + " is kamael and has been disabled.");
+            CharCreateFail ccf = new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED);
+            sendPacket(ccf);
+            return;
+        }

  • 0
Posted

edit for  this java code and test :)

Index: L2_GameServer_t1/java/config/altsettings.properties
===================================================================
--- L2_GameServer_t1/java/config/altsettings.properties	(revision 1457)
+++ L2_GameServer_t1/java/config/altsettings.properties	(working copy)
@@ -308,3 +308,11 @@
CaptainCost = 27
CommanderCost = 30
HeroCost = 33
+
+#Allowing race to be created (Default True)
+AltAllowHuman = True
+AltAllowElf = True
+AltAllowDarkElf = True
+AltAllowOrc = True
+AltAllowDwarf = True
+AltAllowKamael = False
\ No newline at end of file
Index: L2_GameServer_t1/java/net/sf/l2j/Config.java
===================================================================
--- L2_GameServer_t1/java/net/sf/l2j/Config.java	(revision 1457)
+++ L2_GameServer_t1/java/net/sf/l2j/Config.java	(working copy)
@@ -1175,6 +1175,14 @@
     /** Alt Settings for devs */
     public static boolean ALT_DEV_NO_QUESTS;
     public static boolean ALT_DEV_NO_SPAWNS;
+    
+    /** Allow races to be created */
+    public static boolean ALLOW_HUMAN;
+    public static boolean ALLOW_ELF;
+    public static boolean ALLOW_DARKELF;
+    public static boolean ALLOW_ORC; 
+    public static boolean ALLOW_DWARF;
+    public static boolean ALLOW_KAMAEL; // Kamel, the new race


     /**
@@ -1729,6 +1737,13 @@

                 ALT_DEV_NO_QUESTS                = Boolean.parseBoolean(altSettings.getProperty("AltDevNoQuests", "False"));
                 ALT_DEV_NO_SPAWNS                = Boolean.parseBoolean(altSettings.getProperty("AltDevNoSpawns", "False"));
+                
+                ALLOW_HUMAN                     = Boolean.parseBoolean(altSettings.getProperty("AltAllowHuman", "True"));
+                ALLOW_ELF                       = Boolean.parseBoolean(altSettings.getProperty("AltAllowElf", "True"));
+                ALLOW_DARKELF                   = Boolean.parseBoolean(altSettings.getProperty("AltAllowDarkElf", "True"));
+                ALLOW_ORC                       = Boolean.parseBoolean(altSettings.getProperty("AltAllowOrc", "True"));
+                ALLOW_DWARF                     = Boolean.parseBoolean(altSettings.getProperty("AltAllowDwarf", "True"));
+                ALLOW_KAMAEL                    = Boolean.parseBoolean(altSettings.getProperty("AltAllowKamael", "True"));

                 // Dimensional Rift Config
                 RIFT_MIN_PARTY_SIZE              = Integer.parseInt(altSettings.getProperty("RiftMinPartySize", "5"));
@@ -2428,6 +2443,14 @@
         else if (pName.equalsIgnoreCase("GlobalChat")) DEFAULT_GLOBAL_CHAT = pValue;
         else if (pName.equalsIgnoreCase("TradeChat"))  DEFAULT_TRADE_CHAT = pValue;
         else if (pName.equalsIgnoreCase("MenuStyle"))  GM_ADMIN_MENU_STYLE = pValue;
+        
+        else if(pName.equalsIgnoreCase("AllowHuman")) ALLOW_HUMAN = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowElf")) ALLOW_ELF = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowDarkElf")) ALLOW_DARKELF = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowOrc")) ALLOW_ORC = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowDwarf")) ALLOW_DWARF = Boolean.valueOf(pValue);
+        else if(pName.equalsIgnoreCase("AllowKamael")) ALLOW_KAMAEL = Boolean.valueOf(pValue);
+        
         else return false;
         return true;
     }
Index: L2_GameServer_t1/java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java
===================================================================
--- L2_GameServer_t1/java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java	(revision 1457)
+++ L2_GameServer_t1/java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java	(working copy)
@@ -114,6 +114,22 @@
			sendPacket(ccf);
			return;
		}
+        //Disallow a race to be created, Example: Kamael coudn't be created if AltKamaelAllow = False
+        else if(
+                (!Config.ALLOW_HUMAN && (_classId==0x00 || _classId==0x0a))   ||
+                (!Config.ALLOW_ELF && (_classId==0x12 || _classId==0x19))     || 
+                (!Config.ALLOW_DARKELF && (_classId==0x1f || _classId==0x26)) || 
+                (!Config.ALLOW_ORC && (_classId==0x2c || _classId==0x31))     || 
+                (!Config.ALLOW_DWARF && _classId==0x35)                       || 
+                (!Config.ALLOW_KAMAEL && (_classId==0x7b || _classId==0x7C))
+               )
+        {
+            if (Config.DEBUG)
+                _log.fine("charname: "+ _name + " is kamael and has been disabled.");
+            CharCreateFail ccf = new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED);
+            sendPacket(ccf);
+            return;
+        }

 

Thats not remove only disallow to be created which dont make sense at all but anyway...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Hello everyone, I am looking to purchase a Premium Lineage 2 High Five server pack. My main requirements are: Stability & Quality (Most Important): The pack must be highly stable with no system errors or major bugs. Custom Features: It must include ready-to-use custom features such as a fully functional Community Board, custom NPC Buffers, and Custom Item Sellers (GM Shops), etc. Complete Files: It is absolutely necessary that the full source code (src) and complete Geodata are included. If you are selling a pack that meets these criteria, please send me a PM or leave a reply with the following information: Brief details and key features of the pack Price Test server availability (I would like to test it before buying) Thank you!
    • L2jmobiusDevClon — Classic Interlude p110 Emulator L2jmobiusDevClon is actively developing a Lineage 2 Classic Interlude p110 emulator. Development is done in free time with a strong focus on: • Stability • Authentic Classic mechanics • Clean and optimized architecture The project is based on the L2jMobius source and is continuously evolving and improving. System Requirements: • Java 25 • MariaDB 12.0 • Client p110 Current Revision: 3.0 Development Status: Active Distribution: Free Official Website: https://www.l2jmobiusdevclon.pp.ua Discord Server: https://discord.gg/23a9S8g4Bn Contact: Telegram — @L2jmobiusDevClon Also available via private messages Project Goals: ✔ Improved stability ✔ Maximum Classic accuracy ✔ Core optimization We are currently looking for: • Testers • Server administrators Suggestions, bug reports, and ideas are always welcome. Contact us via: ✔ Discord ✔ Telegram ✔ Private Messages
    • i guess loading only the effects that are needed it will maybe work, like removing from reshade shader folder the ones that are not needed, depends on the pc also i guess, also limithing the game at 30fps can be better maybe
    • Up   SELL CHARACTERS L2 REBORN FRANZ x1     destroyer 74 lvl naked - 120 euro sws 71 lvl naked - 120 euro pp 66 skills - 120 euro se 64 lvl - 90 euro   Characters are legit with mail   i can wtt the characters for adena server franz   sell adena franz 250kk stock     add discord topeseller4081  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..