As an alternative, you could do this without a script.
[SIZE=10.5pt]If it's an evented encounter, you can just use the "Full Recovery" command in the first tab of the events command window (under the actors tab). Specify the actor if it is only one.[/SIZE]
[SIZE=10.5pt]If it's a random encounter, you'll have to add the "Full Recovery" command in the troops page of the database, giving it to spawn at 'End of Battle'. Again specify the particular actor if needed.[/SIZE]
[SIZE=10.5pt]If you want a percentage instead of full recovery, just specify what you want. If you want a fixed amount, then use the Change HP, Change MP commands.[/SIZE]