Charged Massive Time Source 

🚫
Exiled
Joined
Jan 6, 2025
Messages
27
Reaction score
3
Hi friends, I'm here to share this little extra feature that could be very useful in games. I think I saw it on a private server, but I can't remember which one. This logic has helped me a lot in gladiator games, so it might be useful to others, or maybe not.

This is called charged massive time.


Code:
ZMyCharacter.h

    float   m_fMassiveDurationTime = 0.0f;
    bool    m_bIsMassiveActive = false;

Code:
ZMyCharacter.cpp

    if (m_bIsMassiveActive) {
        m_fMassiveDurationTime += fDelta;

        if (m_fMassiveDurationTime >= CHARGED_TIME) {
            m_bIsMassiveActive = false; 
            m_fMassiveDurationTime = 0.0f;
        }
    }

Code:
paste these on void ZMyCharacter::Charged()

    m_bIsMassiveActive = true;
    m_fMassiveDurationTime = 0.0f;
Code:
ZCombatInterface.cpp

    if (pMyCharacter->m_bIsMassiveActive)
    {
        char szMassiveInfo[128];
        sprintf(szMassiveInfo, "Massive Time: %.2f / %.2f", pMyCharacter->m_fMassiveDurationTime, 15.f);


        if (pMyCharacter->m_fMassiveDurationTime < 15.f / 3.0f) {
            pDC->SetColor(MCOLOR(0xFFFF0000));
        }
        else if (pMyCharacter->m_fMassiveDurationTime < 2.0f * 15.f / 3.0f) {
            pDC->SetColor(MCOLOR(0xFFFFFF00));
        }
        else {
            pDC->SetColor(MCOLOR(0xFF00FF00)); 
        }

        DWORD currentTime = timeGetTime();
        if ((currentTime / 500) % 2 == 0) {
            TextRelative(pDC, 10.f / 800.f, 195.f / 600.f, szMassiveInfo);
        }
    }

You may have some flaws, but I'll leave that for those who want to fix them. The code is open and public, and they're free to do whatever they want with it.

1744693782662 - Charged Massive Time - RaGEZONE Forums
 
I have a similiar system in my source, it allows you to charge the massive up to 3 times. The enchantments recieve bonuses in dmg from charges + stun duration, etc.

A 3 charge massive requires 1 force charge and 2 blocks. Perfect for noobie turles :P
 
I have a similiar system in my source, it allows you to charge the massive up to 3 times. The enchantments recieve bonuses in dmg from charges + stun duration, etc.

A 3 charge massive requires 1 force charge and 2 blocks. Perfect for noobie turles :P
Good for you, I hope to see it someday to see what it's about.
 
Good for you, I hope to see it someday to see what it's about.
Someday maybe, i'm a bit of a perfectionist. I've been thinking of rewriting it all to support native builds for linux on client and server. But the task is monumental. It would me starting most likely with refined and backporting my existing changeset.
 
Someday maybe, i'm a bit of a perfectionist. I've been thinking of rewriting it all to support native builds for linux on client and server. But the task is monumental. It would me starting most likely with refined and backporting my existing changeset.
Good luck with your project.
 
Back