As you have surmised, this is one of many situations where a simple "Yes" or "No" is not sufficient. You would have to say something like "Of course I haven't been planning to assassinate the king", or (alternatively - and much more interestingly) "Ha! Zounds! My evil plot to assassinate the king remains undiscovered!"
A classic example of this sort of thing (often quoted before the advent of political correctness) used to be the question "Have you stopped beating your wife?". Answering just "No" indicated that you were still beating your wife; answering "Yes" could mean that you used to beat your wife, but had now stopped. Neither single-word answer could convey the fact that you were appalled at the very idea of wife-beating!