• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Joined
Oct 29, 2007
Messages
1,292
Reaction score
1,314
Hi again and again :D: haha... I only pretend show my INCREDIBLE skills to MU Comunity (Again), by this reason is that I like share this source, to LOAD and PLAY new Sounds on: MU Client Season 6.3 GMO, using Files with Extension: .WAV... Enjoy it!
NOTE 1: This code can be researched (I mean offsets and etc...) to more old main.exe versions
NOTE 2: Is important point that you must use ALWAYS some Hexa value more big than: 0x3DA...because values more small than this.. are used by: 1.04d GMO main.exe to Originals MU Monsters Sounds, Interface, and etc..

LoadSound.cpp:

Code:
#include "Stdafx.h"

cLoadSound gLoadSound;

void cLoadSound::LoadInterfaceWindowTick()
{    
pLoadWavSound(0x3DA,LOAD_INTERFACE_TICK,1,1);
}

LoadSound.h:

Code:
#ifndef __LOADSOUND_H__
#define __LOADSOUND_H__

#define LOAD_INTERFACE_TICK        "Data\\Sound\\MySoundTest.wav" // -> Here you can re-name using name that you like.. for your: "NEW SOUND ON .WAV FORMAT FILE" :D:

class cLoadSound
{
public:    
void LoadInterfaceWindowTick();
};

extern cLoadSound gLoadSound;

#endif

PlaySound.cpp:

Code:
#include "Stdafx.h"

cPlaySound gPlaySound;

void cPlaySound::PlayInterfaceWindowTick()
{    
pPlayWavSound(0x3DA,0,0); // -> Here is important only remember use: 0,0
}

PlaySound.h:

Code:
#ifndef __PLAYSOUND_H__
#define __PLAYSOUND_H__

class cPlaySound
{
public:    
void PlayInterfaceWindowTick();
};

extern cPlaySound gPlaySound;

#endif

Offsets and More:

Code:
//-> Sound
#define pLoadWavSound            ((int(__cdecl*)(int SoundID,char * Folder,int Arg3,bool State))0x006D66B0)
#define pPlayWavSound            ((int(__cdecl*)(int SoundID,int Arg2,int Arg3))0x006D6AD0)

Simple Example of Use:If you use: zClient.dll Source... you can try to make this to test:On your Camera Switch States for Button:

Code:
void cCamera::Switch()
{   
 if (IsCam == CameraOn && pMainState == GameProcess)    
{        
gLoadSound.LoadInterfaceWindowTick();        
gPlaySound.PlayInterfaceWindowTick();        
// ----        
this->Enabled = !this->Enabled;    
}
}

Then.. when you in Game Press Camera Button... this Play Interface: "Tick" Sound, like Originals one from Webzen :8:

Credits:

Sobieh & Me (Kiosani)
 
Newbie Spellweaver
Joined
Jul 18, 2015
Messages
51
Reaction score
5
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Kiosani , can you decompile source hp bar party for main old version ( ex : 1.02.19 JPN ) ?
 
Joined
Oct 29, 2007
Messages
1,292
Reaction score
1,314
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Kiosani , can you decompile source hp bar party for main old version ( ex : 1.02.19 JPN ) ?

hmm.. maybe yes, but is difficult.. because old main uses some differents methods for: Viewport Drawing Objects in general. I mean.. is not only make offsets research...
 
Don't be afraid to ask!
Loyal Member
Joined
Jun 2, 2012
Messages
1,454
Reaction score
252
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Its really cool, I asked about some kind of this 1-2 mo ago, so I cant load the new sound, but with this system is it possible to detect item on the floor near the player?

I mean I need to decomp the muhelper, to check how is it detect the item on the floor than load the sound?

Edit:
I find an autoclicker which can pick up items, and I solved this thing, anyway thanks for the SoundLoad src.
 
Last edited:
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Aren't you corrupting memory by calling function that is writing out of bounds?
 
Junior Spellweaver
Joined
Mar 5, 2009
Messages
171
Reaction score
71
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

I only pretend show my INCREDIBLE skills to MU Comunity

Come on... u must be kidding

control your ego before turns bigger than your "skills"
 
Don't be afraid to ask!
Loyal Member
Joined
Jun 2, 2012
Messages
1,454
Reaction score
252
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Kiosani Its okey if the main "freeze" while sound playing? I mean if i put 15 sec sound the main screen stop for 15 sec, I detected this only at now.

It was my bad, because In my code I loaded the music just before play, now I load when client start and its okey. :) Thanks for the sharing!
 
Last edited:
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

corrupting memory ? WHY ?? I only make 2 pointers and original functions not using different call convention from default: __cdecl*

Code:
bool data[0x3DA];

void SetData(int id, bool value)
{
	data[id] = value;
}

SetData(0x3DA, true);
SetData(0x3DB, true);

Code:
void __cdecl sub_6D66B0(int soundId, CHAR *file, int a3, char a4)
{
  if ( byte_87B59C4 && soundId >= 0 && dword_8798B90[soundId] <= 0 ) // Here you read
  {
    if ( !byte_87B59C5 )
      a4 = 0;

    // Who knows what these functions do, when you pass out of bound index?
    if ( sub_6D5E50(soundId, file, a3, a4) >= 0
      || sub_6D5E50(soundId, file, a3, a4) >= 0 && sub_6D66A0(soundId, a3, (unsigned __int8)a4) >= 0 )
    {
      dword_8799AF8[soundId] = 0; // Here you write
      dword_8798B90[soundId] = a3; // Here you write
      byte_87987B0[soundId] = a4; // Here you write
      strcpy(&byte_879AA60[64 * soundId], file); // Here you write

      ++dword_87B59C8;

      // Who knows what this function does, when you pass out of bound index?
      sub_6D6E00(soundId, dword_87B59D8);
    }
  }
}
 
Joined
Oct 29, 2007
Messages
1,292
Reaction score
1,314
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Code:
bool data[0x3DA];

void SetData(int id, bool value)
{
    data[id] = value;
}

SetData(0x3DA, true);
SetData(0x3DB, true);

Code:
void __cdecl sub_6D66B0(int soundId, CHAR *file, int a3, char a4)
{
  if ( byte_87B59C4 && soundId >= 0 && dword_8798B90[soundId] <= 0 ) // Here you read
  {
    if ( !byte_87B59C5 )
      a4 = 0;

    // Who knows what these functions do, when you pass out of bound index?
    if ( sub_6D5E50(soundId, file, a3, a4) >= 0
      || sub_6D5E50(soundId, file, a3, a4) >= 0 && sub_6D66A0(soundId, a3, (unsigned __int8)a4) >= 0 )
    {
      dword_8799AF8[soundId] = 0; // Here you write
      dword_8798B90[soundId] = a3; // Here you write
      byte_87987B0[soundId] = a4; // Here you write
      strcpy(&byte_879AA60[64 * soundId], file); // Here you write

      ++dword_87B59C8;

      // Who knows what this function does, when you pass out of bound index?
      sub_6D6E00(soundId, dword_87B59D8);
    }
  }
}

hmm... maybe u can make a better work... ? :glare: my code is not perfect, but at least it's working. I'm using this code on my actual 1.03.11 main + dll and I don't have problems with this. anyways thanks for tip.
 
Newbie Spellweaver
Joined
Dec 30, 2013
Messages
10
Reaction score
1
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Привет парни
как сделать проверку, если в сообщении есть слово привет то воспроизводился звук ?:love:

Hi guys
how to check if a message contains a word hi the reproduced sound?




 
Don't be afraid to ask!
Loyal Member
Joined
Jun 2, 2012
Messages
1,454
Reaction score
252
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

Привет парни
как сделать проверку, если в сообщении есть слово привет то воспроизводился звук ?:love:

Hi guys
how to check if a message contains a word hi the reproduced sound?





I have a difficult way for it, read the messages on the serverside and if the message contain "hi", than send a request to the clientside, you accept thisrequest on the clientside and play the sound.

I made it with flame of condor drop and its working good.
 
Newbie Spellweaver
Joined
Jun 5, 2015
Messages
35
Reaction score
6
re: [Development] New Load & Play Wav Sound Sources For 1.04d (GMO)

hi man have offsets for 1.04.05, is same? mi main is muemu
 
Back
Top