Jump to content

Recommended Posts

Posted
### Eclipse Workspace Patch 1.0

#P L2jFrozen_GameServer

Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 573)

+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)

@@ -648,6 +648,10 @@

public String _teamNameTvT, _originalTitleTvT;

public int _originalNameColorTvT = 0, _countTvTkills, _countTvTdies, _originalKarmaTvT;

public boolean _inEventTvT = false;



/** CTF Engine parameters */

public String _teamNameCTF,

@@ -666,7 +670,6 @@

_countDMkills,

_originalKarmaDM;

public boolean _inEventDM = false;



public int _correctWord = -1;

public boolean _stopKickBotTask = false;



@@ -900,7 +903,18 @@

private final BlockList _blockList = new BlockList();



private int _team = 0;



/**

* lvl of alliance with ketra orcs or varka silenos, used in quests and aggro checks [-5,-1] varka, 0 neutral, [1,5]

* ketra

@@ -5632,6 +5646,8 @@

// Kill the L2PcInstance

if(!super.doDie(killer))

return false;

+

+ spreeKills = 0;



Castle castle = null;

if(getClan() != null)

@@ -5834,6 +5850,22 @@

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()))

{

+ PlaySound _snd = new PlaySound(1, "enemydown", 0, 0, 0, 0, 0);

+

+ Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();

+ for (L2PcInstance onlinePlayer : pls)

+ if (onlinePlayer.isOnline() == 1)

+ {

+ if (onlinePlayer.getClan() != null)

+ {

+ if (onlinePlayer.getClan() == pk.getClan() && onlinePlayer != pk)

+ {

+ onlinePlayer.sendPacket(_snd);

+ }

+ }

+ }

+

+

if(getClan().getReputationScore() > 0)

{

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

@@ -6109,11 +6141,12 @@

{

// check about wars

if(targetPlayer.getClan() != null && getClan() != null)

- {

+ {

if(getClan().isAtWarWith(targetPlayer.getClanId()))

{

if(targetPlayer.getClan().isAtWarWith(getClanId()))

- {

+ {

+

// 'Both way war' -> 'PvP Kill'

increasePvpKills();

if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)

@@ -6296,8 +6329,51 @@

/**

* Increase the pvp kills count and send the info to the player

*/

+ private int spreeKills = 0;

public void increasePvpKills()

{

+ spreeKills++;

+

+ switch(spreeKills){

+

+ case 1:

+ PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0);

+ sendPacket(_snd1);

+ break;

+

+ case 2:

+ PlaySound _snd2 = new PlaySound(1, "doublekill", 0, 0, 0, 0, 0);

+ sendPacket(_snd2);

+ break;

+

+ case 3:

+ PlaySound _snd3 = new PlaySound(1, "triplekill", 0, 0, 0, 0, 0);

+ sendPacket(_snd3);

+ break;

+

+ case 4:

+ PlaySound _snd4 = new PlaySound(1, "megakill", 0, 0, 0, 0, 0);

+ sendPacket(_snd4);

+ break;

+

+ case 5:

+ PlaySound _snd5 = new PlaySound(1, "ultrakill", 0, 0, 0, 0, 0);

+ sendPacket(_snd5);

+ break;

+

+ case 10:

+ PlaySound _snd10 = new PlaySound(1, "monsterkill", 0, 0, 0, 0, 0);

+ sendPacket(_snd10);

+ break;

+

+ case 15:

+ PlaySound _snd15 = new PlaySound(1, "killingspree", 0, 0, 0, 0, 0);

+ sendPacket(_snd15);

+ break;

+ default:

+ ;

+ }

+

int x,y,z;

x = getX();

y = getY();

@@ -6658,6 +6734,10 @@

{

newKarma = Integer.MAX_VALUE - getKarma();

}

+ PlaySound _snd = new PlaySound(1, "knife", 0, 0, 0, 0, 0);

+ sendPacket(_snd);

+ broadcastPacket(_snd);

+



// Add karma to attacker and increase its PK counter

int x,y,

 

Posted

I don't think there is anyone playing with sound [ON].
If someone good is playing with his clan, he is using Teamspeak ( or w/e ) and has the sound [OFF].
If anyone else is playing, he is listening some good shit gangsta music.

Posted
10 minutes ago, TeodosTv said:

Its Only PvPSounds Like DoubleKill , TripleKill , Rampage

 

I will help some peoples looking something like this!

 

:) :D :) :D

at least is something new, good.

  • Like 1
Posted (edited)

Dear god this coding... Use enums better... 

 

public enum Spree
	{
		DOUBLE_KILL(2, "Double Kill"),
		TRIPLE_KILL(3, "Triple Kill"),
		ULTRA_KILL(4, "Ultra Kill");
		
		final int kill;
		final String msg;
		
		private Spree(final int kill, final String msg)
		{
			this.kill = kill;
			this.msg = msg;
		}
		
		public void triggerBroadcast(final L2PcInstance player)
		{
			player.setSpreeKills(player.getSpreeKills() + 1);
			
			for (Spree s : Spree.values())
			{
				if (s.kill == player.getSpreeKills())
				{
					Broadcast.announceToOnlinePlayers("Player " + player.getName() + " got a " + s.msg);
				}
			}
		}
	}

Took me 45 seconds and is 2000% better than 450 lines of code you did...

Edited by Evie Frye
  • 3 months later...
Guest
This topic is now closed to further replies.


  • Posts

    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...