Jump to content

[Share]Hero Shine on PvP kills


Vago

Recommended Posts

Note:

1. This will not give you hero skills or allow you to buy a hero weapon. It will just give you the heroic glow.

2. Tested, working properlly.

3. If you dont know how to add a pack use search...Dont ask here

4. Credits to l2jforum.

 

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

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

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

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

@@ -488,6 +488,11 @@

 

private boolean _noble = false;

private boolean _hero = false;

+

+ /** Special hero aura values */

+ private int heroConsecutiveKillCount = 0;

+ private boolean isPermaHero = false;

+ private boolean isPVPHero = false;

 

/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */

private L2FolkInstance _lastFolkNpc = null;

@@ -1971,6 +1976,13 @@

public void setPvpKills(int pvpKills)

{

_pvpKills = pvpKills;

+

+ // Set hero aura if pvp kills > 100

+ if (pvpKills > 100)

+ {

+ isPermaHero = true;

+ setHeroAura(true);

+ }

}

 

/**

@@ -4678,6 +4690,14 @@

 

stopRentPet();

stopWaterTask();

+

+ // Remove kill count for special hero aura if total pvp < 100

+ heroConsecutiveKillCount = 0;

+ if (!isPermaHero)

+ {

+ setHeroAura(false);

+ sendPacket(new UserInfo(this));

+ }

return true;

}

 

@@ -4897,6 +4917,13 @@

     {

         // Add karma to attacker and increase its PK counter

         setPvpKills(getPvpKills() + 1);

+       

+        // Increase the kill count for a special hero aura

+        heroConsecutiveKillCount++;

+       

+        // If heroConsecutiveKillCount > 4 (5+ kills) give hero aura

+        if(heroConsecutiveKillCount > 4)

+        setHeroAura(true);

 

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter

         sendPacket(new UserInfo(this));

@@ -8715,6 +8742,22 @@

{

return _blockList;

}

+

+ public void reloadPVPHeroAura()

+ {

+ sendPacket(new UserInfo(this));

+ }

+

+ public void setHeroAura (boolean heroAura)

+ {

+ isPVPHero = heroAura;

+ return;

+ }

+

+ public boolean getIsPVPHero()

+ {

+ return isPVPHero;

+ }

 

public void setHero(boolean hero)

{

Index: java/net/sf/l2j/gameserver/serverpackets/UserInfo.java

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

--- java/net/sf/l2j/gameserver/serverpackets/UserInfo.java (revision 1901)

+++ java/net/sf/l2j/gameserver/serverpackets/UserInfo.java (working copy)

@@ -337,7 +337,7 @@

 

         writeD(_activeChar.getClanCrestLargeId());

         writeC(_activeChar.isNoble() ? 1 : 0); //0x01: symbol on char menu ctrl+I

-        writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); //0x01: Hero Aura

+        writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); //0x01: Hero Aura

 

         writeC(_activeChar.isFishing() ? 1 : 0); //Fishing Mode

         writeD(_activeChar.getFishx()); //fishing x

 

I personally modded it to give more than heroic glow...Something like on 5 pvps - hero glow, 10 pvps - +5k HP, 50 pvps - UD effect...and so on...When Ill finish it Ill post that one too

 

 

Also some info in case you dont really know what's there...

 

+ // Set hero aura if pvp kills > 100

+ if (pvpKills > 100)

 

This will give you hero glow on 1st pvp if you got over 100...Like you log in, you got 100 and on the 101th youre hero.

 

 

-------------

 

+        // If heroConsecutiveKillCount > 4 (5+ kills) give hero aura

+        if(heroConsecutiveKillCount > 4)

 

This will give you hero glow on pvp kills ONLY if you have done more than 4 in a row...Once you died, the count is reloaded and your shine is gone. Feel free to change it.

 

Link to comment
Share on other sites

i just read all and i have 1 question what the hell is boolean?

 

btw nice addons u have done... also we can just edit it to make it harder like

 

+      // Set hero aura if pvp kills > 300

+      if (pvpKills > 300) 

 

xD nice work

 

now i just want to know what the ... minds boolean and what happend if i change any of those xD

Link to comment
Share on other sites

First of thanx for the karma ^^

 

Boolean is the type of the function...

Boolean means that the function is true/false.

 

as could be seen here...

 

    private boolean _noble = false;

    private boolean _hero = false;

 

Or here...

 

+   private boolean isPermaHero = false;

+   private boolean isPVPHero = false;

 

Link to comment
Share on other sites

ye...I miss-spelled it in the first post. If you got more than 100 pvp kills and you make the 101th you will get hero glow. There isnt a 5 killing spree needed anymore. Altho if you delog it will dissapear and you must make the 102th kill and so on. Im not really sure about it but as far as there is no code in the EnterWorld, the code should be as I said above.

 

About the skills, no...you get no skills.

 

Yes, after restart you lose your hero glow...If you want it to still be there you can add a code in EnterWorld.java

 

Something like

 

if (activeChar.getPvpKills() > 500)

{

setHeroAura(true);

}

 

 

Link to comment
Share on other sites

at revision (actual one) 2465

the java/net/sf/l2j/gameserver/serverpackets/UserInfo.java  DONT exist !

 

I found only : \java\net\sf\l2j\gameserver\network\serverpackets\UserInfo.java

 

Is the same ?

 

How I can do it ? LoL ?

 

 

EDIT :

 

Here is the Error I got :

 

untitledJYkVKRV.JPG

 

 

I used this Version of your code :

 

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

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

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

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

@@ -488,6 +488,11 @@

 

    private boolean _noble = false;

    private boolean _hero = false;

+  /** Special hero aura values */

+  private int heroConsecutiveKillCount = 0;

+  private boolean isPermaHero = false;

+  private boolean isPVPHero = false;

 

    /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */

    private L2FolkInstance _lastFolkNpc = null;

@@ -1971,6 +1976,13 @@

    public void setPvpKills(int pvpKills)

    {

      _pvpKills = pvpKills;

+     

+      // Set hero aura if pvp kills > 100

+      if (pvpKills > 100)

+      {

+        isPermaHero = true;

+        setHeroAura(true);

+      }

    }

 

    /**

@@ -4678,6 +4690,14 @@

 

      stopRentPet();

      stopWaterTask();

+     

+      // Remove kill count for special hero aura if total pvp < 100

+      heroConsecutiveKillCount = 0;

+      if (!isPermaHero)

+      {

+        setHeroAura(false);

+        sendPacket(new UserInfo(this));

+      }

      return true;

    }

 

@@ -4897,6 +4917,13 @@

    {

        // Add karma to attacker and increase its PK counter

        setPvpKills(getPvpKills() + 1);

+     

+        // Increase the kill count for a special hero aura

+        heroConsecutiveKillCount++;

+     

+        // If heroConsecutiveKillCount > 4 (5+ kills) give hero aura

+        if(heroConsecutiveKillCount > 4)

+          setHeroAura(true);

 

        // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter

        sendPacket(new UserInfo(this));

@@ -8715,6 +8742,22 @@

    {

      return _blockList;

    }

+  public void reloadPVPHeroAura()

+  {

+      sendPacket(new UserInfo(this));

+  }

+  public void setHeroAura (boolean heroAura)

+  {

+      isPVPHero = heroAura;

+      return;

+  }

+  public boolean getIsPVPHero()

+  {

+      return isPVPHero;

+  }

 

    public void setHero(boolean hero)

    {

Index: java/net/sf/l2j/gameserver/serverpackets/UserInfo.java

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

--- java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java  (revision 2465)

+++ java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java  (working copy)

@@ -337,7 +337,7 @@

 

        writeD(_activeChar.getClanCrestLargeId());

        writeC(_activeChar.isNoble() ? 1 : 0); //0x01: symbol on char menu ctrl+I

-        writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); //0x01: Hero Aura

+        writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); //0x01: Hero Aura

 

        writeC(_activeChar.isFishing() ? 1 : 0); //Fishing Mode

        writeD(_activeChar.getFishx()); //fishing x

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



  • Posts

    • When it comes to encrypting passwords, using a strong hashing algorithm like SHA-256 or bcrypt is recommended. These algorithms help ensure that passwords are securely stored and protected from being easily decrypted.
    • ***CLExt L2OFF Extender Premium Account Save - Auto Login***   We would like to sell account panel for save accounts for server owners or self player.  You can login and save your id and pass accounts or delete it etc.       Price: 100 euro.   ***CLExt L2OFF Extender Premium Auto-Farm Macro System*** We would like to sell Auto-Farm Macro System for server owners or self player.  You can add your potions and your macro to farm your character with your standars.       Price: 100 euro.   If you like to order send me DM or skype zoumhs999.
    • Diablo III, the action-packed hack-and-slash RPG developed by Blizzard Entertainment, has captivated gamers worldwide since its release in 2012. Now, imagine a world where Diablo III's source code is opened up to the community, inviting developers and enthusiasts alike to enhance and refine this beloved game. This topic delves into the possibilities, challenges, and community desires surrounding the idea of Diablo III as an open-source project.   Key Points: 1. Defining Diablo III: Diablo III is an action role-playing game set in the dark fantasy world of Sanctuary. Players traverse through randomized dungeons, battling hordes of demons and collecting loot to strengthen their characters. With its compelling storyline, addictive gameplay mechanics, and rich lore, Diablo III has amassed a dedicated fanbase over the years.   2. Open Source Potential: Opening up the source code of Diablo III could unlock a wealth of opportunities for the game's future. Community developers could introduce new features, enhance existing gameplay elements, and address long-standing issues. The modding community, known for its creativity and innovation, could breathe new life into the game by creating custom content, game modes, and user interface improvements. 3. Community Interest: The question arises - would the gaming community welcome the idea of Diablo III becoming open source? Many players are eager to see the game evolve beyond its current state, with enhancements such as improved balance, expanded end-game content, and enhanced multiplayer features. By involving the community in the development process, Diablo III could foster a stronger sense of ownership and collaboration among its players. 4. Challenges and Considerations: While the concept of Diablo III as an open source is enticing, it also presents several challenges. Ensuring the integrity of the game's balance and preventing cheating would be paramount concerns. Additionally, coordinating development efforts and maintaining a cohesive vision for the game could prove challenging in a community-driven environment. However, with proper oversight and collaboration, these obstacles can be overcome. 5. Is Diablo III an MMORPG? Diablo III is often categorized as an action RPG rather than a traditional MMORPG (massively multiplayer online role-playing game). While it does feature online multiplayer elements, including cooperative play and player-versus-player combat, it lacks the persistent open world typically associated with MMORPGs. Instead, Diablo III focuses on instanced dungeons and smaller-scale multiplayer interactions. The Benefits of Improvement: Improving Diablo III through open-source development could revitalize the game, attracting new players and re-engaging existing fans. By embracing community-driven innovation, Diablo III could remain relevant and enjoyable for years to come. Additionally, fostering an active modding community could extend the game's longevity and create new opportunities for player expression and creativity.   Source code  
  • Topics

×
×
  • Create New...