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

    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click   🚀 Promo code: MEDIUM5 (5% Discount)   ➡️ Online Store: Click ✅ ➡️ Telegram Bot: Click ✅ ➡️ SMM Panel: Click ✅   Regular customers receive additional discounts and promo codes!   Support: ➡️ Telegram: https://t.me/solomon_bog ✅ ➡️ Discord: https://discord.gg/y9AStFFsrh ✅ ➡️ WhatsApp: https://wa.me/79051904467 ✅ ➡️ Email: solomonbog@socnet.store ✅   ➡️ Telegram Channel: https://t.me/accsforyou_shop ✅   You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners )  — Becoming a supplier   SocNet — your store for digital goods and premium subscriptions ✅
    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click Promo code: MEDIUM5 (5% Discount) Online Store: Click Telegram Bot: Click SMM Panel: Click Regular customers receive additional discounts and promo codes! Support: Telegram: https://t.me/solomon_bog Discord: https://discord.gg/y9AStFFsrh WhatsApp: https://wa.me/79051904467 Email: solomonbog@socnet.store  Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners ) — Becoming a supplier SocNet — your store for digital goods and premium subscriptions  Want to expand your business network or promote services through the largest B2B platform? LinkedIn accounts are your tool for marketing, recruiting, and outreach automation. Perfect for SMM, hiring, lead generation, and business scaling. ➡ Ready-made accounts — fast, convenient, no hassle. Promo code: LINKEDIN5 (5% discount) Payment: Bank cards · Cryptocurrency · Other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Product range: ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM USA IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM EUROPE IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM MIX IP | Price from: $2.5 ➡ LinkedIn Old Brute Account with Real Connections (0 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $10 ➡ LinkedIn Premium Brute Account (Premium) with active 1-month Premium subscription | Geo: MIX | Registered on real device | Full account access | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (50 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (100+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $39 ➡ LinkedIn Old Brute Account with Real Connections (500+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $69 ➡ LinkedIn Verified Brute Account with verified documents | Geo: MIX | Registered on real device | Full account access | Price from: $89 Loyal customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop Also via these contacts you can: — Consult about wholesale purchases — Set up a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — Digital Goods and Premium Subscriptions Store
    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click Promo code: MEDIUM5 (5% Discount) Online Store: Click Telegram Bot: Click SMM Panel: Click Regular customers receive additional discounts and promo codes! Support: Telegram: https://t.me/solomon_bog Discord: https://discord.gg/y9AStFFsrh WhatsApp: https://wa.me/79051904467 Email: solomonbog@socnet.store  Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners ) — Becoming a supplier SocNet — your store for digital goods and premium subscriptions  Want to expand your business network or promote services through the largest B2B platform? LinkedIn accounts are your tool for marketing, recruiting, and outreach automation. Perfect for SMM, hiring, lead generation, and business scaling. ➡ Ready-made accounts — fast, convenient, no hassle. Promo code: LINKEDIN5 (5% discount) Payment: Bank cards · Cryptocurrency · Other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Product range: ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM USA IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM EUROPE IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM MIX IP | Price from: $2.5 ➡ LinkedIn Old Brute Account with Real Connections (0 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $10 ➡ LinkedIn Premium Brute Account (Premium) with active 1-month Premium subscription | Geo: MIX | Registered on real device | Full account access | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (50 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (100+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $39 ➡ LinkedIn Old Brute Account with Real Connections (500+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $69 ➡ LinkedIn Verified Brute Account with verified documents | Geo: MIX | Registered on real device | Full account access | Price from: $89 Loyal customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop Also via these contacts you can: — Consult about wholesale purchases — Set up a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — Digital Goods and Premium Subscriptions Store
    • Buying & Selling Torn City Cash
  • 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