This is a combination of Dragnoz's video on skeletons having bows or swords depending on how close you are, and MrGarreto's One-Command Genorator. This will hopefully be added to a full one command vanilla mod enhancing a bunch of mob AI's. I hope you enjoy!
http://www.youtube.com/watch?v=qvqBliAGqqk