Jump to content

Recommended Posts

Posted

=====================================================================
Index: net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
=====================================================================

public final void sendDamageMessage(L2Character target, int damage, boolean mcrit, boolean pcrit, boolean miss)
{
	// Check if hit is missed
	if (miss)
	{
		sendPacket(new SystemMessage(SystemMessageId.MISSED_TARGET));
		return;
	}

	// check if hit is critical
	if (pcrit)
+              {
		sendPacket(new SystemMessage(SystemMessageId.CRITICAL_HIT));
+			PlaySound CRITICAL_HIT_SOUND = new PlaySound(1, "CRITICAL_HIT_SOUND", 0, 0, 0, 0, 0);
+			this.sendPacket(CRITICAL_HIT_SOUND);
+			this.broadcastPacket(CRITICAL_HIT_SOUND); //Can hear and those around you
+              }

	if (mcrit)
+              {
		sendPacket(new SystemMessage(SystemMessageId.CRITICAL_HIT_MAGIC));
+			PlaySound MAGICAL_HIT_SOUND = new PlaySound(1, "MAGICAL_HIT_SOUND", 0, 0, 0, 0, 0);
+			this.sendPacket(MAGICAL_HIT_SOUND);
+			this.broadcastPacket(MAGICAL_HIT_SOUND); //Can hear and those around you
+              }

	SystemMessage sm = new SystemMessage(SystemMessageId.YOU_DID_S1_DMG);
	sm.addNumber(damage);
	sendPacket(sm);
}

 

 

Thanks LauQ

I will make some soon, and post them here, and if xAddytzu could add them to the first post then ^^

Btw: to prevent hearing two sounds at a normal crit (pcrit) (as you also have the default client side critical hit sound), you could edit ALAudio.int, which is inside your Lineage 2/system folder, with L2FileEdit. There you can find this:

[EtcSound]
CriticalSound=SkillSound.Critical_Hit_02
CriticalSound_Vol=250.0
CriticalSound_Radius=50.0

And you could set CriticalSound_Vol=0.0 or something, so you don't hear two sounds at the same time if you want ^^

Posted

xAddytzu,

Correct your message:

_log.warning("this.isBack");

makes no sense since this refers to the class and you're using it inside a string lool.

So should be:

_log.warning(this.getName() + "isBack"); ^^

Posted

xAddytzu,

Correct your message:

_log.warning("this.isBack");

makes no sense since this refers to the class and you're using it inside a string lool.

So should be:

_log.warning(this.getName() + "isBack"); ^^

I wanted in a row

Posted

Very nice share, thanks

 

Yep, but you must add sounds in game (format ogg)

 

Sounds are inside .uax packs, which you can make easily with UnrealED (import .wav's)

 

mayby anybody have any sound for critical / magic critical and can share it?

 

I will make some soon, and post them here, and if xAddytzu could add them to the first post then ^^

 

Btw: to prevent hearing two sounds at a normal crit (pcrit) (as you also have the default client side critical hit sound), you could edit ALAudio.int, which is inside your Lineage 2/system folder, with L2FileEdit. There you can find this:

 

[EtcSound]

CriticalSound=SkillSound.Critical_Hit_02

CriticalSound_Vol=250.0

CriticalSound_Radius=50.0

 

And you could set CriticalSound_Vol=0.0 or something, so you don't hear two sounds at the same time if you want ^^

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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