I dunno if this is allowed, but heres one i found for casting a debuff if its not on the mob already.
/if (!${Target.Buff[Mark of Emperors].ID}) /casting "Mark of Emperors"
if the mob has Mark of Emperors, it does nothing, if it doesnt, it casts it.
Maybe that would help you for necro? Not sure how you'd add more to it