ZO_PreHook(GUILD_ROSTER_MANAGER, "OnGuildIdChanged", function(self) local newGuildId = GetGuildId() -- do something end)