Jump to content
Phishing - Beware of identity theft... ×
  • 0

Monsters attack each other?


notbugme

Question

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
Share on other sites

15 answers to this question

Recommended Posts

  • 0
  • 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
Share on other sites

  • 0
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
[email protected]:/usr/aSource/Server/game/src #
 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 0
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
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.