Metin2 Cannot attack mob if level is too high

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Blaze

Elite
Elite
VIP
Joined
Jan 28, 2019
Messages
507
Credits
635
This little code won't let you attack mob if difference between you level and mob lever is over 15
Code:
Expand Collapse Copy
//Battle.cpp
//in bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) search:

    if (victim->IsDead())
        return false;
 
//Add Under:

    if (!(victim->IsPC()))
    {
        if (ch->GetLevel() - victim->GetLevel() > 15)
        {
            return false;
        }
    }
 
Back
Top