  We extend the formalism of a previous paper to include the effects of flybys
and instantaneous perturbations such as supernovae on the long-term secular
evolution of hierarchical multiple systems with an arbitrary number of bodies
and hierarchy, provided that the system is composed of nested binary orbits. To
model secular encounters, we expand the Hamiltonian in terms of the ratio of
the separation of the perturber with respect to the barycentre of the multiple
system, to the separation of the widest orbit. Subsequently, we integrate over
the perturber orbit numerically or analytically. We verify our method for
secular encounters, and illustrate it with an example. Furthermore, we describe
a method to compute instantaneous orbital changes to multiple systems, such as
asymmetric supernovae and impulsive encounters. The secular code, with
implementation of the extensions described in this paper, is publicly available
within AMUSE, and we provide a number of simple example scripts to illustrate
its usage for secular and impulsive encounters, and asymmetric supernovae. The
extensions presented in this paper are a next step toward efficiently modeling
the evolution of complex multiple systems embedded in star clusters.
