Jump to content

[Share]3rd Job Restriction At SubClass


Recommended Posts

Hello...

Here Have a Little, Simple, And Basic Code For Restrict 3rd Jobs At Subclass

Maybe This Like For StuckSubs Servers.

 

.../AltSettings.properties

# Allow player sub-class addition without checking for unique quest items. 
AltSubClassWithoutQuests = False 

+# ----------------------
+#  SubClass Restriction 
+# ----------------------
+# This Balance System: 
+# Restrict player subclass if get 3rd job. 
+# Only can get 3rd job with base class and player can make 3rd job 
+# only after get all subclasses. default: False  
+Restrict3rdJobAtSubClass = False

+

.../Config.java

public static boolean               ALT_GAME_SUBCLASS_WITHOUT_QUESTS; 
+public static boolean       RESTRICT_3RDJOB_AT_SUBCLASS; 
--------
ALT_GAME_SUBCLASS_WITHOUT_QUESTS                            = Boolean.parseBoolean(altSettings.getProperty("AltSubClassWithoutQuests", "False")); 
+RESTRICT_3RDJOB_AT_SUBCLASS                                 = Boolean.parseBoolean(altSettings.getProperty("Restrict3rdJobAtSubClass", "False"));
--------
else if (pName.equalsIgnoreCase("AltSubClassWithoutQuests")) ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.valueOf(pValue); 
+else if (pName.equalsIgnoreCase("Restrict3rdJobAtSubClass")) RESTRICT_3RDJOB_AT_SUBCLASS = Boolean.valueOf(pValue);

 

gameserver/model/actor/instance/L2VillageMasterInstance.java

after this:

 if (player.getLevel() < 75)
                   {
                       player.sendMessage("You may not add a new sub class before you are level 75 on your previous class.");
                       allowAddition = false;
                   }

 

+ put this:

           if (Config.RESTRICT_3RDJOB_AT_SUBCLASS)
                   {
                      if (player.getClassId().getId() >= 88)
                     {
                   	player.sendMessage("You Cannot Add Subclass With 3rd Job, I'm Sorry!");
           			return; 
                     }
                   }

 

gameserver.model.actor.instance.L2ClassMasterInstance.java

after this:

                  case First:
		jobLevel = 1;
		break;
	case Second:
		jobLevel = 2;
		break;
	case Third:

 

+put this:

if (Config.RESTRICT_3RDJOB_AT_SUBCLASS)
        {
            if (player.isSubClassActive())
          {
        	player.sendMessage("You Only Get 3rd Job In Your Base Class!");
			return; 
          }
        }

 

Credits To Me :/

Link to comment
Share on other sites

  • 4 months later...
Guest
This topic is now closed to further replies.


  • Posts

    • CLExt PTS Classic Interlude - Extender       If you like to run a PTS Classic Interlude stable live server without any issues with all known bug issues already fixed, your choice is here!   Sometimes ppl question is why i dont choose any leak classic 3.0 example and i loose my time on this shit, its because i dont like any other chronicle of the game and im a lover of c3-c4, and the classic gameplay on Vanganth C4 Mother core as L2Server.exe is the best Rare base on PTS platform to play the classic client.   You will never see this gameplay at any java emulator.   Free ver, is 2.61 for thoses like to test datapack and if you like you can be subscriber.   Latest premium version is: 4.28.   Client link: https://www.mediafire.com/file/1d8xe18rvgi04lx/L2_Classic_Interlude_Client_V2.rar/file   Free 2.61 Server files: https://www.mediafire.com/file/mtqltep66asdguu/PTS_Vanganth_-_Classic_Interlude_P110.rar/file   Discord: https://discord.com/invite/aFKzdaDDvz   Enjoy! Have a good exploration!  
    • يمكنك الحصول على هراب مجلى كوري من خلال زيارة موقع السقاف اونلاين للحصول على كل ما يلزمك في منزلك من الأدوات الصحية المصنوعة بجودة و دقة متناهية و بأسعار لا مثيل لها في أي مكان آخر  https://alsaggaf.com.sa/product/%D9%87%D8%B1%D8%A7%D8%A8-%D9%85%D8%AC%D9%84%D9%89-%D9%83%D9%88%D8%B1%D9%8A-%D9%85%D9%86-%D8%B3%D9%8A%D9%88%D9%86-sm-33/
    • In l2j? There is probably something in the config files to allow all subclasses, i'm pretty sure. If not, one way is to go in the VillageMaster.java and check the function getSubclasses(). Then comment out the part where it removes all the kamael subclasses from the list.    
    • New review on an English-language resource: [IMG]https://i.imgur.com/4u8acWw.jpeg[/IMG]
  • 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