Jump to content

C++ npc.get_level() is possible?


Go to solution Solved by Ken,

Recommended Posts

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