[Help]How to enable npc sound ?

05/17/2014 07:39 banktakung#1
I'm try to get more information about flyff. and now i see interesting thing in japan flyff

i'm try to search everything but i didn't see anything to enable this. i see .wav define in WorlDailog.txt

so please :handsdown::handsdown:

05/17/2014 09:06 420twisted1#2
I think it's just the normal AddPlaySound() that's already in flyff they just inserted it in the OnInitialUpdate() probably with a switch statement for which MMI it is at least that's how I would code it.

In character.inc there's something like

Code:
SetMusic( BGM_NPC_SOLEMN2);
this may be it if it's not then it will play the sound but cancel the music that is currently playing if you search for SetMusic it only appears in project.cpp you could try to do something like

Code:
			if( script.Token == "SetNPCVoice" )
			{
				script.GetToken();
				AddPlaySound( script.GetNumber() );
			}
or what ever you feel you can accomplish with your skill level you have a few options now.
05/17/2014 23:18 banktakung#3
lol no luck with it.

SetMusic is just play bg music not voice :p

How ever i found this function in WorldDailog


Code:
void CNpcScript::mafl_is_1()
{
	switch( Random( 3 ) )
	{
		case 0:	PlaySound( 536 ); break;
		case 1:	PlaySound( 537 ); break;
		case 2:	PlaySound( 538 ); break;
	}

	LaunchQuest();
}
but i don't know how to enable it -.-!
05/17/2014 23:52 420twisted1#4
Hmmm that should be it then did you try this?

Code:
void CNpcScript::mafl_is_1()
{

        PlaySound( 70 );

	LaunchQuest();
}
this should play the sound of leveling up if you can't get this working the first option I listed will work for sure it just requires you to do some minor coding.
05/18/2014 01:57 banktakung#5
Quote:
Originally Posted by 420twisted1 View Post
Hmmm that should be it then did you try this?

Code:
void CNpcScript::mafl_is_1()
{

        PlaySound( 70 );

	LaunchQuest();
}
this should play the sound of leveling up if you can't get this working the first option I listed will work for sure it just requires you to do some minor coding.

PlaySound( 70 );

num 70 should be WorldDailog.txt line 69. what ever i will try out first.
05/18/2014 12:56 xTwiLightx#6
Quote:
Originally Posted by banktakung View Post
PlaySound( 70 );

num 70 should be WorldDailog.txt line 69. what ever i will try out first.
You are right about the line. If you take a look in WorldDialog.txt, you will find following in 537-539:
Code:
vocNpcIs-open1.wav
vocNpcIs-open2.wav
vocNpcIs-open3.wav
05/18/2014 15:57 420twisted1#7
Lol well sh*t your right! I don't seem to any have of the vocNpc wav files though, maybe you are missing them too? that would explain why you can't get it to work.
05/19/2014 00:05 banktakung#8
Quote:
Originally Posted by 420twisted1 View Post
Lol well sh*t your right! I don't seem to any have of the vocNpc wav files though, maybe you are missing them too? that would explain why you can't get it to work.
i have it all from J Flyff lol
05/19/2014 03:41 420twisted1#9
well make sure it's searching for the correct file name, if it still doesn't work then u'll have to code a new way but that should be simple.
05/19/2014 09:58 banktakung#10
Quote:
Originally Posted by 420twisted1 View Post
well make sure it's searching for the correct file name, if it still doesn't work then u'll have to code a new way but that should be simple.
Yeah i'm start to trying out. i'm found how to make voice for select character and voice for skill but for npc i'm still none-sense for this lol.
05/27/2014 22:32 banktakung#11
any idea ?
05/25/2025 03:57 Tamus#12
update?
05/31/2025 14:18 Flogolo#13
Quote:
Originally Posted by Tamus View Post
update?
why do you push an ancient thread from 2014?