Jump to content
  • 0

Try to add Killing Spree Fandc/ro Team files


Question

Posted (edited)

hi, i working with Fandc/ro team files and try add Killing spree system

Any can help me with add killing spree?

i already add some lines in java/model/player.java but dont work properly

Problem: cannot stop killer on death, i need stop killing_spree when killer die

 

find: private long _resurrectionBuffBlockedTime = 0;

i put below

 

private int kill_streak = 0;

 

find: protected void doPKPVPManage(Creature killer) {

and search pk.setPvpKills(pk.getPvpKills() + 1); and i put below

 

kill_streak++;
switch(kill_streak) {
  case 1:
    blah blah blah
      break;
  case 2:
    blah blah blah
      break;
    }

 

find protected void onDeath(Creature killer) {

i put below

 

if(kill_streak > 0) {
  	if(kill_streak > 12 {
    	kill_streak = 0;
      announcement stop killing spree blah blah blah;
  	}
}

 

 

When i test in game nothing happens and only show messages from switch if i delete kill_streak = 0; on protected void onDeath(Creature killer) { class

any can help me? thanks sorry for my bad english. 

Edited by StarSCreams
test results

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

Your code will reset spree IF its greater than 12. Remove that shit check.. just set it to 0 without any checks.

Edited by SweeTs
  • 0
Posted

thanks sweets, i move kill_streak 0; outside that check.

you can help how to announce if killer dead and if killer take more than 12 kills?

 

i tested modification and now work, but i need announce when killer dead and he reach 12 kills or more..

 

i tested again with this code

 

if(kill_streak > 12) {
  	announcement stop killing spree blah blah blah;
}

this code announce when killer reach 12 kills or more, not when he DIE hahaha i dont understand why.. 

 

thanks again.

  • 0
Posted

in this files does not exist onDie method, only onDeath in model/Player.java

 

onDeath method:

 

protected void onDeath(Creature killer)
	{
		// Check for active charm of luck for death penalty
		getDeathPenalty().checkCharmOfLuck();

		if (isInStoreMode())
		{
			setPrivateStoreType(Player.STORE_PRIVATE_NONE);
		}
		if (isProcessingRequest())
		{
			Request request = getRequest();
			if (isInTrade())
			{
				Player parthner = request.getOtherPlayer(this);
				sendPacket(SendTradeDone.FAIL);
				parthner.sendPacket(SendTradeDone.FAIL);
			}
			request.cancel();
		}

		if (_cubics != null)
		{
			getEffectList().stopAllSkillEffects(EffectType.Cubic);
		}

		setAgathion(0);
  
  		if(kill_streak >= 12) {
			announcement stop killing spree blah blah blah;
		}
  
  		kill_streak = 0;
 
		boolean checkPvp = true;
		if (Config.ALLOW_CURSED_WEAPONS)
		{
			if (isCursedWeaponEquipped())
			{
				CursedWeaponsManager.getInstance().dropPlayer(this);
				checkPvp = false;
			}
			else if ((killer != null) && killer.isPlayer() && killer.isCursedWeaponEquipped())
			{
				CursedWeaponsManager.getInstance().increaseKills(((Player) killer).getCursedWeaponEquippedId());
				checkPvp = false;
			}
		}

		if (checkPvp)
		{
			doPKPVPManage(killer);

			altDeathPenalty(killer);
		}

		// And in the end of process notify death penalty that owner died :)
		getDeathPenalty().notifyDead(killer);

		if (_event != null)
		{
			_event.doDie(killer, this);
		}

		setIncreasedForce(0);

		if (isInParty() && getParty().isInReflection() && (getParty().getReflection() instanceof DimensionalRift))
		{
			((DimensionalRift) getParty().getReflection()).memberDead(this);
		}

		stopWaterTask();

		if (!isSalvation() && isOnSiegeField() && isCharmOfCourage())
		{
			ask(new ConfirmDlg(SystemMsg.YOUR_CHARM_OF_COURAGE_IS_TRYING_TO_RESURRECT_YOU, 60000), new ReviveAnswerListener(this, 100, false));
			setCharmOfCourage(false);
		}

		if (getLevel() < 6)
		{
			Quest q = QuestManager.getQuest(255);
			if (q != null)
			{
				processQuestEvent(q.getName(), "CE30", null);
			}
		}

		if (isInOlympiadMode() && (killer.isPlayable() && killer.getPlayer().isInOlympiadMode()))
		{
			_log.warn("Player: " + getName() + " DIED in olympiad from: " + killer.getName());
			Thread.dumpStack();
		}

		// Ady - Call the gm event manager due to this death
		GmEventManager.getInstance().onPlayerKill(this, killer);

		super.onDeath(killer);
	}

 

with this modification, when any player reach 12 kills announce appears.

i need execute this announce when killer die if him take 12 kills or more.. 

 

but thanks for your help

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.



  • Posts

    • What does ‘half-finished’ even mean? Most projects based on L2Off use essentially the same files made for gold-style servers, and they’re fully functional. As for the L2J branches, calling them ‘half-finished’ couldn’t be further from the truth, they’re not only complete in the sense of gold-style projects but are actually extended with even more features.
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchiha-market.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/4EPpYhe2HA  | https://campsite.bio/utchihaamkt  
    • sell adena l2rebon signature x1 - 1kk = 1 dollars l2reborn x10 - 500kk = 4.7 dollars E-Global x Lu4 - 1kk = 2.7 dollars BOHPTS - x20-x500 TOP PRICE DISCORD - GODDARDSHOP TELEGRAM - MMOPROMO Also on sale are Epic jewelry, Clothes at a very good price
    • For wholesale clients   We understand that favorable terms are especially important when dealing with large volumes. That’s why we offer a flexible system for wholesale clients  we can discuss pricing and provide personalized solutions tailored to your needs. With us, you get not only a reliable service but also support focused on long-term cooperation. We value partners who operate at scale and do everything possible to make it convenient and profitable for you to grow together with Vibe SMS.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms   Quality in the Details     As Henry Ford said: "Quality means doing it right even when no one is looking."   At Vibe SMS, we believe the same. Every number and every feature is designed to make your work easy and stress-free. With us, it’s simple: grab a number, complete your task, and move forward. Reliability, comfort, and attention to detail — that’s our vibe, helping you focus on what really matters.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms  
    • We ready to post first part of Patchnotes! To avoid delaying the patch notes, we’ve decided to split them into two parts. Right now, we’re publishing the patch notes focused on balance changes (skill changes). In the second part, we’ll share details about gameplay updates, world changes, activities, and more.  - Patchnotes (last post on topic) https://forum.lineage2dex.com/threads/16724/#post-72291
  • 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