Jump to content
  • 0

[Help][Semi-Fixed]Adding Heroic Skills


Question

Posted

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?

12 answers to this question

Recommended Posts

  • 0
Posted

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
    */

  • 0
Posted

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!

  • 0
Posted

try this

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

 

and the glow

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

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

yea :)

well, dunno mate, it should work with this:

 

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

 

which pack do u use anyway?

  • 0
Posted

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.

  • 0
Posted

use something like this in l2pcinstance / increasepvpkills

setFakeHero(true);

 

and in doDie

if (isFakeHero())

and in the end of code put
setFakeHero(false):

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


  • Posts

    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • why is he still not banned? scammer
    • Complete verification on the services you need and unlock new earning opportunities. Use our newest service in the store: Learn more Active links: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Complete verification on the services you need and unlock new earning opportunities. Use our newest service in the store: Learn more Active links: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Had some luck checking out resources on luckybrand.cz—their guides helped me structure pages so search engines picked up relevance better. Even simple tweaks made a noticeable difference over random premium backlinks.
  • Topics

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