Jump to content

Recommended Posts

Posted

Hello , latest not share done so i will share a shit now .. its nothing to be serius with .. just some small crappy codes that will make your server great :D

 

Lets start ,

 

*L2PcInstance

 

find

public void increasePvpKills()

 

you will see under it thoose

 

{
        // Add karma to attacker and increase its PK counter
        setPvpKills(getPvpKills() + 1);
        CustomHeroSystem();

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
        sendPacket(new UserInfo(this));
        sendPacket(new ExBrExtraUserInfo(this));
    }

 

Now , after this you have to add

 

public void CustomHeroSystem()
    {
    	L2PcInstance activeChar = L2PcInstance.getClient().getActiveChar();
    	
        if (activeChar.getPvpKills() >= 5000)
        {
        	activeChar.sendMessage("You are now a server hero for beign so great fighter!");
      Announcements.getInstance().announceToAll(activeChar.getName() + "Is now a server's hero!");
        	activeChar.setHero(true); 
        }

 

 

 

If it gives you errors in announcements , you simple press right click on the error and select import announcements , and TADAMM

 

 

ps , code is tested on L2JServer Gracia Final part ;) thanks!

Posted

fix the typo on the

activeChar.sendMessage("You are now a server hero for beign so great fighter!");

beign =P

 

Thanks for sharing it for mxc.

Added at the list.

Posted

I've told you EXACTLY the same thing with your previous share..

 

So what this code does as we see it now.. Each time someone with more than 5000 pvps gets a pvp, he's being announced as a hero. Which is wrong. Should be displayed only the first time.

 

Anyway thanks for trying, but try more & improve it =)

Posted

put a check if the char is already a hero? it can cause some NPE's and this what fakoykas said :)

 

if (!activeChar.isHero() && activeChar.getPvpCount() >= 5000)

{

;

}

Posted

put a check if the char is already a hero? it can cause some NPE's and this what fakoykas said :)

 

if (!activeChar.isHero() && activeChar.getPvpCount() >= 5000)

{

;

}

Exactly what i told him at his other hero-related share. But he doesn't want to listen =(

Posted

put a check if the char is already a hero? it can cause some NPE's and this what fakoykas said :)

 

if (!activeChar.isHero() && activeChar.getPvpCount() >= 5000)

{

;

}

 

ahh you are right. sorry :d (my mistake)

Posted

Ok.. here's how it should be :D

 

public void CustomHeroSystem()

   {

       if (!isHero() && getPvpKills() == 5000)

       {

          //announce & message ONLY when they reach 5000 pvp.

          sendMessage("You are now a server hero for being so great fighter!");

          Announcements.getInstance().announceToAll(getName() + " Is now a server's hero!");

          setHero(true);

       }

 

and Now in EnterWorld.java

 

    if (!activeChar.isHero() && activeChar.getPvPKills > 5000)

          setHero(true);

 

So now the announce is only been announced if the char is not hero already and ONLY when he reaches 5000 pvps..

Also he doesn't lose hero at his relogin =)

 

Regards.

Posted

Ok.. here's how it should be :D

 

public void CustomHeroSystem()

    {

        L2PcInstance activeChar = L2PcInstance.getClient().getActiveChar();

        if (!activeChar.isHero() && activeChar.getPvpKills() == 5000)

        {

          //announce & message ONLY when they reach 5000 pvp.

          activeChar.sendMessage("You are now a server hero for being so great fighter!");

          Announcements.getInstance().announceToAll(activeChar.getName() + "Is now a server's hero!");

          activeChar.setHero(true);

        }

 

and Now in EnterWorld.java

 

    if (!activeChar.isHero() && activeChar.getPvPKills > 5000)

          setHero(true);

 

So now the announce is only been announced if the char is not hero already and ONLY when he reaches 5000 pvps..

Also he doesn't lose hero at his relogin =)

 

Regards.

 

the only problem with this is this only for enterworld not after they make the pvp.

also you missed an if(activeChar == null) check.

 

Posted

the only problem with this is this only for enterworld not after they make the pvp.

also you missed an if(activeChar == null) check.

Check the whole topic, it's just an addition to what HαRǾC« shared.

 

He has already added the method after setPvpKills(getPvpKills() + 1); so activeChar == null is not needed and neither in enterworld is needed as they are already there =)

Posted

Check the whole topic, it's just an addition to what HαRǾC« shared.

 

He has already added the method after setPvpKills(getPvpKills() + 1); so activeChar == null is not needed and neither in enterworld is needed as they are already there =)

 

i checked and i dont see the npe check it needs to be in the public void CustomHeroSystem() because okay the activeChar is defined but the null check no

Posted

Stef u cant get an npe if its already hero...

 

Definition of NPE: A null value where it shoulnt be null. full name of NPE = Null Pointer Exception extended class of RuntimeException.

 

And Inter.. u dont need a null check...

 

whats so hard?

L2PcInstance.java:

public void parsePvPCustomHero()
{
       if (!isHero() && getPvpKills() >= 5000)
       {
          //announce & message ONLY when they reach 5000 pvp.
          sendMessage("You are now a server hero for being such a great fighter!");
          Announcements.getInstance().announceToAll(activeChar.getName() + "Is now a server's hero!");
          setHero(true);
       }
}

EnterWorld.java

// You know the deal...
activeChar.parsePvPCustomHero();

 

And everything is manage in pc instance doooh!!

Is that hard?

 

Anyway nice work HαRǾC« ur getting better and better, keep it up :P

PS: And it shoud be getPvpKills() >= 5000 (biger or equal) else it will give hero status only if the player has 5000 if its 5001 bby hero :D

Posted

Stef u cant get an npe if its already hero...

 

Definition of NPE: A null value where it shoulnt be null. full name of NPE = Null Pointer Exception extended class of RuntimeException.

 

And Inter.. u dont need a null check...

 

whats so hard?

L2PcInstance.java:

public void parsePvPCustomHero()
{
        if (!isHero() && getPvpKills() >= 5000)
        {
           //announce & message ONLY when they reach 5000 pvp.
           sendMessage("You are now a server hero for being such a great fighter!");
           Announcements.getInstance().announceToAll(activeChar.getName() + "Is now a server's hero!");
           setHero(true);
        }
}

EnterWorld.java

// You know the deal...
activeChar.parsePvPCustomHero();

 

And everything is manage in pc instance doooh!!

Is that hard?

 

Anyway nice work HαRǾC« ur getting better and better, keep it up :P

PS: And it shoud be getPvpKills() >= 5000 (biger or equal) else it will give hero status only if the player has 5000 if its 5001 bby hero :D

 

still only for enterworld not by instant after the pvp...and yes you can use the isHero() to avoid the null check anyway the check method should be in the increasePvpKills() too

Posted

omg dude.. u just add in increasePvpKills() the call method: parsePvPCustomHero().

And its instantly after pvp doooh... besides that u dont need that check into increasePvpKills() if u can use it in parsePvPCustomHero(), it keeps the code clean... lolz

And also isHero is not a null check wtf ?:D that !ishero has to return false so that a normal hero dosent get parsed for nothing... and also its there if the player is already hero by pvp.. to skip the parsing method that way its more efficient.. dooh >.>

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

    • With EA Sports FC 27 officially announced, many players are hoping to get their hands on a coveted Closed Beta code. The FC 27 beta gives fans an early opportunity to test new gameplay features, modes, and updates before the game's full release. Ultimate Team is expected to be one of the most anticipated modes, giving players an early look at the in-game economy and how valuable FIFA 27 coins may be at launch. While there's no guaranteed way to receive a beta invitation, there are several steps you can take to maximize your chances. These methods have helped many players receive beta codes in previous years, and they're still the best options heading into FC 27.     1. Enable EA Email Communications The first and most important step is to make sure EA can actually contact you. Log in to your EA account and head to Communication Preferences. Here, you'll find options related to emails about products, events, and promotions. Make sure to: • Turn on promotional emails. • Set email frequency to "Any Time" instead of monthly updates. • Save your changes. EA typically sends Closed Beta invitations via email, so if these settings are disabled, you could miss your chance entirely.   2. Add FC Games to Your Favorite Titles Under your EA account preferences, you'll find a section for favorite games. Add any football-related EA titles you play, including: • EA Sports FC 26 • EA Sports FC 27 (if available) • EA Play • Other EA football games This helps EA understand your interests and may improve your chances of being selected for football-related tests.   3. Select Your Preferred Platforms Another useful step is updating your preferred gaming platforms. Choose all the systems you actively use, such as: • PlayStation 5 • Xbox Series X|S • PC • Nintendo Switch 2 There's no official confirmation that selecting more platforms increases your odds, but it doesn't hurt to ensure EA knows where you can participate in the beta. Just remember: if you don't own a particular console, there's little point in selecting it.   4. Verify Your Email Address Double-check that the email address associated with your EA account is verified. An unverified email could prevent important messages from reaching you, including beta invitations. It only takes a few seconds to confirm, and it's one of the easiest things to overlook.   5. Link Your Gaming Accounts Make sure your EA account is connected to the platforms you play on. Common account links include: • PlayStation Network • Xbox Network • Steam • Epic Games • Nintendo Account Having your accounts linked ensures your profile is fully set up and ready if you're selected for the FC 27 beta.   6. Consider Joining EA's Playtesting Program If you're interested in testing games beyond FC 27, consider signing up for EA's playtesting program. EA occasionally invites players to participate in early tests for upcoming titles. While joining doesn't guarantee you'll receive an FC 27 beta code, it can improve your chances of being considered for future playtests. Players selected for EA playtests are usually notified via email, so keeping your communication settings enabled remains essential.     Is There a Guaranteed Way to Get an FC 27 Beta Code? Unfortunately, no. EA selects participants based on a variety of factors, and luck still plays a significant role. Even players who have received beta codes in previous years aren't guaranteed to get one again. That said, following the steps above gives you the best possible chance: 1. Enable EA email communications. 2. Set email frequency to "Any Time." 3. Add FC titles to your favorite games. 4. Select your active gaming platforms. 5. Verify your email address. 6. Link your platform accounts. 7. Join EA's playtesting program.   When Does the EA Sports FC 27 Closed Beta Begin? If selected, players may receive their invitations around July 31, so keep an eye on your inbox and check your spam folder regularly. The Closed Beta is scheduled to kick off on August 5 and will remain available until August 25. This gives invited participants nearly three weeks to explore the game and provide feedback to EA. Compared to past beta tests, this is a relatively lengthy testing period, suggesting that EA is placing a strong emphasis on collecting player impressions and identifying potential issues ahead of the official release. Below are the launch and closing times for major regions around the world: Region / Time Zone EA FC 27 Closed Beta Start Date & Times EA FC 27 Closed Beta End Date & Times Pacific Time (PT) 10:00 AM—August 5 10:00 AM—August 25 Central Time (CT) 12:00 PM—August 5 12:00 PM—August 25 Eastern Time (ET) 1:00 PM—August 5 1:00 PM—August 25 Brasilia Time (BRT) 2:00 PM—August 5 2:00 PM—August 25 British Summer Time (BST) 6:00 PM—August 5 6:00 PM—August 25 Central European Summer Time (CEST) 7:00 PM—August 5 7:00 PM—August 25 China Standard Time (CST) 1:00 AM—August 6 1:00 AM—August 26 Korean Standard Time (KST) 2:00 AM—August 6 2:00 AM—August 26 Japan Standard Time (JST) 2:00 AM—August 6 2:00 AM—August 26 Australian Eastern Time (AET) 3:00 AM—August 6 3:00 AM—August 26 New Zealand Standard Time (NZST) 5:00 AM—August 6 5:00 AM—August 26   Which Modes Are Included in the Closed Beta? EA is using the FC 27 Closed Beta to evaluate several of the game's most important experiences before launch. Participants may gain access to popular modes such as Ultimate Team, Career Mode, and Clubs, as well as The Grounds, a brand-new addition making its debut in FC 27. Because multiple game modes are being tested simultaneously, the extended beta period gives players ample time to try different features and report their findings.   Final Thoughts Getting an EA Sports FC 27 Closed Beta code isn't guaranteed, but spending a few minutes optimizing your EA account settings can make a big difference. Every year, thousands of players receive invitations, and many of them simply have their accounts properly configured and ready to go. If you're lucky enough to get a code, you'll be among the first players to experience FC 27's new gameplay changes and features before launch. Until then, keep an eye on your inbox, stay patient, and good luck—you might be kicking off your FC 27 journey sooner than expected.
    • If you need in L2off i can hook you up! many people know me here and the work i offer. Live example https://l2exalta.org
    • Almost 16 years, you never know when a random Korean finds this topic and shares it.
    • Update: Version 3.1.2: * Improved compaction: deleting even a few textures now always reduces the file (previously small deletions could still slightly grow some packages, such as fonts); Version 3.1.1: * Deleting textures now actually shrinks the package: on save it is automatically compacted, reclaiming the space of the deleted textures (format and encryption preserved); Version 3.1.0: * La2Tools now checks for updates on startup and lets you know when a newer version is available on the site; Version 3.0.9: * Fixed textures that appeared blank in some clients (their object carries an embedded shader the reader mis-parsed) — they now decode and display correctly; * ShaderCode is now editable: Texture Properties → Material → ShaderCode shows the texture's real HLSL shader (was a fixed placeholder before); edit it and Apply — works across client formats (Interlude-era through Essence 542); Version 3.0.8: * BMP now imports as a native format, like UnrealEd: 8-bit BMP becomes a P8 (paletted) texture with a real Engine.Palette, 24/32-bit becomes RGBA8, 16-bit becomes G16; * Compress to P8 — adaptive 256-color palette (median-cut quantization); P8 is also selectable as an import "Convert to" target; * Copy / Cut / Paste now works for P8 (paletted) textures; * Non-power-of-two textures are highlighted in red (tiles and table) with a tooltip; new "Fix texture size" menu item pads them to a power of two while keeping the displayed size; * Reads "broken" packages that were tampered to block editors (corrupted size fields) — the client still loads them and now so does La2Tools; * "Repair package" — shown only for a tampered package (its tab is marked red) and restores the corrupted size fields; * Added client license 30 support (reads and imports its textures); * Import dialog now auto-resizes to fit its content; Version 3.0.7: * Import: the file name is now parsed smartly — package.group.name automatically fills the Group and Name fields (the package prefix is ignored); * Import: live name validation with an inline hint and tooltip — OK is blocked until the name is valid (allows - + ' etc., forbids only characters illegal in file names); * Import: textures whose size is not a power of two are now auto-padded for ALL formats (DDS/TGA/BMP too, not only PNG/JPG/GIF) — padded to a power of two with UClamp/VClamp preserving the original display size; * Texture filter now has a clear (×) button; * Light theme: visible Chrome-style tab outlines; Version 3.0.6: * "Save as..." — toolbar button and tab-menu item: save a package under a new name to any folder, choosing the format (Old/New) and Lineage2Ver121 encryption; the tab switches to the saved file; * Tab right-click menu reworked: Save, Save as... and Settings on top; Copy path and Open in Explorer at the bottom; Version 3.0.5: * Animation grouping now follows AnimNext links instead of frame names — chains group correctly with any naming (mixed prefixes, non-sequential or 0-/1-based numbers); * GIF import: animation parameters (frame rate) and TotalFrameNum are now written only to the first frame, the rest keep just the AnimNext link — matches the game's own format; same fix applied to "Create animation"; Version 3.0.4: * Clipboard <-> Explorer: Ctrl+C in the browser then Ctrl+V in Explorer pastes the textures as files; copy files in Explorer then Ctrl+V in the browser imports them; * Rename a package right from Package settings (handles Lineage2Ver121 re-keying); * Hotkeys: F1 (About), F2 (rename), F5 (reload from disk, asks if unsaved), Delete, Enter (Properties), Ctrl+W (close tab); * The application icon now appears in the title bar of every dialog and sub-window; * Fixed flipped preview when importing TGA files;  Download (Installer) |  Download (Portable)
    • Hello! I am creating a new L2 Editor version with most bugs fixed and new features added. PM me for more info!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..