As far as I can remember, there is a module available for supporting DTNs in NS-2. However, I have never used that.
Personally, I would recommend using the ONE simulator when you are concerned with opportunistic communication as in this case. The ONE simulator has a modular structure, which makes development real easy. Moreover, real-life traces can be easily used with it. Also, the user community is very helpful.
I personally choose Omnetpp framework where I can keep a very strict control on what my code is doing. It is rather low level, but in my opinion it worth the effort.