Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Load NEW Maps Music on .MP3 Source (1.03K) Japan

Joined
Oct 29, 2007
Messages
1,288
Reaction score
1,308
Hello people :D: today I like share this source... this is not a decompiled source yet, It's only assembler re-writed from main.exe but is easy to understand anyways :D:

Maps.cpp:

Code:
void Naked cMaps::PlayMusic()
{
    static DWORD dwPlayMusic_Call1    = 0x005F7325;
    static DWORD dwPlayMusic_Call2    = 0x005F72E3;
    static DWORD dwPlayMusic_Return = 0x00602545;
    // ----
    static PCHAR cKalimdor_Music    = "data\\music\\Kalimdor.mp3";
    static PCHAR cArkania_Music        = "data\\music\\Arkania.mp3";
    static PCHAR cMarket_Music        = "data\\music\\Market.mp3";
    static PCHAR cKarutanA_Music    = "data\\music\\Karutan_A.mp3";
    // ----
    _asm
    {
        CMP DWORD PTR DS:[0x8C5CF8],3            // -> Noria = 03
        JNZ Label_1
        MOV EDX,DWORD PTR DS:[0x7A723B8]
        MOV AL,BYTE PTR DS:[EDX+0x0E]
        TEST AL,AL
        JE Label_1
        MOV EAX,DWORD PTR DS:[0x8D6F90]
        PUSH 0
        PUSH EAX
        CALL dwPlayMusic_Call1
        JMP Label_2
        Label_1:
        MOV ECX,DWORD PTR DS:[0x8D6F90]
        PUSH 0
        PUSH ECX
        CALL dwPlayMusic_Call2
        Label_2:
        MOV EAX,DWORD PTR DS:[0x8C5CF8]
        ADD ESP,0x08
        // ----
        CMP DWORD PTR DS:[0x8C5CF8],0x42        // -> Arkania = 66
        JNZ Label_1A
        MOV EDX,DWORD PTR DS:[0x7A723B8]
        MOV AL,BYTE PTR DS:[EDX+0x0E]
        TEST AL,AL
        JE Label_1A
        MOV EAX,DWORD PTR DS:[cArkania_Music]
        PUSH 0
        PUSH EAX
        CALL dwPlayMusic_Call1
        JMP Label_2A
        Label_1A:
        MOV ECX,DWORD PTR DS:[cArkania_Music]
        PUSH 0
        PUSH ECX
        CALL dwPlayMusic_Call2
        Label_2A:
        MOV EAX,DWORD PTR DS:[0x8C5CF8]
        ADD ESP,0x08
        // ----
        CMP DWORD PTR DS:[0x8C5CF8],0x43        // -> Market = 67
        JNZ Label_1B
        MOV EDX,DWORD PTR DS:[0x7A723B8]
        MOV AL,BYTE PTR DS:[EDX+0x0E]
        TEST AL,AL
        JE Label_1B
        MOV EAX,DWORD PTR DS:[cMarket_Music]
        PUSH 0
        PUSH EAX
        CALL dwPlayMusic_Call1
        JMP Label_2B
        Label_1B:
        MOV ECX,DWORD PTR DS:[cMarket_Music]
        PUSH 0
        PUSH ECX
        CALL dwPlayMusic_Call2
        Label_2B:
        MOV EAX,DWORD PTR DS:[0x8C5CF8]
        ADD ESP,0x08
        // ----
        CMP DWORD PTR DS:[0x8C5CF8],0x44        // -> Karutan 1 = 68
        JNZ Label_1C
        MOV EAX,DWORD PTR DS:[cKarutanA_Music]
        PUSH 0
        PUSH EAX
        CALL dwPlayMusic_Call1
        JMP Label_2C
        Label_1C:
        MOV ECX,DWORD PTR DS:[cKarutanA_Music]
        PUSH 0
        PUSH ECX
        CALL dwPlayMusic_Call2
        Label_2C:
        MOV EAX,DWORD PTR DS:[0x8C5CF8]
        ADD ESP,0x08
        // ----
        CMP DWORD PTR DS:[0x8C5CF8],0x41        // -> Kalimdor = 65
        JNZ Label_1D
        MOV EAX,DWORD PTR DS:[cKalimdor_Music]
        PUSH 0
        PUSH EAX
        CALL dwPlayMusic_Call1
        JMP Label_2D
        Label_1D:
        MOV ECX,DWORD PTR DS:[cKalimdor_Music]
        PUSH 0
        PUSH ECX
        CALL dwPlayMusic_Call2
        Label_2D:
        MOV EAX,DWORD PTR DS:[0x8C5CF8]
        ADD ESP,0x08
        // ----
        JMP dwPlayMusic_Return
    }
}

void cMaps::InitPlayMusic()
{
    gToolKit.SetRange((LPVOID)0x0060250A,59,ASM::NOP);
    gToolKit.SetJmp((LPVOID)0x0060250A,this->PlayMusic);
}

void cMaps::Load()
{
	this->InitPlayMusic();
}

Maps.h:

Code:
#ifndef __MAPS_H__
#define __MAPS_H__


class cMaps
{
public:
    void Load();
    // ----
    void InitPlayMusic();

    static void PlayMusic();
};


extern cMaps gMaps;


#endif

NOTE 1: A small and interested thing about this code is this:

Code:
MOV EDX,DWORD PTR DS:[0x7A723B8] [COLOR=#800080]// -> Struct Preview WOW![/COLOR]
MOV AL,BYTE PTR DS:[EDX+0x0E] [COLOR=#800080]// -> EDX+0x0E or: #define pIsSafeZone(x) *(BYTE*)(x + 14)[/COLOR]
TEST AL,AL [COLOR=#800080]// -> Here make the comparation... I mean compare pSafeZone with char current pos[/COLOR] 
JE Label_1A [COLOR=#800080]// -> Then if character exists on a: "SafeZone" from this Map, Play Again the Music[/COLOR]

Then using your Imagination and with some knowledge... you can try to make something new and cool using: your MUSIC folder from your MU Client :wink: I don't know.. maybe something like this:

Code:
MOV EDX,DWORD PTR DS:[0x7A723B8] [COLOR=#800080]// -> Struct Preview[/COLOR]
MOV AL,BYTE PTR DS:[EDX+0x20] [COLOR=#800080]// -> EDX+0x20 or: #define pIsPK(x) *(BYTE*)(x + 32)[/COLOR]
TEST AL,AL [COLOR=#800080]// -> Here make the comparation... I mean compare pIsPK with your Character State[/COLOR] 
JE Label_1A [COLOR=#800080]// -> Here you can make a extra JUMP to Play ANOTHER: .mp3 Music file...[/COLOR] :wink:

NOTE 2: You only must remember put different names to every: "Label" that you add to this code for every new Map Case. Ex: Label_1E, Label_1F, etc.

Credits:
Kiosani (ME)
 
Newbie Spellweaver
Joined
Jul 5, 2014
Messages
7
Reaction score
0
I added the code to 1.05D but there is no sound in the new map


Luis_br English only please [Edited by KarLi]
 
Last edited by a moderator:
Initiate Mage
Joined
Jan 9, 2022
Messages
2
Reaction score
0
360截图18750813459258 - Load NEW Maps Music on .MP3 Source (1.03K) Japan - RaGEZONE Forums 360截图17670909667173 - Load NEW Maps Music on .MP3 Source (1.03K) Japan - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Back
Top