Jump to content

Monsters attack each other?


Recommended Posts

  • 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

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
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
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.