Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

Cube window open check


ReFresh

Question

  • Premium

Hey guys,

is here someone who know how to make a quest function which will check if cube window is open? I will be really glad for some solution.

Thanks for possible solutions!

Sincerely,

ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
  • Moderator
  • Srcs/game/questlua_pc.cpp
namespace quest
{
	[...]
	int pc_is_cube_open(lua_State* L)
	{
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
		lua_pushboolean(L, ch && ch->IsCubeOpen());
		return 1;
	}
	[...]
}
	
luaL_reg pc_functions[] =
{
	[...]
	{ "is_cube_open",	pc_is_cube_open	},
	[...]
}
  • share/locale/country/quest/quest_functions
pc.is_cube_open
  • your_quest.lua
if pc.is_cube_open() then
	say("CUBE_WINDOW_IS_OPEN")
	return
end

 

Edited by VegaS™
  • Love 1
  • Good 1
  • Scream 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.