If i need so, i tried to use global variable. 
For example:
Code:
sub save_first_target()
  ;saving ID(laststatus) into first global variable
end sub
Code:
sub save_second_target()
  ;saving ID(laststatus) into second global variable
end sub
and when i need to cast something on character, i set into third global variable value of variable with ID of attacking character. Look:
first=ID attacking 1
second=ID attacking 2
third=ID attacking 1/ ID attacking 2/laststatus
and when you'll cast, you need to make WaitTargetObject on ID of third global variable.
So, u need scripts:
Code:
Saving ID first attacker in global variable 'first'
Code:
Saving ID second attacker in global variable 'second'
Code:
Scp, which will set 'third' global variable, as 'first' or 'second'
Code:
Scps, where you will cast on ID of 'third' global variable