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

    • L2Elixir – Patch 4 Is Live!   We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.    ⚙️ General Enabled Class Change service (same class type only) ALT + B → Services → Character Development Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!    🎒 Items Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior) Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item) Added Dualsword Craft Stamp into Milestone Exchange list    🧙 Skills Fixed Banish Undead lethal chance Hot Springs Malaria and similar effects now level up faster while being attacked
    • thats new SEO level tricks you know nothing of noob - bottom line: exposed.
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away!   @Atom @Celestine
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away! @Celestine @Atom
  • 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