If you intend to do it via common event, there's a rather simple way (well, more or less)
1. add this line just below Scene Battle 1,
attr_reader :active_battler #add this line
def main #etc, etc, etc
2. in the common event, target id is:
Do percentage calculation in Variable X (where X is a number) then:
>Conditional branch: if Variable X == tot (or anything else) thencall script:
battler = $scene.active_battler
tgt_id = battler.current_action.target_index
tgt = $game_troop.smooth_target_enemy(tgt_id)
tgt = $game_party.smooth_target_actor(tgt_id)
Where ID is the state id.
I hope this was clear enough...
This post has been edited by Jens of Zanicuud: Feb 29 2012, 09:13 AM