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!

System XMAS (Gift Christmas)

I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Hello RaGEZONE, I had no time to make a collaboration of this kind and I hope it is to your liking.

This only makes snow fall on all maps no matter what kind of game it is or where you are adding the santa hat to all the characters of both sexes.

A type of switch has been added to activate or deactivate it, since I release this code you can make any modification if you wish, enjoy it.

MMFeatureDefine.h
Code:
#define _XMASJORK2 1

in ZCharacter.cpp line "void ZCharacter::InitProperties()" add

Code:
#ifdef _XMASJORK2
	if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) ||
		(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
	{

		if (GetProperty()->nSex == MMS_FEMALE){
			m_Items.EquipItem(MMCIP_HEAD, 520513);
		}
		else{
			m_Items.EquipItem(MMCIP_HEAD, 520013);
		}
		m_Items.EquipItem(MMCIP_FINGERL, 525005);
	}
#endif

in ZGame.cpp line "class ZSnowTownParticleSystem" remplace for these:

Code:
class ZSnowTownParticleSystem
{
private:
	RParticles*		m_pParticles[5];
	bool IsSnowTownMap()
	{
#ifdef _XMASJORK2
		if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MAX, 4)) return true;//Xmas
#else
		if (!strnicmp(ZGetGameClient()->GetMatchStageSetting()->GetMapName(), "snow", 4)) return true;
#endif
		return false;
	}
public:
	void Update(float fDeltaTime)
	{
		if (!IsSnowTownMap()) return;

#define SNOW_PARTICLE_COUNT_PER_SECOND		600		// ´ë·« ÃÊ´ç 300°³Âë ¿ø·¡ ÇÁ·¹ÀÓ´ç 14°³¿´À½.

		int nSnowParticleCountPerSec = SNOW_PARTICLE_COUNT_PER_SECOND;
		switch (ZGetConfiguration()->GetVideo()->nEffectLevel)
		{
		case Z_VIDEO_EFFECT_HIGH:	break;
		case Z_VIDEO_EFFECT_NORMAL:	nSnowParticleCountPerSec = nSnowParticleCountPerSec / 8; break;
		case Z_VIDEO_EFFECT_LOW:	nSnowParticleCountPerSec = nSnowParticleCountPerSec / 12; break;
		default: nSnowParticleCountPerSec = 0; break;
		}

		int nCount = min(nSnowParticleCountPerSec * fDeltaTime,20);	// Çѹø¿¡ 20°³ ÀÌ»óÀº ¾È³ª¿Àµµ·ÏÇÑ´Ù
		for(int i=0;i<nCount;i++)
		{
			RParticle *pp=new RSnowParticle();
			pp->ftime=0;
			pp->position = rvector(RandomNumber(-8000.0f, 8000.0f), RandomNumber(-8000.0f, 8000.0f), 1500.0f);
			pp->velocity = rvector(RandomNumber(-40.0f, 40.0f), RandomNumber(-40.0f, 40.0f), RandomNumber(-150.0f, -250.0f));
			pp->accel=rvector(0,0,-5.f);

			int particle_index = RandomNumber(0, 2);
			if (m_pParticles[particle_index]) m_pParticles[particle_index]->push_back(pp);
		}
	}
	void Create()
	{
		if (!IsSnowTownMap()) return;

		for (int i = 0; i < 3; i++)
		{
			m_pParticles[i] = NULL;
		}

		// ÆÄƼŬ »ý¼º
		m_pParticles[0] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 25.0f);
		m_pParticles[1] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 20.0f);
		m_pParticles[2] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 15.0f);
		m_pParticles[3] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 5.0f);
		m_pParticles[4] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 5.0f);
	}
	void Destroy()
	{
		if (!IsSnowTownMap()) return;

		m_pParticles[0]->Clear();
		m_pParticles[1]->Clear();
		m_pParticles[2]->Clear();
	}
};

in ZWorld.cpp in line "bool ZWorld::Create(ZLoadingProgress *pLoading )" add these

Code:
#ifdef _XMASJORK2
	if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) || 
		(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST || 
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING || 
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO || 
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL || 
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER || 
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
		ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
#else
	if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE))
#endif
	{
		m_bFog = true;
		m_fFogNear = 0.0f;
		m_fFogFar = 6000.0f;
#ifdef _XMASJORK2
		m_dwFogColor = 0xCCF1FF;
#else
		m_dwFogColor = 0xC30404;
#endif
	}
	else
	{
		FogInfo finfo = GetBsp()->GetFogInfo();
		m_bFog = finfo.bFogEnable;
		m_fFogNear = finfo.fNear;
		m_fFogFar = finfo.fFar;
		m_dwFogColor = finfo.dwFogColor;
	}

	m_bCreated = true;

add these in your sfx.mrs


ScreenShots

jorklenis2 - System XMAS (Gift Christmas) - RaGEZONE Forums


jorklenis2 - System XMAS (Gift Christmas) - RaGEZONE Forums


It's everything and I hope you enjoy it.:thumbup1:
 
Skilled Illusionist
Joined
May 4, 2008
Messages
304
Reaction score
41
Nice release.
I had the same idea a while ago and added it to FGunZ although using date as switch so it enables the effects automatically for certain dates and we don't have to push any .exe updates nor restart the server to enable/disable it. There's better ways but it works.
 
Last edited:
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Nice release.
I had the same idea a while ago and added it to FGunZ although using date as switch so it enables the effects automatically for certain dates and we don't have to push any .exe updates nor restart the server to enable/disable it. There's better ways but it works.

I am trying to do the same but I do not know the pleasure of doing it that way.
 
Junior Spellweaver
Joined
Aug 30, 2014
Messages
131
Reaction score
7
That Itachi Model caught my eyes, you have other anime avatars? possible to share?
 
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
That Itachi Model caught my eyes, you have other anime avatars? possible to share?

I'm sorry I can not share it, I only have the itachi one, if you're interested we can talk about possible businesses, I have more rare avatars.
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
Hello RaGEZONE, I had no time to make a collaboration of this kind and I hope it is to your liking.

This only makes snow fall on all maps no matter what kind of game it is or where you are adding the santa hat to all the characters of both sexes.

A type of switch has been added to activate or deactivate it, since I release this code you can make any modification if you wish, enjoy it.

MMFeatureDefine.h
Code:
#define _XMASJORK2 1

in ZCharacter.cpp line "void ZCharacter::InitProperties()" add

Code:
#ifdef _XMASJORK2
    if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) ||
        (ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
    {

        if (GetProperty()->nSex == MMS_FEMALE){
            m_Items.EquipItem(MMCIP_HEAD, 520513);
        }
        else{
            m_Items.EquipItem(MMCIP_HEAD, 520013);
        }
        m_Items.EquipItem(MMCIP_FINGERL, 525005);
    }
#endif

in ZGame.cpp line "class ZSnowTownParticleSystem" remplace for these:

Code:
class ZSnowTownParticleSystem
{
private:
    RParticles*        m_pParticles[5];
    bool IsSnowTownMap()
    {
#ifdef _XMASJORK2
        if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MAX, 4)) return true;//Xmas
#else
        if (!strnicmp(ZGetGameClient()->GetMatchStageSetting()->GetMapName(), "snow", 4)) return true;
#endif
        return false;
    }
public:
    void Update(float fDeltaTime)
    {
        if (!IsSnowTownMap()) return;

#define SNOW_PARTICLE_COUNT_PER_SECOND        600        // ´ë·« ÃÊ´ç 300°³Âë ¿ø·¡ ÇÁ·¹ÀÓ´ç 14°³¿´À½.

        int nSnowParticleCountPerSec = SNOW_PARTICLE_COUNT_PER_SECOND;
        switch (ZGetConfiguration()->GetVideo()->nEffectLevel)
        {
        case Z_VIDEO_EFFECT_HIGH:    break;
        case Z_VIDEO_EFFECT_NORMAL:    nSnowParticleCountPerSec = nSnowParticleCountPerSec / 8; break;
        case Z_VIDEO_EFFECT_LOW:    nSnowParticleCountPerSec = nSnowParticleCountPerSec / 12; break;
        default: nSnowParticleCountPerSec = 0; break;
        }

        int nCount = min(nSnowParticleCountPerSec * fDeltaTime,20);    // Çѹø¿¡ 20°³ ÀÌ»óÀº ¾È³ª¿Àµµ·ÏÇÑ´Ù
        for(int i=0;i<nCount;i++)
        {
            RParticle *pp=new RSnowParticle();
            pp->ftime=0;
            pp->position = rvector(RandomNumber(-8000.0f, 8000.0f), RandomNumber(-8000.0f, 8000.0f), 1500.0f);
            pp->velocity = rvector(RandomNumber(-40.0f, 40.0f), RandomNumber(-40.0f, 40.0f), RandomNumber(-150.0f, -250.0f));
            pp->accel=rvector(0,0,-5.f);

            int particle_index = RandomNumber(0, 2);
            if (m_pParticles[particle_index]) m_pParticles[particle_index]->push_back(pp);
        }
    }
    void Create()
    {
        if (!IsSnowTownMap()) return;

        for (int i = 0; i < 3; i++)
        {
            m_pParticles[i] = NULL;
        }

        // ÆÄƼŬ »ý¼º
        m_pParticles[0] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 25.0f);
        m_pParticles[1] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 20.0f);
        m_pParticles[2] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 15.0f);
        m_pParticles[3] = RGetParticleSystem()->AddParticles("sfx/water_splash.bmp", 5.0f);
        m_pParticles[4] = RGetParticleSystem()->AddParticles("sfx/water_now.bmp", 5.0f);
    }
    void Destroy()
    {
        if (!IsSnowTownMap()) return;

        m_pParticles[0]->Clear();
        m_pParticles[1]->Clear();
        m_pParticles[2]->Clear();
    }
};

in ZWorld.cpp in line "bool ZWorld::Create(ZLoadingProgress *pLoading )" add these

Code:
#ifdef _XMASJORK2
    if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DEATHMATCH_SOLO) || 
        (ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_QUEST || 
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_TRAINING || 
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_GLADIATOR_SOLO || 
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_SURVIVAL || 
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_BERSERKER || 
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_PAINTBALL_SOLO ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_CLASSIC_SOLO ||
        ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_MODE_STAFF))//Xmas
#else
    if ((ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_VAMPIRE))
#endif
    {
        m_bFog = true;
        m_fFogNear = 0.0f;
        m_fFogFar = 6000.0f;
#ifdef _XMASJORK2
        m_dwFogColor = 0xCCF1FF;
#else
        m_dwFogColor = 0xC30404;
#endif
    }
    else
    {
        FogInfo finfo = GetBsp()->GetFogInfo();
        m_bFog = finfo.bFogEnable;
        m_fFogNear = finfo.fNear;
        m_fFogFar = finfo.fFar;
        m_dwFogColor = finfo.dwFogColor;
    }

    m_bCreated = true;

add these in your sfx.mrs


ScreenShots

jorklenis2 - System XMAS (Gift Christmas) - RaGEZONE Forums


jorklenis2 - System XMAS (Gift Christmas) - RaGEZONE Forums


It's everything and I hope you enjoy it.:thumbup1:
Remembering that you can check the NULL value in m_pParticles.
Code:
        		if (m_pParticles[0])
		{
			m_pParticles[0]->Clear();
			m_pParticles[0] = NULL;
		}
		if (m_pParticles[1])
		{
			m_pParticles[1]->Clear();
			m_pParticles[1] = NULL;
		}
		if (m_pParticles[2])
		{
			m_pParticles[2]->Clear();
			m_pParticles[2] = NULL;
		}
 
Back
Top