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


×
×
  • 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..