Jump to content

Recommended Posts

Hello community,

I needed to create this little function so that players don't lose buffs and support skills when they die in PvM and I decided to share it.

This is the hidden content, please

  • Metin2 Dev 199
  • kekw 2
  • Eyes 1
  • Scream 1
  • Lmao 1
  • Good 36
  • Love 3
  • Love 82
  • 2 weeks later...
  • 4 weeks later...
On 03.09.2023 at 11:15, Ballads said:

Kusursuz çalışıyor, tek detay ekranın sol üst kısmındaki beceri simgelerinin öldükten sonra kaybolması, bu da buff'ın aktif olmadığı hissini veriyor.

i have some problem

  • 2 months later...
  • Active Member

uiaffectshower.py

Search for:

def __AppendAffect(self, affect):


Change:

image.SetSkillAffectFlag(TRUE)


With it:

if skillIndex >= 94 and skillIndex <= 96 or skillIndex == 110 or skillIndex == 111: image.SetSkillAffectFlag(FALSE) else: image.SetSkillAffectFlag(TRUE)

 

Buy a new system? 
My systems:  https://payhip.com/Pisti95

  • Premium

Yeah but this will not work as it will keep the flags in uiaffectshower after one player will kill you, in PVM works fine.

How to reproduce:

 

Buff yourself, enable some skills, die from another player's hand, you will see the affectshower still in the left corner of the window but if you rewarp, they disappear. But the bonus isn't there anymore, its removed.

On the pvm side it works as a charm.

12 hours ago, Pisti95 said:

uiaffectshower.py

Search for:

def __AppendAffect(self, affect):


Change:

image.SetSkillAffectFlag(TRUE)


With it:

if skillIndex >= 94 and skillIndex <= 96 or skillIndex == 110 or skillIndex == 111: image.SetSkillAffectFlag(FALSE) else: image.SetSkillAffectFlag(TRUE)

 

 

  • Active Member
4 hours ago, Dr3Ame3r said:

Yeah but this will not work as it will keep the flags in uiaffectshower after one player will kill you, in PVM works fine.

Yes, you are right.

 

Solution:
 

InstanceBase.h

Search for:

class CInstanceBase
{

 

Add to:

	public:
		int						BuffAffect;

 

InstanceBaseBattle.cpp

Search for:
 

void CInstanceBase::Die()

 

In this function search for it:
 

__ClearAffects();

 

Change for it:

	////////////////////////////////////////
    std::vector<int> BuffAffectList = {
									AFFECT_JEONGWI, AFFECT_GEOMGYEONG, AFFECT_CHEONGEUN,
									AFFECT_GYEONGGONG, AFFECT_EUNHYEONG, AFFECT_GWIGEOM,
									AFFECT_GONGPO, AFFECT_JUMAGAP, AFFECT_HOSIN, AFFECT_BOHO,
									AFFECT_GICHEON, AFFECT_KWAESOK, AFFECT_HEUKSIN, AFFECT_MUYEONG,
									AFFECT_JEUNGRYEOK, AFFECT_PABEOP
#ifdef ENABLE_WOLFMAN_CHARACTER
									, AFFECT_RED_POSSESSION, AFFECT_BLUE_POSSESSION
#endif
									};
    if (std::find(BuffAffectList.begin(), BuffAffectList.end(), BuffAffect) != BuffAffectList.end())
        __ClearAffects();
	////////////////////////////////////////

 

This solution for buffs. The affect left top of corner don't disappear.

Edited by Pisti95

Buy a new system? 
My systems:  https://payhip.com/Pisti95

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.