Jump to content

C++ npc.get_level() is possible?


Go to solution Solved by Ken,

Recommended Posts

Hi, someone know or can create the function npc.get_level()???

 

for example

 

when 101.kill begin --- dog lv 1

   if pc.get_level() +10 <= npc.get_level() and pc.get_level() -10 >= npc.get_level() then

      syschat(" fuck yeah ")

  end

end

 

Thanks.

Link to comment
https://metin2.dev/topic/5521-c-npcget_level-is-possible/
Share on other sites

  • Solution
CQuestManager& q = CQuestManager::instance();
LPCHARACTER npc = q.GetCurrentNPCCharacterPtr();
		
lua_pushnumber(L, npc->GetLevel());
return 1;
int npc_get_level(lua_State * L)
{
	LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr();
	lua_pushnumber(L,npc ? npc->GetLevel() : 0);
	return 1;
}

Conditions :)

 

Kind Regards

Ken ~ TA

  • Love 3

Do not be sorry, be better.

Link to comment
https://metin2.dev/topic/5521-c-npcget_level-is-possible/#findComment-34898
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.