What's new
What's new

New messages New topics Systems Serverfiles 3D Models Web Scripting

Metin2Resources

👋 Welcome to Metin2 Resources — your hub for professional Metin2 server development.

Create a free account to access advanced systems, serverfiles, tutorials and connect with other developers.

🚀 Join today and start building better.

Level Announcement System

carpiciyim

Member
📜 Messages 109
👍 Reactions 158
🏆 Points 0
1753093345832.png

Search
Code:
        case POINT_LEVEL:
            if ((GetLevel() + amount) > gPlayerMaxLevel)
                return;

            SetLevel(GetLevel() + amount);
            val = GetLevel();

            sys_log(0, "LEVELUP: %s %d NEXT EXP %d", GetName(), GetLevel(), GetNextExp());

            PointChange(POINT_NEXT_EXP,    GetNextExp(), false);

add below
Code:
#ifdef LEVEL_DUYURU_SISTEMI
std::set<int> notifyLevels = {15, 30, 55, 75, 99};
if (notifyLevels.count(val))
{
    char levelduyuru[QUERY_MAX_LEN];
    snprintf(levelduyuru, sizeof(levelduyuru), "<Bilgi>: %s isimli oyuncumuz %u seviye olmuştur, tebrikler!", GetName(), GetLevel());
    BroadcastNotice(levelduyuru);
}
#endif
 

Latest posts

Back
Top Bottom