question, why does some body pillage?
answer, to get your resources
question, How did he know i had resources?
answer, he spyd you
question, how do i keep his spys out of my towns?
answer, you build spy huts in every town to the level above your wall, and you train the spys.
For those who dont know, the spy hut is the most important defensive/offensive building you can have.
You need one in every town, if you dont have room, tear something down ( a bonus building or extra work shop, etc..)
Build the spy huts up to at least one level above the wall, more if you are going to be pillaging from the town and using the spys as they only serve you from being spyd when they are actually in your spy huts trained and working on defense. click on your spy huts, look on the key on the left, you have "XX" spys working on defense, what ever that number "xx" is, it always needs to be higher then your wall. walls have built in breaches one breach per level for spys, invaders etc.
example town: town hall 10
town hall =10
town wall =10 a level 10 wall has 10 breaches, to cover 10 breaches you need 11 spys
spy hut=11 with 11 trained spy
the Wall must be as high as the Hall for maximum effect, the Hut MUST be higher then the wall to surpass the built in breaches.
if you have ever spyd some one you are about to pillage, then you will agree with me on this next part.
spying example:
your seeking out a target, you see a town you may think is of interest, you get ready to send out a spy and a risk bar pops up that shows the risk of the spy to get in. If the risk is 5%, not only will the spy get in, but he will tell you everything about the town, resource inventory, troops, who you talk to, if your online, resource inventory is the easiest to get! and that in a nut shell is the motivation for the pillage. the spyer knows what you have and he wants it, he can now spy your garrison to see what troops you have in that town, the spyer will know everything about you.
once the spyer has the resource inventory and what troops you have, he need only make the choice to launch, he may have to shift troops around, but chances are, if the the spyee doesn't increase his spy huts and train spys, the spyer just found a new farm.
build huts, train spys, and you'll be safe.