"Be careful of wild dogs when you are sleepy" because her father gave the secret to the child, so he asked the child to be vigilant and not to let the bad guys find out.
"When bored, wait for the magpies to sing branches" means that someone will always contact us, and we should wait patiently for good people to pick us up.