From D&D Wiki
|This material is published under the OGL|
A confused character’s actions are determined by rolling d% at the beginning of his turn:
|01–10||Attack caster with melee or ranged weapons (or close with caster if attacking is not possible)|
|21–50||Do nothing but babble incoherently|
|51–70||Flee away from caster at top possible speed|
|71–100||Attack nearest creature (for this purpose, a familiar counts as part of the subject’s self ).|
A confused character who can’t carry out the indicated action does nothing but babble incoherently. Attackers are not at any special advantage when attacking a confused character. Any confused character who is attacked automatically attacks its attackers on its next turn, as long as it is still confused when its turn comes. A confused character does not make attacks of opportunity against any creature that it is not already devoted to attacking (either because of its most recent action or because it has just been attacked).