Jump to content

Recommended Posts

Posted

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 :/

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