Jump to content

[Quest] Sistema de matar con sonido


Robert

Recommended Posts

Bueno me encontre con esto hace ya semanas no me acuerdo ni donde y os lo traigo a vosotros tambien. Lo que hace el sistema es que a cada muerte que hagas dice un sonido como monsterkill, ultrakill, pentakill etc. Y para que sigan tienes que matar en un intervalo de 20 segundos. Esto solo lo vas a escuchar tu la otra persona no, solo si te mata ella primero.


 


Entrais en game.py y buscais:



"PlayMusic" : self.__PlayMusic,

Debajo de ella añadireis esto:



"PlayMusicxd" : self.__PlayMusicxd,

Allí os copiáis de los TAB que trae el de arriba.


Después buscáis esto:



snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)

Y debajo añadiréis esto:



[TAB]def __PlayMusicxd(self, filename):
[TAB][TAB]snd.PlaySound("BGM/" + filename)

Aquí los [TAB] es la tecla tab no la copiéis :)


 


Ahora la quest:



quest pentakillxd begin
state start begin
when kill with npc.is_pc() begin
if get_time()< pc.getqf("grupo") then
pc.delqf("grupo")
pc.setqf("one", get_time()+20)
cmdchat("PlayMusicxd onekill.mp3")
elseif get_time()< pc.getqf("one") then
pc.setqf("doble", get_time()+20)
cmdchat("PlayMusicxd doublekill.mp3")
elseif get_time()< pc.getqf("doble") then
pc.setqf("triple", get_time()+20)
cmdchat("PlayMusicxd triplekill.mp3")
elseif get_time()< pc.getqf("triple") then
pc.setqf("quadra", get_time()+20)
cmdchat("PlayMusicxd quadra.mp3")
elseif get_time()< pc.getqf("quadra") then
pc.setqf("pentakill", get_time()+20)
cmdchat("PlayMusicxd pentakill.mp3")
elseif get_time()< pc.getqf("pentakill") then
pc.setqf("hexakill", get_time()+20)
cmdchat("PlayMusicxd hexakill.mp3")
elseif get_time()< pc.getqf("hexakill") then
pc.setqf("dominating", get_time()+20)
cmdchat("PlayMusicxd dominating.mp3")
elseif get_time()< pc.getqf("dominating") then
pc.setqf("neutralized", get_time()+20)
cmdchat("PlayMusicxd neutralized.mp3")
elseif get_time()< pc.getqf("neutralized") then
pc.setqf("unstoppable", get_time()+20)
cmdchat("PlayMusicxd unstoppable.mp3")
elseif get_time()< pc.getqf("unstoppable") then
pc.setqf("unstoppable", get_time()+20)
cmdchat("PlayMusicxd unstoppable.mp3")
else
pc.setqf("grupo", get_time()+10)
cmdchat("PlayMusicxd onekill1.mp3")
end
end
end
end

Y por ultimo los sonidos que los meteis en la carpeta BGM.


Debes iniciar sesión para ver el contenido del enlace en esta publicación.


Link to comment
Share on other sites

  • 5 years later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...