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!

Simple LevelUp sound

Newbie Spellweaver
Joined
Apr 5, 2012
Messages
46
Reaction score
5
I know its so simple.

ZGameClient.cpp:

find "void ZGameClient::OnGameLevelUp"

replace
PHP:
	if (ZGetGame())
	{
		ZCharacter* pCharacter = ZGetGame()->m_CharacterManager.Find(uidChar);
		if (pCharacter) {
			pCharacter->LevelUp();

			char temp[256] = "";
			ZTransMsg(temp, MSG_GAME_LEVEL_UP, 1, pCharacter->GetUserAndClanName());
			ZChatOutput(MCOLOR(ZCOLOR_GAME_INFO), temp);
		}
	}

with
PHP:
	if (ZGetGame())
	{
		ZCharacter* pCharacter = ZGetGame()->m_CharacterManager.Find(uidChar);
		if (pCharacter) {
			pCharacter->LevelUp();

			char temp[256] = "";
			ZTransMsg(temp, MSG_GAME_LEVEL_UP, 1, pCharacter->GetUserAndClanName());
			ZChatOutput(MCOLOR(ZCOLOR_GAME_INFO), temp);
			ZGetSoundEngine()->PlaySound( "nar/level_up", pCharacter->GetPosition()); //Levelup sound
		}
	}




LevelUp sound:


Preview
 
Skilled Illusionist
Joined
May 4, 2008
Messages
304
Reaction score
41
I like the idea. Thanks!
 
Last edited:
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
This idea was good.
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
It works on any VS and just apply that code and compile.
 
Newbie Spellweaver
Joined
Apr 5, 2012
Messages
46
Reaction score
5
I get error when compiling the code :/
Replace

Code:
void ZGameClient::OnGameLevelUp(const MUID& uidChar)
{
	if (ZGetGame())
	{
		ZCharacter* pCharacter = ZGetGame()->m_CharacterManager.Find(uidChar);
		if (pCharacter) {
			pCharacter->LevelUp();

			char temp[256] = "";
			ZTransMsg(temp, MSG_GAME_LEVEL_UP, 1, pCharacter->GetUserAndClanName());
			ZChatOutput(MCOLOR(ZCOLOR_GAME_INFO), temp);
		}
	}
}

with

Code:
void ZGameClient::OnGameLevelUp(const MUID& uidChar)
{
	if (ZGetGame())
	{
		ZCharacter* pCharacter = ZGetGame()->m_CharacterManager.Find(uidChar);
		if (pCharacter) {
			pCharacter->LevelUp();

			char temp[256] = "";
			ZTransMsg(temp, MSG_GAME_LEVEL_UP, 1, pCharacter->GetUserAndClanName());
			ZChatOutput(MCOLOR(ZCOLOR_GAME_INFO), temp);
			[B]ZGetSoundEngine()->PlaySound( "nar/level_up", pCharacter->GetPosition()); // <---- the code[/B] 
		}
	}
}
 
Newbie Spellweaver
Joined
Apr 20, 2020
Messages
13
Reaction score
2
I know its so simple.

ZGameClient.cpp:

find "void ZGameClient::OnGameLevelUp"

replace
PHP:
    if (ZGetGame())
    {
        ZCharacter* pCharacter = ZGetGame()->m_CharacterManager.Find(uidChar);
        if (pCharacter) {
            pCharacter->LevelUp();

            char temp[256] = "";
            ZTransMsg(temp, MSG_GAME_LEVEL_UP, 1, pCharacter->GetUserAndClanName());
            ZChatOutput(MCOLOR(ZCOLOR_GAME_INFO), temp);
        }
    }

with
PHP:
    if (ZGetGame())
    {
        ZCharacter* pCharacter = ZGetGame()->m_CharacterManager.Find(uidChar);
        if (pCharacter) {
            pCharacter->LevelUp();

            char temp[256] = "";
            ZTransMsg(temp, MSG_GAME_LEVEL_UP, 1, pCharacter->GetUserAndClanName());
            ZChatOutput(MCOLOR(ZCOLOR_GAME_INFO), temp);
            ZGetSoundEngine()->PlaySound( "nar/level_up", pCharacter->GetPosition()); //Levelup sound
        }
    }




LevelUp sound:


Preview


NÃO FUNCIONA NA FONTE Jur13n repack !!!!!
DOES NOT WORK ON THE SOURCE Jur13n !!!!
 
Initiate Mage
Joined
Jan 29, 2020
Messages
4
Reaction score
0
Reupload the Sound!!




Also for some version of gunz you might need to add 2 false argument at the end like this:
Code:
[/COLOR][COLOR=#0000BB]ZGetSoundEngine[/COLOR][COLOR=#007700]()->[/COLOR][COLOR=#0000BB]PlaySound[/COLOR][COLOR=#007700]( [/COLOR][COLOR=#DD0000]"nar/level_up"[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]pCharacter[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]GetPosition[/COLOR][COLOR=#007700](), false, false); [/COLOR][COLOR=#FF8000]//Levelup sound
 
Last edited:
Back
Top