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

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
Reply to this topic...

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



×
×
  • Create New...