Jump to content

new flag so that the mobs do not move from their location


Recommended Posts

  • Premium
Posted (edited)
NEW FLAG NOMOVE_AFTER_SPAWM

service.h

#define ENABLE_NOMOVE_AFTER_SPAWM

length.h

search : 

AIFLAG_REVIVE		= (1 << 11),

add:

#ifdef ENABLE_NOMOVE_AFTER_SPAWM
	AIFLAG_NOMOVE_AFTER_SPAWM	= (1 << 12),
#endif

protoreader.cpp

search int get_Mob_AIFlag_Value(string inputString)

add in string arAIFlag[]

#ifdef ENABLE_NOMOVE_AFTER_SPAWM
	"NOMOVE_AFTER_SPAWM",
#endif

char.cpp

search bool CHARACTER::SetSyncOwner(LPCHARACTER ch, bool bRemoveFromList)
add:

#ifdef ENABLE_NOMOVE_AFTER_SPAWM
	if (IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_NOMOVE_AFTER_SPAWM))
		return false;
#endif

char_skill.cpp


search if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_CRUSH | SKILL_FLAG_CRUSH_LONG)

add:

#ifdef ENABLE_NOMOVE_AFTER_SPAWM
				&& !IS_SET(pkChrVictim->GetAIFlag(), AIFLAG_NOMOVE_AFTER_SPAWM)
#endif

char_state.cpp

search void CHARACTER::__StateIdle_Monster() in if (!no_wander && !IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_NOMOVE)

add:

#ifdef ENABLE_NOMOVE_AFTER_SPAWM
	&& !IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_NOMOVE_AFTER_SPAWM)
#endif


src client

locale_inc.h

#define ENABLE_NOMOVE_AFTER_SPAWM

search in pythonnonplayer.h 

AIFLAG_REVIVE		= (1 << 11),

add:

#if defined ENABLE_NOMOVE_AFTER_SPAWM
			AIFLAG_NOMOVE_AFTER_SPAWM = (1 << 12),
#endif

 

991    ?????    S_KNIGHT    MONSTER    MELEE    59    SMALL    AGGR,NOMOVE
example

a small flag so that the mobs always have their location, so that when searching for a player they are always in the same position

 

https://youtu.be/uDYe4AYhAZM?si=9Cs4WxFjz5Up5_PD

Edited by Jfirewall
  • Metin2 Dev 4
  • Good 2
Link to comment
Share on other sites

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.