not tested, but should work
Code:
for i = 1, GetNumRaidMemebers() do
if ( UnitIsUnit("target", "raid"..i) ) then
local unit = "raid"..i;
break;
end
end
local name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(unit)
if zone == (GetZoneText) and name == (UnitName("target")) and (not isDead) and online then
...do your stuff here...
end