Jump to content

Recommended Posts

Posted

Hello guys this is my fire share and this is pretty basic for all you experts of Java. But I'm learning myself and couldn't find any shares for highfive beta that worked, so I found my own way to do it and this is how to do it.

 

First we locate our file L2Summon.java which is at com.l2jserver.gameserver.model.actor

Ctrl+F to search for public boolean doDie(L2Character killer) and you will see this on line 309:

public boolean doDie(L2Character killer)
	{
		if (isNoblesseBlessedAffected())
		{
			stopEffects(L2EffectType.NOBLESSE_BLESSING);
			storeEffect(true);
		}
		else
		{
			storeEffect(false);
		}

It's very simple and all we do is replace on line 318 storeEffect(false); to storeEffect(true);

Now it looks like this:

public boolean doDie(L2Character killer)
	{
		if (isNoblesseBlessedAffected())
		{
			stopEffects(L2EffectType.NOBLESSE_BLESSING);
			storeEffect(true);
		}
		else
		{
			storeEffect(true);
		}

Now everytime your summon dies you can resummon it on the battlefield with buffs. Now we do the player character, so open up your L2Playable.java from the same location above and search for

boolean deleteBuffs = true; on line 134 and change to boolean deleteBuffs = false;

boolean deleteBuffs = false;
		
		if (isNoblesseBlessedAffected())
		{
			stopEffects(L2EffectType.NOBLESSE_BLESSING);
			deleteBuffs = false;
		}
		if (isResurrectSpecialAffected())
		{
			stopEffects(L2EffectType.RESURRECTION_SPECIAL);
			deleteBuffs = false;
		}
		if (isPlayer())
		{
			L2PcInstance activeChar = getActingPlayer();
			
			if (activeChar.hasCharmOfCourage())
			{
				if (activeChar.isInSiege())
				{
					getActingPlayer().reviveRequest(getActingPlayer(), null, false, 0);
				}
				activeChar.setCharmOfCourage(false);
				activeChar.sendPacket(new EtcStatusUpdate(activeChar));
			}
		}
		
		if (deleteBuffs)
		{
			stopAllEffectsExceptThoseThatLastThroughDeath();
		}

So now you don't lose buffs on death for your characters and summons, great for pvp servers or whatever you are doing. Enjoy!

  • 2 months later...

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
Reply to this topic...

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



  • Posts

    • 🍂 The cost on Vibe-sms is dropping, like autumn leaves falling from the trees.     It’s a little sad to watch the last days of summer fade away with its warmth, but that’s how the world works  every season has its own rules. The same goes for our prices: they are gradually but steadily going down, opening up new opportunities and great deals. 💸   🌍 USA is already at the minimum, and Europe, Asia, and dozens of other countries will follow soon. Don’t miss out  fresh rates are waiting for you!   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
    • You didn't tell me anywhere that you wanted core.jar as proof, I have everything ready for an independent developer to review. All the conversations, all your edits. I won't settle anything with you, so you can threaten me again and damage my name.
    • So what? Did i say anything wrong? You have no idea what source/compile is. I still wait for your .jar or source to be posted since you say i destroyed the compiled version of yours. Why you don't post it? Are you afraid that people will just see few addon lines and you did not even know that your source and compiled had different things? I should not even waste 2 minute to fix your raidboss_spawnlist thing.    Your mentally ill. What you posted is our primary deal nothing against me.  Because all he does is post whatever i write as if i hide and i did not say any mod to join and check my discord. i want him actual post something against me or any offenses i did. I also requested him several hours ago to post his .jar where my code "HACKED" his server but he wont post.    Nobody should allow open a random topic and cause issues to other's life without proofs. I demand punishment and soon unless he post evidence that i hurt his server or left him or did not make what he asked. 
    • guys it is probably a misunderstanding if it was windows he would have solve it since its not windows and from the paraphrasing of the developer who eventually fixed the server   the problem was from guessing the login server was not properly opening or already crashed, so the gameserver probably loaded because he was generating logs, and then stopped, my guess is still there was no login to connect and made exits, still this is a guess because i have only saw some logs and images   in one side nobody would destroy a server for this amount of money in the other side he had no experience with the operating system, and i find this logical, i am also still giving some tutorials in the topic owner so he can learn how to compile and not need the help of others, i still believe this can be solved for both parties if they behave   in the end nobody wants to cause bad to another so as i say in my starting point, it is probably a misunderstanding
  • 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