Jump to content

[Share]PvP Color system


Recommended Posts

Sto simeio          

if (Config.PLAYER_SPAWN_PROTECTION > 0)

            activeChar.setProtection(true);

@@ -3660,7 +3661,75 @@

        DuelManager.getInstance().broadcastToOppositTeam(this, update);

        }

}

 

merikoi den tha mporousan na vroun tin grammi epeidh eixes ksexasei na valeis oti prokeitai gia to l2Pcinstance kai oxi gia to enterworld  :P

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

I complied this no errors on L2j Freya

 

Will post further updates ^^

 

//EDIT

 

I was wrong by a lot 100 errors after manually inserting the patch :S

 

Can anyone update this to Freya?

maybe this?  http://maxcheaters.com/forum/index.php?topic=28059.msg791307#msg791307
Link to comment
Share on other sites

  • 5 weeks later...

Found this on Old L2jserver forum.

Works very nice.

 

 

Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java

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

 

        activeChar.sendPacket(new QuestList());
        loadTutorial(activeChar);

+        if (activeChar.getPvpKills()>100) activeChar.updatePvPColor(activeChar.getPvpKills());
+
        if (Config.PLAYER_SPAWN_PROTECTION > 0)
             activeChar.setProtection(true);

 

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

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

        }
   }
    
+   public void updatePvPColor(int pvpKillAmount)
+   {
+       if (isGM()) return;
+       String colorCode = "0xFFFF77";
+       if ((pvpKillAmount >= 500) && (pvpKillAmount <= 999)) colorCode = "0x006400";
+       else if ((pvpKillAmount >= 1000) && (pvpKillAmount <= 1499)) colorCode = "0xec5e00";
+       else if ((pvpKillAmount >= 1500) && (pvpKillAmount <= 1999)) colorCode = "0x00ffff";
+       else if ((pvpKillAmount >= 2000) && (pvpKillAmount <= 2499)) colorCode = "0x0054ff";
+       else if (pvpKillAmount >= 2500) colorCode = "0x0800ff";+       else colorCode = "0xFFFF77";
+       getAppearance().setTitleColor(Integer.decode(colorCode));
+   }
+   

 

 

in hexadecimal just put colors you would like to use.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...

Found this on Old L2jserver forum.

Works very nice.

 

 

Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java

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

 

         activeChar.sendPacket(new QuestList());
         loadTutorial(activeChar);

+        if (activeChar.getPvpKills()>100) activeChar.updatePvPColor(activeChar.getPvpKills());
+
         if (Config.PLAYER_SPAWN_PROTECTION > 0)
              activeChar.setProtection(true);

 

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

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

         }
    }
     
+   public void updatePvPColor(int pvpKillAmount)
+   {
+       if (isGM()) return;
+       String colorCode = "0xFFFF77";
+       if ((pvpKillAmount >= 500) && (pvpKillAmount <= 999)) colorCode = "0x006400";
+       else if ((pvpKillAmount >= 1000) && (pvpKillAmount <= 1499)) colorCode = "0xec5e00";
+       else if ((pvpKillAmount >= 1500) && (pvpKillAmount <= 1999)) colorCode = "0x00ffff";
+       else if ((pvpKillAmount >= 2000) && (pvpKillAmount <= 2499)) colorCode = "0x0054ff";
+       else if (pvpKillAmount >= 2500) colorCode = "0x0800ff";+       else colorCode = "0xFFFF77";
+       getAppearance().setTitleColor(Integer.decode(colorCode));
+   }
+   

 

 

in hexadecimal just put colors you would like to use.

 

This way you are making everything hardcoded into the server you cannot change the colors after. I believe what most want is some config file that will allow us to easily change those colors when ever wanted :)

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months 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...