The Truth in the Lie

I had the weirdest dream last night. But it brought up an interesting question, which I'll get to in a moment.
Basically, in the midst of a whirl of confusion that always comes with dreams, I needed to get some information out of some odd-looking aliens. The problem was, these particular aliens spoke in lies; nothing they said was true - nothing, that is, unless you knew the code. Apparently, if you ignored certain words in just the right pattern, other words would stand out and form a sentence that told the truth. Thankfully, someone knew the right pattern, and was able to teach me, after which I woke up.
So now I am wondering, can someone tell the truth and a lie at the same time? And were these aliens actually bad , or was their intent to tell the truth, but they had to get it out in code?
And if you're wondering why I'm dreaming about aliens, let's just say I watched an old StarTrek movie before bed....