Jump to content

Recommended Posts

Posted

public boolean doDie(L2Character killer)

{

// Kill the L2PcInstance

if (!super.doDie(killer))

return false;

 

if (killer != null)

{

L2PcInstance pk = null;

if (killer instanceof L2PcInstance)

pk = (L2PcInstance) killer;

 

if (atEvent && pk != null)

{

pk.kills.add(getName());

}

 

if ((killer instanceof L2PcInstance && ((L2PcInstance) killer)._inEventTvT) && _inEventTvT)

{

if (TvT._teleport || TvT._started)

{

if (!(((L2PcInstance) killer)._teamNameTvT.equals(_teamNameTvT)))

{

((L2PcInstance) killer)._countTvTkills++;

TvT.setTeamKillsCount(((L2PcInstance) killer)._teamNameTvT, TvT.teamKillsCount(((L2PcInstance) killer)._teamNameTvT) + 1);

}

else

((L2PcInstance) killer).sendMessage("You'r teamkiller !!! Teamkills not counting.");

 

sendMessage("You will be revived and teleported to team spot in 20 seconds!");

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()

{

public void run()

{

teleToLocation(TvT._teamsX.get(TvT._teams.indexOf(_teamNameTvT)), TvT._teamsY.get(TvT._teams.indexOf(_teamNameTvT)), TvT._teamsZ.get(TvT._teams.indexOf(_teamNameTvT)),

false);

doRevive();

}

}, 20000);

}

}

 

else if (_inEventTvT)

{

if (TvT._teleport || TvT._started)

{

sendMessage("You will be revived and teleported to team spot in 20 seconds!");

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()

{

public void run()

{

teleToLocation(TvT._teamsX.get(TvT._teams.indexOf(_teamNameTvT)), TvT._teamsY.get(TvT._teams.indexOf(_teamNameTvT)), TvT._teamsZ.get(TvT._teams.indexOf(_teamNameTvT)),

false);

doRevive();

}

}, 20000);

}

}

 

if (killer instanceof L2PcInstance)

{

if (((L2PcInstance) killer)._inEventCTF && _inEventCTF)

{

if (CTF._teleport || CTF._started)

{

if (_haveFlagCTF)

{

CTF._flagsTaken.set(CTF._teams.indexOf(_teamNameHaveFlagCTF), false);

CTF.spawnFlag(_teamNameHaveFlagCTF);

_haveFlagCTF = false;

Announcements.getInstance().announceToAll(CTF._eventName + "(CTF): " + _teamNameHaveFlagCTF + "'s flag returned.");

}

 

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()

{

public void run()

{

teleToLocation(CTF._flagsX.get(CTF._teams.indexOf(_teamNameCTF)), CTF._flagsY.get(CTF._teams.indexOf(_teamNameCTF)), CTF._flagsZ.get(CTF._teams.indexOf(_teamNameCTF)),

false);

doRevive();

setCurrentCp(getMaxCp());

setCurrentHp(getMaxHp());

setCurrentMp(getMaxMp());

broadcastUserInfo();

_lastKilledTimeCTF = System.currentTimeMillis() + 7000; // 5

// seconds

// after

// revive

// protected

}

 

}, 2000);

}

}

}

 

// Clear resurrect xp calculation

setExpBeforeDeath(0);

 

if (isCursedWeaponEquiped())

{

CursedWeaponsManager.getInstance().drop(_cursedWeaponEquipedId, killer);

}

else

{

if (pk == null || !pk.isCursedWeaponEquiped())

{

// if (getKarma() > 0)

onDieDropItem(killer); // Check if any item should be

// dropped

 

if (!(isInsideZone(ZONE_PVP) && !isInsideZone(ZONE_SIEGE)))

{

boolean isKillerPc = (killer instanceof L2PcInstance);

if (isKillerPc && ((L2PcInstance) killer).getClan() != null && getClan() != null && !isAcademyMember() && !(((L2PcInstance) killer).isAcademyMember())

&& _clan.isAtWarWith(((L2PcInstance) killer).getClanId()) && ((L2PcInstance) killer).getClan().isAtWarWith(_clan.getClanId()))

{

if (getClan().getReputationScore() > 0) // when your

// reputation

// score is

// 0 or

// below,

// the other

// clan

// cannot

// acquire

// any

// reputation

// points

{

((L2PcInstance) killer).getClan().setReputationScore(((L2PcInstance) killer).getClan().getReputationScore() + Config.ALT_REPUTATION_SCORE_PER_KILL, true);

getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(_clan));

((L2PcInstance) killer).getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(((L2PcInstance) killer).getClan()));

}

if (((L2PcInstance) killer).getClan().getReputationScore() > 0) // when the

// opposing

// sides

// reputation

// score is 0 or

// below, your

// clans

// reputation

// score does

// not decrease

{

_clan.setReputationScore(_clan.getReputationScore() - Config.ALT_REPUTATION_SCORE_PER_KILL, true);

getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(_clan));

((L2PcInstance) killer).getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(((L2PcInstance) killer).getClan()));

}

}

if (Config.ALT_GAME_DELEVEL)

{

// Reduce the Experience of the L2PcInstance in

// function of the calculated Death Penalty

// NOTE: deathPenalty +- Exp will update karma

if (getSkillLevel(L2Skill.SKILL_LUCKY) < 0 || getStat().getLevel() > 9)

deathPenalty((pk != null && getClan() != null && pk.getClan() != null && pk.getClan().isAtWarWith(getClanId())));

}

else

{

onDieUpdateKarma(); // Update karma if delevel is

// not allowed

}

}

}

}

}

 

setPvpFlag(0); // Clear the pvp flag

 

// Unsummon Cubics

if (_cubics.size() > 0)

{

for (L2CubicInstance cubic : _cubics.values())

{

cubic.stopAction();

cubic.cancelDisappear();

}

 

_cubics.clear();

}

 

if (_forceBuff != null)

_forceBuff.delete();

 

for (L2Character character : getKnownList().getKnownCharacters())

if (character.getForceBuff() != null && character.getForceBuff().getTarget() == this)

character.abortCast();

 

if (isInParty() && getParty().isInDimensionalRift())

getParty().getDimensionalRift().getDeadMemberList().add(this);

 

// calculate death penalty buff

calculateDeathPenaltyBuffLevel(killer);

 

stopRentPet();

stopWaterTask();

return true;

}

 

 

Sorry for the whole code, but where i should to put it? After when i get answer i will delete it ;]

  • 8 months later...
Posted

after calculateDeathPenaltyBuffLevel(killer);

 

After that we have to put "impro = 0;"

 

I have the same prob, after dead it still count, not reset, ty :)

 

Posted

I fixed already by doing what xAddytzu said, thx ;D

 

Anyway to put, exemple, exity reaches 15 killing spree, is there anyway that who kill the guy with spree got an announce?

 

Exemple: BlaBla has stopped Exity 15 killing spree

 

Ty in advance

Posted

I fixed already by doing what xAddytzu said, thx ;D

 

Anyway to put, exemple, exity reaches 15 killing spree, is there anyway that who kill the guy with spree got an announce?

 

Exemple: BlaBla has stopped Exity 15 killing spree

 

Ty in advance

 

im making it on quake system xD

  • 3 months later...
  • 4 weeks later...
Guest
This topic is now closed to further replies.



  • Posts

    • 🚀 Uninterrupted High-Performance AI: Claude 3.5 Sonnet, ChatGPT Plus, and Cursor AI running with 100% uptime on KloudItem.     FINAL CALL: Google is Shutting This Down After October 2026! Google will NEVER bring back this window of opportunity again. Once this month ends, this massive backdoor upgrade is gone permanently!  BUY 2, GET 1 FREE IS STILL LIVE! Stock up now for yourself, your family, your business, and your friends! Think about it: Every single person you know uses a Gmail account, and everyone is running out of storage. Don't let your loved ones get trapped paying $20–$30 every single month when you can set them up with 5TB Cloud Storage + Gemini Advanced (12–18 Months) right now for only $15! Why Buy Bulk Activations Today? Instant Gift Value: Perfect lifetime-style gift for clients, family, or team members. 100% Private & Safe: Activates on personal Gmails—zero passwords or logins required. Global Access: Works worldwide with zero VPN hassles. Instant Automated Delivery: Receive your activation links in seconds 24/7! ‍ Time is running out fast—secure your extra free licenses before the October deadline hits! Order Your Bundle Now on the Website
    • 🌐 Works Globally Without VPN: Activate 5TB + Gemini Pro anywhere in the world on your personal Google account in under 60 seconds!     FINAL CALL: Google is Shutting This Down After October 2026! Google will NEVER bring back this window of opportunity again. Once this month ends, this massive backdoor upgrade is gone permanently!  BUY 2, GET 1 FREE IS STILL LIVE! Stock up now for yourself, your family, your business, and your friends! Think about it: Every single person you know uses a Gmail account, and everyone is running out of storage. Don't let your loved ones get trapped paying $20–$30 every single month when you can set them up with 5TB Cloud Storage + Gemini Advanced (12–18 Months) right now for only $15! Why Buy Bulk Activations Today? Instant Gift Value: Perfect lifetime-style gift for clients, family, or team members. 100% Private & Safe: Activates on personal Gmails—zero passwords or logins required. Global Access: Works worldwide with zero VPN hassles. Instant Automated Delivery: Receive your activation links in seconds 24/7! ‍ Time is running out fast—secure your extra free licenses before the October deadline hits! Order Your Bundle Now on the Website
  • 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..