Jump to content
  • 0

[HELP] Custom killing spree system l2j server [/HELP]


Question

Posted

Hello, i got the source code for the custom killing spree system from Cobra which was for l2j free and i converted it for l2j server. The  only problem is the following: I configured it so that when someone had 30 pvp kills in a row, a "You are on a killing spree" message would show up on his screen and an announcement would be published on the global chat. Here is the thing. I inserted a code so that when you have 30 pvp kills in a row not only would a message appear but you'd also get hero status and on death this hero status would disappear but i failed. I compiled and i went ingame to test it ,everything worked fine except that when i was getting 30 pvp kills i could see the hero glow but others could not, they could only see it after a restart of their client. And also, when i was on death my hero glow would not disappear if i didnt restart my client. Here is the code in the file L2PcInstance:

+private int impro = 0;
    public void increasePvpKills()
    {
    	 + impro++;
    	            
    	           +switch(impro){
               
    	         
    	      +case 30:
    	        + ExShowScreenMessage case30 = new ExShowScreenMessage("You reached 30 killing spree!", 10000);
    	         +sendPacket(case30);
    	         +Announcements.getInstance().announceToAll("Player  " + getName() + " Is On a Killing Spree Someone Stop Him");
    	         +setHero(true);   	        
    	        + break;
    	             + default:
    	              + ;
    	           + }

 

 

// Check if the player is dead
        if (isDead())
        {
        	+impro = 0;
        	+setHero(false);
        	abortCast();

 

Anyone got an idead of how to fix this? Thanks!

4 answers to this question

Recommended Posts

  • 0
Posted

is this the code for sending the users data to the server? or is there anything else like sendPacket(setHero); ? i tried to build a new method that would connect with isHero but didnt work out

  • 0
Posted

broadcastUserInfo() send player informations both for player (CharInfo packet) and for his knownlist (broadcast UserInfo). Both problems you said can be linked to a miss of that method. In the end of setHero() method, just add that line :

broadcastUserInfo();

 

If it works I'm glad, if it doesn't, drop that line and search anywhere else. I got no other idea.

 

Btw the switch for one case isn't easy to read (I know you made it like that because Cobra code was using it), just use following if you got only one case :

if (impro == 30)
{
    	         sendPacket(new ExShowScreenMessage("You reached 30 killing spree!", 10000));
    	         Announcements.getInstance().announceToAll("Player  " + getName() + " Is On a Killing Spree Someone Stop Him");
    	         setHero(true);
}

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

    • what do u mean i want to change the normal weapons some weapons are working perftect some not getting th effect and the arcana has the effect above the weapons as u see ... i dont what is the probkenm
    • Stop paying for files that are already public and free. Here you can download a fully working Interlude server with C4-like gameplay, including source code so you can compile it yourself and verify everything. People will try to convince you that free releases are “broken”, “full of backdoors”, etc. That’s exactly why I’m also providing the SVN with the full source – so you can: Review the code yourself Remove / modify whatever you don’t like Compile your own binaries What’s included GX-EXT Interlude server (C4-style gameplay) – L2Off Client Interlude tweaked for C4 gameplay Public SVN with source code Downloads: Server GX-EXT: https://www.mediafire.com/file/q5ipkjd36tnhfxv/L2OFF_C4_C4_ACU_GXEXT.rar/file Client Interlude C4 Gameplay: https://www.mediafire.com/file/rdkfc8wwau042oh/Cliente_Interlude_Jugabilidad_C4.rar/file SVN (source code, delayed a couple of months to avoid reselling fresh work): https://svn.l2servers.com.ar/!/#GX-EXT_INTERLUDE User: gx Pass: gx How to compile To compile the source you will need: Visual Studio 2005 (x64 toolset) (Classic L2Off toolchain – yes, it’s old, but that’s what the original server uses.) Use this as you want: learn, test, open your own server, or just audit the code. But please, stop buying the same leaked/resold files over and over when you can get them here for free, with source, and actually know what you’re running.  
    • @GX-Ext Please reupload the pack+web+client because all the links inside that post or in the https://l2servers.com.ar/ are dead
    • Weapon dat is not the same for all, since you have custom things for sure no. You can contact @NevesOma
    • hello guys im facing a problem with the weapons .. i want to add hero glow on s weapons arcana ,dragonic bow etc.. some weapons are work peftect .. some not for example i add the line  LineageEffect.e_u092_h for fists and didnt work didnt even get the hero glow.. and the arcana the glow is on the top of weapon not down side like hero zeus mace any ideas?.. or does anybody has the weapongrp.dat file ready ?
  • 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