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.