if #targCurs = 1 ; active
if #targCurs = 0 ; inactive
Value     Description
0    Cursor is a normal cursor.
1    Cursor is a target cursor. 
#cursKind tells you where you are.
Value     Description
0    Felucca
1    Trammel
2    Ilshenar
3    Malas
4    Tokuno 
if #targCurs = 0 ; NOT a target cursor, so you can cast your spell
{
event macro 15 28
while #targCurse = 0 ; wait for target cursor to become a 1 or active
  wait 0
event macro 23 0 ; target self
wait 10 ; or whatever your cast recovery is
}