• 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.

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
293
Reaction score
86
This idea was good.
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
293
Reaction score
86
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