Create a Widget for blogger

If any one here can create a widget which is like the advance recent post widget that blogger provides. But add few improvements Like When there are several images in a post, widget should randomly pick one image from that post and show it. and the widget should be able to switch between recent posts and random posts. or choose posts from specific category.
Such widget will be very useful to my blog <snip/>

If you have come across a widget like that please be kind enough to post the link here.