What's new

Welcome to Onforum.net - Web and gaming resource community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

Metin2 [C ++] Animated weapon overlays

Vanilla

Elite
Elite
Joined
Jan 28, 2019
Messages
502
Reaction score
2,823
Points
93
Credits
254
Hey, I'll show you how to add animated weapon overlays, because as you know, ordinary animated weapons as we change to overlays do not work, we need a new function for that.
UserInterface/InstanceBase.cpp:


We are looking for:


Code:
 if (refine < 7)
            return 0;
            if (pItem->GetSubType() == CItemData::ARMOR_BODY)
        {
            m_armorRefineEffect = EFFECT_REFINED+EFFECT_BODYARMOR_REFINED7+refine-7;
            __AttachEffect(m_armorRefineEffect);
        }
        break;
Under Add:
Code:
 case CItemData::ITEM_TYPE_COSTUME:
        __ClearArmorRefineEffect();
            if (pItem->GetSubType() == CItemData::COSTUME_WEAPON)
        {
                PItem- a DWORD => getIndex ();
            if (a == TX) // mieczem
            {
                m_swordRefineEffectRight = EFFECT_REFINED+MIECZ1;
                {
                if (m_swordRefineEffectRight)
                m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                }
            }
            if (a == TX) // CALF
            {
                m_swordRefineEffectRight = EFFECT_REFINED+SURA1;
                {
                if (m_swordRefineEffectRight)
                    m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                }
                
            }
            if (vnum == ID) // SZTYLET
            {
                m_swordRefineEffectRight = EFFECT_REFINED+SZTYLET_1_1;
                m_swordRefineEffectLeft = EFFECT_REFINED+SZTYLET_1_2;
                {
                if (m_swordRefineEffectRight)
                    m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                if (m_swordRefineEffectLeft)
                    m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
                }
            }
            if (a == TX) // LUK
            {
                m_swordRefineEffectRight = EFFECT_REFINED+LUK1;
                {
                if (m_swordRefineEffectRight)
                    m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                }
                
            }
            if (a == TX) // DWURECZNY
            {
                m_swordRefineEffectRight = EFFECT_REFINED+DWURECZNY1;
                {
                if (m_swordRefineEffectRight)
                    m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                }
                
            }
            if (a == TX) // dzwon
            {
                m_swordRefineEffectRight = EFFECT_REFINED+DZWON1;
                {
                if (m_swordRefineEffectRight)
                    m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                }
                
            }
            if (vnum == ID) // WACHLARZ
            {
                m_swordRefineEffectRight = EFFECT_REFINED+WACHLARZ1;
                {
                if (m_swordRefineEffectRight)
                    m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
                }
                
            } // Of course, we replace our ID with the names of the type MIECZ1 -> MOJANAZWAMIECZA1
UserInterface/InstanceBase.h


We are looking for:


Code:
    EFFECT_BODYARMOR_SPECIAL2,
Under the following:
Code:
    MOJANAZWAMIECZA1 // (or how you called it for each weapon)
    Attention! As you add a dagger, you must add:
    MOJANAZWASZTYLETU1_1
    MOJANAZWASZTYLETU1_2
Client:


Root/playersettingmodule.py


We are looking for:

Code:
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+20, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse")
Under Add:
Code:
        chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+21, "PART_WEAPON", "D:/ymir work/item/weapon/AnimowanaBron.mse")
    // And how do you add another EFFECT_REFINED + 21 you swap to +22 etc. etc. in turn just count from EFFECT_BODYARMOR_SPECIAL2 which is number 20 in instancebase.h
That's it
 

shape1
shape2
shape3
shape4
shape7
shape8
Top