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.



×
×
  • Create New...