Kalyāṇamitta: The good friend
A good friend is the one whose help is telling you the truth. Daniel stands in front of a king who has just been shown his own felling, and he answers with something the king can still do rather than with comfort. Asking that the counsel "be acceptable" leaves Nebuchadnezzar free to refuse, which is how a friend speaks and how a flatterer never does.
Sīla: Virtuous conduct
Sīla is restraint in deed and word. Breaking off sins by righteousness works the way you snap a dead branch off a tree: the wrong stops because the opposite act moves into its place, the hand that seized now returning, the mouth that threatened going quiet. In a king this gets measured in edicts and judgments, since his conduct lands on thousands of people at once.
Dāna: Giving
Dāna is the open hand. Mercy to the poor is prescribed as the specific medicine for royal iniquity because that iniquity was paid for out of their hunger: the tribute, the conscripted labor, the bricks of Babylon. Grain moving back out of the palace store toward the fields it came from undoes the wrong at the place where it landed.
Kamma: Action and its fruit
Deeds ripen into the conditions you later live inside. The dream has already marked the tree for cutting, and counsel is offered anyway, so what happens next still hangs on how the king spends the coming months. "Lengthening of your tranquility" is fruit measured in time, growing from seed that is still in his hand.
Appamāda: Heedfulness
Heedfulness is doing the needed thing while it can still be done. "Perhaps" promises nothing, so the opening stands for an unknown length and can shut without warning. Twelve months later he is walking on the palace roof admiring what he built, and the word he never acted on comes down on him while he is still speaking.