Jump to content

Recommended Posts

Hello  Everyone

I'm sorry if it's on the wrong side.

In the Metin2 official game, there is a hydra region, where monsters attack an object. How can I make this system help me in this regard? I really appreciate you. Have a good day.

System: Monsters attack the object.

Link to comment
https://metin2.dev/topic/19847-monsters-attack-each-other/
Share on other sites

  • Premium
Serach in char_state.cpp:
  m_pkParty->SendMessage(this, PM_ATTACKED_BY, 0, 0);

Add after:

if (m_pkMobData->m_table.dwVnum == 1111) // mob that attack vnum
{
	LPCHARACTER the_object = FindVictim(5555, m_pkMobData->m_table.wAggressiveSight); // 5555 = object vnum
	SetVictim(the_object);
	return;				
}

It's not tested, i just writed it.

  • Love 1
Link to comment
https://metin2.dev/topic/19847-monsters-attack-each-other/#findComment-108273
Share on other sites

18 godzin temu, WeedHex napisał:

Show a video, i can misunderstand the problem...

j6EpBJ.png

 

The monsters are attacking the object.

2 godziny temu, Dobrescu Sebastian napisał:

Serach in char_state.cpp:
  m_pkParty->SendMessage(this, PM_ATTACKED_BY, 0, 0);

Add after:

if (m_pkMobData->m_table.dwVnum == 1111) // mob that attack vnum
{
	LPCHARACTER the_object = FindVictim(5555, m_pkMobData->m_table.wAggressiveSight); // 5555 = object vnum
	SetVictim(the_object);
	return;				
}

It's not tested, i just writed it.

char_state.cpp: In member function 'virtual void CHARACTER::StateBattle()':
char_state.cpp:1115: error: invalid conversion from 'int' to 'CHARACTER*'
char_state.cpp:1115: error:   initializing argument 1 of 'CHARACTER* FindVictim(CHARACTER*, int)'
gmake: *** [OBJDIR_GAME/char_state.o] Error 1
root@host:/usr/aSource/Server/game/src #
 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/19847-monsters-attack-each-other/#findComment-108276
Share on other sites

2 godziny temu, Dobrescu Sebastian napisał:

Serach in char_state.cpp:
  m_pkParty->SendMessage(this, PM_ATTACKED_BY, 0, 0);

Add after:

if (m_pkMobData->m_table.dwVnum == 1111) // mob that attack vnum
{
	LPCHARACTER the_object = FindVictim(5555, m_pkMobData->m_table.wAggressiveSight); // 5555 = object vnum
	SetVictim(the_object);
	return;				
}

It's not tested, i just writed it.

 

2aMqJA.png

 

g6Np65.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
https://metin2.dev/topic/19847-monsters-attack-each-other/#findComment-108277
Share on other sites

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.