Jump to content

Recommended Posts

Posted

Hello !

Here is mine simple script.

This script will allow the normal players to equip the hero items !

And Here is it:

Index: /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/Config.java

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

--- /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/Config.java (revision 341)

+++ /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/Config.java (revision 342)

@@ -319,4 +319,5 @@

    public static int      DONATOR_NAME_COLOR;

    public static int      DONATOR_TITLE_COLOR;

+    public static boolean  STRICT_HERO_SYSTEM;

   

    /** Event Settings Parameters */

@@ -1653,4 +1654,5 @@

                DONATOR_NAME_COLOR              = Integer.decode("0x" + Modifications.getProperty("DonatorColorName", "00FFFF"));

                DONATOR_TITLE_COLOR              = Integer.decode("0x" + Modifications.getProperty("DonatorTitleColor", "00FF00"));

+                STRICT_HERO_SYSTEM              = Boolean.parseBoolean(Modifications.getProperty("StrictHeroSystem", "true"));

            }

            catch (Exception e)

Index: /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/Inventory.java

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

--- /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/Inventory.java (revision 281)

+++ /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/Inventory.java (revision 342)

@@ -936,6 +936,5 @@

            L2PcInstance player = (L2PcInstance)getOwner();

           

-            if(!player.isGM())

-                if (!player.isHero())

+            if (Config.STRICT_HERO_SYSTEM && !player.isGM() &&  !player.isHero())

                {

                    int itemId = item.getItemId();

@@ -1197,6 +1196,5 @@

                L2PcInstance player = (L2PcInstance)getOwner();

               

-                 if(!player.isGM())

-                     if (!player.isHero())

+                 if (Config.STRICT_HERO_SYSTEM && !player.isGM() &&  !player.isHero())

                    {

                        int itemId = item.getItemId();

Index: /Server/SkyLanceR's_IL_GS/Settings/Modifications.properties

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

--- /Server/SkyLanceR's_IL_GS/Settings/Modifications.properties (revision 341)

+++ /Server/SkyLanceR's_IL_GS/Settings/Modifications.properties (revision 342)

@@ -233,4 +233,8 @@

EnchantHeroWeapons = False

 

+# Hero Items Can Be Weared Only By Heros ?

+# Default: True

+StrictHeroSystem = True

+

Its realy simple.

I hope that is useful

  • 1 month later...
Posted

Oh come on... Share for JUST an if statement? You have to be kidding... This exists everywhere.

 

 

are you sure ? I have seeng it only in l2emu

  • 1 year later...
Posted

are you sure ? I have seeng it only in l2emu

 

You can't say that because e.g: I can me too or somebody else to take a look into Inventory.java and we can see these linies and then make this config. If other had the same idea before us that doesn't mean isn't our work (I can't call it "work" but whatever).

  • 6 months later...
  • 1 month later...

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

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