System XMAS (Gift Christmas)

Results 1 to 9 of 9
  1. #1
    Infraction Banned jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    878Posts

    happy System XMAS (Gift Christmas)

    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
    https://www.sendspace.com/file/is2amu

    ScreenShots





    It's everything and I hope you enjoy it.


  2. #2
    FGunZ Developer StephanW is offline
    MemberRank
    Dec 2008 Join Date
    The NetherlandsLocation
    743Posts

    Re: System XMAS (Gift Christmas)

    Never would of thought about this, I love the idea!

  3. #3
    Infraction Banned jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    878Posts

    Re: System XMAS (Gift Christmas)

    Quote Originally Posted by StephanW View Post
    Never would of thought about this, I love the idea!
    Thank bro!

  4. #4
    Be Freestyle. mcsic is offline
    MemberRank
    May 2008 Join Date
    GermanyLocation
    330Posts

    Re: System XMAS (Gift Christmas)

    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 by mcsic; 11-12-17 at 03:32 AM.

  5. #5
    Infraction Banned jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    878Posts

    Re: System XMAS (Gift Christmas)

    Quote Originally Posted by mcsic View Post
    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.

  6. #6
    Valued Member MonkINC is offline
    MemberRank
    Aug 2014 Join Date
    Hong KongLocation
    140Posts

    Re: System XMAS (Gift Christmas)

    That Itachi Model caught my eyes, you have other anime avatars? possible to share?

  7. #7
    Infraction Banned jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    878Posts

    Re: System XMAS (Gift Christmas)

    Quote Originally Posted by MonkINC View Post
    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.

  8. #8

    Re: System XMAS (Gift Christmas)

    please reupload file SFX

  9. #9
    Orby? Orby ? @-@ Orby is offline
    MemberRank
    Oct 2015 Join Date
    AstraLocation
    278Posts

    Re: System XMAS (Gift Christmas)

    Quote Originally Posted by jorklenis2 View Post
    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
    https://www.sendspace.com/file/is2amu

    ScreenShots





    It's everything and I hope you enjoy it.
    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;
    		}



Advertisement