を頼りに => to rely on / with the aid of something N2
~ひょうしに(~拍子に)   => the moment [A], unintentionally / inadvertently caused something to happen N1
を[頼「たよ」]りに => With the help of A; thanks to A N2
Based, Focused, Depending on
ように言う/頼む/注意する/伝える => to convey; to report; to transmit; to communicate; to tell; to impart; to propagate; to teach. N3