Jump to content

[C++] Função GoCity


tierrilopes
 Share

Recommended Posts

Pode ser útil para alguém

quest_lua.cpp

	ALUA(pc_go_city)
	{
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
		ch->GoCity();
		return 1;
	}


void RegisterPCFunctionTable()
	{
		luaL_reg pc_functions[] =
		{
		{ "go_city",		pc_go_city		},

char.h

public :
		void GoCity();

char.cpp

void CHARACTER::GoCity()
{
	WarpSet(EMPIRE_START_X(GetEmpire()), EMPIRE_START_Y(GetEmpire()));
}

quest_list

pc.go_city

 

Exemplo uso em quest

quest asd begin
	state start begin
		when 101.kill begin
			pc.go_city()
		end
	end
end

 

Teleporta personagem para a cidade inicial do seu reino.

  • Like 2
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
 Share

×
×
  • Create New...