Jump to content
  • 0

[Help][Semi-Fixed]Adding Heroic Skills


Statique

Question

I'm trying to put this in the core but it shows me a mistake, you could find it easily but the thing is that I'm not a java knower so I need your help.

I'm sure that it's a simple syntax mistake, but as I said, I can't find it!

    public void increasePvpKills()

    {

        // 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 > 29)

 

        switch(heroConsecutiveKillCount){

        case 30:

        setHeroAura(true);

        Announcements.getInstance().announceToAll("" + this.getName()+ " went on a Killing Spree with 30 kills in row.");

        break;

        case 60:

          Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating with 60 kills in row, somebody kill him! ");       

        default:

        ;

        }

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

        sendPacket(new UserInfo(this));

        sendPacket(new ExBrExtraUserInfo(this));

    }

 

    /**

    * Increase pk count, karma and send the info to the player

    *

    * @param targLVL : level of the killed player

    * @param increasePk : true if PK counter should be increased too

    */

The red ";" it's the underlined error.

Edit: Forgot tell you that I'm using L2J Latest Revision, Gracia Final[/s]

 

Edit2:

 

I fixed it and updated it on the quote above but I still want to make it apart from the aura, hero aura to give hero skills to the player too, is that possible?

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

u didnt close it with '}'   ?

   public void increasePvpKills()
   {
       // 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 > 29)

          switch(heroConsecutiveKillCount){
          case 30:
          setHeroAura(true);
          Announcements.getInstance().announceToAll("" + this.getName()+ " went on a Killing Spree with 30 kills in row.");
          break;
          case 60:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating with 60 kills in row, somebody kill him! ");           
          default:
          ; }
       // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
       sendPacket(new UserInfo(this));
       sendPacket(new ExBrExtraUserInfo(this));
   }

   /**
    * Increase pk count, karma and send the info to the player
    *
    * @param targLVL : level of the killed player
    * @param increasePk : true if PK counter should be increased too
    */

Link to comment
Share on other sites

  • 0

That was the problem, I already fixed it I was about to come down here and tell you. I still need some help though, as you already saw in the code, it just announces that the player is eather on killing spree or dominating and gives hero aura. I would also like to give except from the hero aura, to give to the player hero skills too, is that possible?

Edit: Also I would like to add the abnormal effect when you get hero in retail, ya know which one!

Link to comment
Share on other sites

  • 0

try this

for(L2Skill skill: HeroSkillTable.getHeroSkills())
{
   player.addSkill(skill,false);
}

 

and the glow

broadcastPacket(new SocialAction(this.getObjectId(), 16));
broadcastUserInfo();

Link to comment
Share on other sites

  • 0

just change this number :)

 

broadcastPacket(new SocialAction(this.getObjectId(), 16));

 

Log in with gm char and try effects with //social #

#- it should be the same as effect number 1-17 i think

Link to comment
Share on other sites

  • 0

It says that "ID 16" Social 16 does not exist.

To be more specific, I want that glow. Like retail when hero comes out, it makes that bright glow on your charachter and then when it goes away you are normally hero.

Link to comment
Share on other sites

  • 0

L2J Latest Revision - Gracia Final

 

Ok Listen, that's a big problem which I can't solve.

If I make it give the hero skills to the player when he reaches the X PvPs in row it will work fine, the problem in the part where I need to take the skills.

If I put to take the heroic skills from the player the moment when the row counter reaches zero (0) every time a player dies it's going to remove his hero skills which means if the player is hero normal (from the Olympiad) or the admin set him as a hero (with //sethero command) he is going to lose his hero skills when he is going to die.

Link to comment
Share on other sites

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
Answer this question...

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

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