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 ^^

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...