Jump to content
  • 0

[Help] Removing Kamaels


Question

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Still looking for adaption on Vanganth GF extender adapted for modern client.
    • Why the fuck would u implement russian / polak memes into a codebase a customer uses..   Jesus christ grow up
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Okay, I understand. First, to get started by contributing to open projects and learning along the way. Then, when you mention starting my own project privately, do you mean taking a free datapack like L2jMobius and trying to make it functional for an online server? Great, thank you very much — all this information is really helpful. I’ve been reaching out to several server admins here in Argentina, but it seems like none of them have the time or interest to take on an intern or assistant. xd   P.S.: Are you the creator of Hopzone? Brings back memories of when I was a kid, downloading servers at the cyber café. For two dollars, I could spend the whole day playing and eating candy like crazy.   Another question: between L2jMobius, L2jServer, and aCis, which one has ALL of its code free? As you probably noticed, I'm using ChatGPT to help me translate things, lol, and it suggested the following: Project Status Open Source Accepts Juniors? Difficulty L2JMobius Very active Semi-closed Partially (with patches) Medium-High L2JServer Active Fully open Yes (directly on GitHub) Medium aCis Semi-active Unofficial Not very clear Low
  • Topics

×
×
  • Create New...