Aveline™ 556 Posted April 14, 2014 Share Posted April 14, 2014 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hi guys. someone wanna voice for npcs but they are not know how to make this system and i wanna share with your I hope you are like it. First client; open game.py and search this after under add this "mall" : self.__InGameShop_Show, "voice" : self.GiveMeVoice, Add this def GiveMeVoice(self,voice): x, y, z = player.GetMainCharacterPosition() randX = app.GetRandom(-150, 150) randY = app.GetRandom(-150, 150) snd.PlaySound3D(x+randX, -y+randY, z, "sound/npcs/" + str(voice) + ".mp3") How to use this function in my quest? quest voice begin state start begin when 20354.chat."Give me a voice" begin cmdchat("voice "..npc.get_race()) say("I'm say this feeling really perfect.. ") say("") end end end Why i use to snd.PlaySound3D? Why not snd.FadeInMusic? Let me i explain to your. snd.FadeInMusic just change music so i mean if i use to this function in function, when sound is finished sound is started again until player change music.. snd.PlaySound3D when sound is finished, sound not started again Kind Regards HaveBeen 14 2 2 2 7 1 25 Plain logic saves lives. Link to comment Share on other sites More sharing options...
lawry 2 Posted April 15, 2014 Share Posted April 15, 2014 good job thx i like it 1 Link to comment Share on other sites More sharing options...
★ j0ĸ3rнd ★ 3 Posted April 16, 2014 Share Posted April 16, 2014 I will try this. 1 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4942 Posted April 16, 2014 Bot Share Posted April 16, 2014 nice release havebeen Link to comment Share on other sites More sharing options...
UNK3N0W7 379 Posted April 20, 2014 Share Posted April 20, 2014 Ohh , very good 1 Link to comment Share on other sites More sharing options...
tromidas15 0 Posted April 27, 2014 Share Posted April 27, 2014 Where I have to put the name of mp3 file? Link to comment Share on other sites More sharing options...
Premium KingTsunamy 24 Posted June 6, 2014 Premium Share Posted June 6, 2014 0606 20:10:08789 :: invalid idx 0 0606 20:11:47591 :: Traceback (most recent call last): 0606 20:11:47592 :: File "networkModule.py", line 237, in SetGamePhase 0606 20:11:47592 :: File "system.py", line 130, in __pack_import 0606 20:11:47593 :: File " 0606 20:11:47593 :: game.py 0606 20:11:47593 :: ", line 0606 20:11:47593 :: 2406 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: x, y, z = player.GetMainCharacterPosition() 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: ^ 0606 20:11:47595 :: IndentationError 0606 20:11:47595 :: : 0606 20:11:47595 :: unindent does not match any outer indentation level 0606 20:11:47595 :: Link to comment Share on other sites More sharing options...
luzzo 197 Posted June 6, 2014 Share Posted June 6, 2014 0606 20:10:08789 :: invalid idx 0 0606 20:11:47591 :: Traceback (most recent call last): 0606 20:11:47592 :: File "networkModule.py", line 237, in SetGamePhase 0606 20:11:47592 :: File "system.py", line 130, in __pack_import 0606 20:11:47593 :: File " 0606 20:11:47593 :: game.py 0606 20:11:47593 :: ", line 0606 20:11:47593 :: 2406 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: x, y, z = player.GetMainCharacterPosition() 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47593 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: 0606 20:11:47594 :: ^ 0606 20:11:47595 :: IndentationError 0606 20:11:47595 :: : 0606 20:11:47595 :: unindent does not match any outer indentation level 0606 20:11:47595 :: As sysser said you have and indetation error. Use tab Link to comment Share on other sites More sharing options...
Former Staff Shisui 493 Posted December 9, 2014 Former Staff Share Posted December 9, 2014 What am i doing wrong? 1209 15:33:23542 :: File "game.py", line 2280, in __ServerCommand_Build 1209 15:33:23542 :: AttributeError 1209 15:33:23542 :: : 1209 15:33:23542 :: 'GameWindow' object has no attribute 'GiveMeVoice' 1209 15:33:23542 :: Link to comment Share on other sites More sharing options...
mhmdhjere 15 Posted December 9, 2014 Share Posted December 9, 2014 I have thought about this before . Thank you bro , good job ! Link to comment Share on other sites More sharing options...
Xynjo 3 Posted May 27, 2015 Share Posted May 27, 2015 how to in quest select sound np Hello.mp3 Link to comment Share on other sites More sharing options...
Yacki 3 Posted May 31, 2015 Share Posted May 31, 2015 snd.PlaySound3D(x+randX, -y+randY, z, "sound/npcs/" + str(voice) + ".mp3") "sound/npcs/" + str(voice) + ".mp3" ^- Up there, for every NPC which was asked inside a quest, the MP3 File equivalent to the value of the mob_proto of MySQL is playing then. Just put the file you want to add into that folder: "sound/npcs" If it doesn't exist, just create it. But first of all you need to extract the sound.epk/eix archive(s). E.g.: If you want the NPC 9003 to play an Mp3, you simply need to rename your .mp3 file to 9003.mp3 -> Go ahead and copy it to this directory: "sound/npcs" Unterstood the principe? If not don't hessitate to ask questions Link to comment Share on other sites More sharing options...
Saitan 0 Posted May 20, 2019 Share Posted May 20, 2019 Hi, I have a little question takes it just MONO and stereo doesn't go. Why??? Link to comment Share on other sites More sharing options...
Ezequiel G. 422 Posted June 10, 2019 Share Posted June 10, 2019 Thanks, work on 40k+ client? Link to comment Share on other sites More sharing options...
krokodysek 1 Posted July 3, 2019 Share Posted July 3, 2019 any help with this quest ./pre_qc/wtf.quest:7:syntax error : [string "start"]:4: `=' expected near `<eof>' now quest compile is ok but when it click quest sound not start Link to comment Share on other sites More sharing options...
adriielito 2 Posted February 1, 2021 Share Posted February 1, 2021 (edited) it is possible to play the sound just when you click the npc? as i can see, it only works when the npc dont have any quest asociated to him :S Edited February 1, 2021 by adriielito 2 Link to comment Share on other sites More sharing options...
Recommended Posts