Jump to content

Recommended Posts

Posted

hello folks,i dont know if this has been posted again,if it has u can delete it:

 

I made a little patch to allow my player to have more than 3 subclass.

The max subclass number can be changed in other.properties after having applied my patch.

 

Index: config/other.properties

===================================================================

--- config/other.properties (revision 1283)

+++ config/other.properties (working copy)

@@ -167,3 +167,8 @@

# Death Penalty chance if killed by mob (%)

#------------------------------------------

DeathPenaltyChance = 20

+

+#-----------------------------------------

+#Maximum number of subclass

+#-----------------------------------------

+MaxSubClass = 3

\ No newline at end of file

Index: net/sf/l2j/Config.java

===================================================================

--- net/sf/l2j/Config.java (revision 1283)

+++ net/sf/l2j/Config.java (working copy)

@@ -971,6 +971,9 @@

    /** Death Penalty chance */

    public static int  DEATH_PENALTY_CHANCE;

 

+ /** Max SubClass Number */

+ public static int  MAX_SUB;

+

    /** Player Protection control */

    public static int  PLAYER_SPAWN_PROTECTION;

    public static int  PLAYER_FAKEDEATH_UP_PROTECTION;

@@ -1552,6 +1555,7 @@

                JAIL_DISABLE_CHAT = Boolean.valueOf(otherSettings.getProperty("JailDisableChat", "True"));

               

                DEATH_PENALTY_CHANCE = Integer.parseInt(otherSettings.getProperty("DeathPenaltyChance", "20"));

+ MAX_SUB = Integer.parseInt(otherSettings.getProperty("MaxSubClass", "3"));

            }

            catch (Exception e)

            {

Index: net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1283)

+++ net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)

@@ -8292,7 +8292,7 @@

      */

    public boolean addSubClass(int classId, int classIndex)

    {

-    if (getTotalSubClasses() == 3 || classIndex == 0)

+    if (getTotalSubClasses() == Config.MAX_SUB || classIndex == 0)

    return false;

 

    if (getSubClasses().containsKey(classIndex))

 

Index: net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java

===================================================================

--- net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 1283)

+++ net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy)

@@ -197,7 +197,7 @@

            {

                case 1: // Add Subclass - Initial

                    // Avoid giving player an option to add a new sub class, if they have three already.

-                    if (player.getTotalSubClasses() == 3)

+                    if (player.getTotalSubClasses() == Config.MAX_SUB)

                    {

                        player.sendMessage("You can now only change one of your current sub classes.");

                        return;

 

 

 

enjoy

 

Posted

hello folks,i dont know if this has been posted again,if it has u can delete it:

 

I made a little patch to allow my player to have more than 3 subclass.

The max subclass number can be changed in other.properties after having applied my patch.

Index: config/other.properties

===================================================================

--- config/other.properties  (revision 1283)

+++ config/other.properties  (working copy)

@@ -167,3 +167,8 @@

# Death Penalty chance if killed by mob (%)

#------------------------------------------

DeathPenaltyChance = 20

+

+#-----------------------------------------

+#Maximum number of subclass

+#-----------------------------------------

+MaxSubClass = 3

\ No newline at end of file

Index: net/sf/l2j/Config.java

===================================================================

--- net/sf/l2j/Config.java  (revision 1283)

+++ net/sf/l2j/Config.java  (working copy)

@@ -971,6 +971,9 @@

    /** Death Penalty chance */

    public static int  DEATH_PENALTY_CHANCE;

 

+  /** Max SubClass Number */

+  public static int  MAX_SUB;

+

    /** Player Protection control */

    public static int  PLAYER_SPAWN_PROTECTION;

    public static int  PLAYER_FAKEDEATH_UP_PROTECTION;

@@ -1552,6 +1555,7 @@

                JAIL_DISABLE_CHAT = Boolean.valueOf(otherSettings.getProperty("JailDisableChat", "True"));

               

                DEATH_PENALTY_CHANCE = Integer.parseInt(otherSettings.getProperty("DeathPenaltyChance", "20"));

+            MAX_SUB = Integer.parseInt(otherSettings.getProperty("MaxSubClass", "3"));

            }

            catch (Exception e)

            {

Index: net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java  (revision 1283)

+++ net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java  (working copy)

@@ -8292,7 +8292,7 @@

      */

    public boolean addSubClass(int classId, int classIndex)

    {

-      if (getTotalSubClasses() == 3 || classIndex == 0)

+      if (getTotalSubClasses() == Config.MAX_SUB || classIndex == 0)

          return false;

 

        if (getSubClasses().containsKey(classIndex))

 

Index: net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java

===================================================================

--- net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java  (revision 1283)

+++ net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java  (working copy)

@@ -197,7 +197,7 @@

            {

                case 1: // Add Subclass - Initial

                    // Avoid giving player an option to add a new sub class, if they have three already.

-                    if (player.getTotalSubClasses() == 3)

+                    if (player.getTotalSubClasses() == Config.MAX_SUB)

                    {

                        player.sendMessage("You can now only change one of your current sub classes.");

                        return;

 

 

enjoy

 

 

So where are proper credits?

Posted

So this is you work?

 

Could you check All The pack source? You will see all of them have this option ....

 

And you tell me you made it?

 

 

Posted

 

enjoy

 

 

 

So where are proper credits?

 

i dont want to start a war:D

i just replied at ur post for the proper credits because of this:

 

omg man... go there IVoicedCommandHandler.java and see what's wrong....

 

WTF You want all ready?

 

//The End

Posted

i dont want to start a war:D

i just replied at ur post for the proper credits because of this:

 

omg man... go there IVoicedCommandHandler.java and see what's wrong....

 

WTF You want all ready?

 

//The End

 

What war? O.o i think you are alot of topic... [Warned]

 

Topic ~Locked seems this is a c/p and lot of pack's have it already!.

Guest
This topic is now closed to further replies.


×
×
  • Create New...