Eggdrop is rather complicated to set up and you'll need to compile from source, I'm not about to write a guide for that, but you can find the files here (if on Windows):
ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/eggdrop1.6.21.tar.gz (eggdrop source, extract this somewhere)
http://windrop.sourceforge.net/patches/eggdrop1.6.21.patch (Windows patch for Eggdrop, put it in the eggdrop1.6.21 directory)
http://thelastexit.net/megahal/megahal.mod.3.5.zip (place these files in eggdrop1.6.21\src\mod\megahal.mod)
Once you have all that you can find compiling instructions here:
http://windrop.sourceforge.net/compile16.html
Check the Configuration section here for how to set up Eggdrop:
http://www.egghelp.org/setup.htm
Once you have Eggdrop set up follow these steps to set up MegaHAL:
There might be an easier way that doesn't involve Eggdrop, but I haven't found one.