Jump to content

How to add new Effect like Hapiness Ring


Recommended Posts

  • Premium

Hey Guys,

 

Today i wanna Release how you can add new Effects :)

 

First of all we do the Server Part :)

 

We need this Files:

 

VnumHelper.h

length.h

char_item.cpp

item.cpp

 

First of all we open VnumHelper.h and search for

 

static    const bool    IsLovePendant(DWORD vnum)        { return 71145 == vnum; }

 

Add after

 

static const bool    IsLoveRing(DWORD vnum)            { return 71167 == vnum; }

 

Here you can change your vnum :)

 

As next open length.h and search for

 

SE_EQUIP_LOVE_PENDANT

 

Add after

 

SE_EQUIP_LOVE_RING

 

As next open cahr_item.cpp and search for

 

        else if (true == CItemVnumHelper::IsLovePendant(dwVnum))
        {
            this->EffectPacket(SE_EQUIP_LOVE_PENDANT);
        }[/php]

 

Add after

 

[php]        else if (true == CItemVnumHelper::IsLoveRing(dwVnum))
        {
            this->EffectPacket(SE_EQUIP_LOVE_RING);
        }

 

As next open item.cpp and search for

 

    if (true == CItemVnumHelper::IsRamadanMoonRing(GetVnum()) || true == CItemVnumHelper::IsHalloweenCandy(GetVnum()))
        || true == CItemVnumHelper::IsHappinessRing(GetVnum()) || true == CItemVnumHelper::IsLovePendant(GetVnum())[/php]

 

Replace with that

 

[php]    if (true == CItemVnumHelper::IsRamadanMoonRing(GetVnum()) || true == CItemVnumHelper::IsHalloweenCandy(GetVnum())
        || true == CItemVnumHelper::IsHappinessRing(GetVnum()) || true == CItemVnumHelper::IsLovePendant(GetVnum())
        || true == CItemVnumHelper::IsLoveRing(GetVnum()) || true == CItemVnumHelper::IsLoveRing(GetVnum()))

 

So now we Finished the Server Part just Compile now your game and db :)

 

As next we open our Client Source and open PythonCharacterManagerModule.cpp and search for

 

PyModule_AddIntConstant(poModule, "EFFECT_LOVE_PENDANT_EQUIP",        CInstanceBase::EFFECT_LOVE_PENDANT_EQUIP);

 

Add after

 

PyModule_AddIntConstant(poModule, "EFFECT_LOVE_RING_EQUIP",        CInstanceBase::EFFECT_LOVE_RING_EQUIP);

 

 

As next open PythonNetworkStreamPhaseGameItem.cpp and search for

 

        case SE_EQUIP_LOVE_PENDANT:
            effect = CInstanceBase::EFFECT_LOVE_PENDANT_EQUIP;
            break;[/php]

 

Add after

 

[php]        case SE_EQUIP_LOVE_RING:
            effect = CInstanceBase::EFFECT_LOVE_RING_EQUIP;
            break;

 

As next open Packet.h and search for

 

SE_EQUIP_LOVE_PENDANT

 

Add after

 

SE_EQUIP_LOVE_RING

 

As next open InstanceBase.h and search for

 

EFFECT_LOVE_PENDANT_EQUIP

 

Add after

 

EFFECT_LOVE_RING_EQUIP

 

So knwo we finished Client Source Part Compile now you Exe :)

 

So at Last we have to Change 1 Thing in playersettingmodule.py in your root archive

 

Search for

 

chrmgr.RegisterCacheEffect(chrmgr.EFFECT_LOVE_PENDANT_EQUIP, "", "d:/ymir work/effect/etc/buff/buff_item4.mse")

 

And add after

 

chrmgr.RegisterCacheEffect(chrmgr.EFFECT_LOVE_RING_EQUIP, "", "d:/ymir work/effect/etc/buff/buff_item5.mse")

 

You can change the Names from

 

EFFECT_LOVE_RING_EQUIP

SE_EQUIP_LOVE_RING

IsLoveRing

 

but if you chancge the Names in 1 File dont forgett it to change in all Files :)

 

So plz dont forgett the mse/dds Files for new Effects you have to do yourself. This Tutorial just show you how you cann add new Effects :)

 

I Hope you understand my Release and sry for my bad English.

  • Metin2 Dev 1
  • Love 1
  • Love 8
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.