To generate topology scripts for use with ns-2, I recommend the rwall command line program by Santashil PalChaudhuri. It generates big topologies really fast, and supports random walk and random waypoint with and without reflection or wrapping. It can be found here: http://monarch.cs.rice.edu/~santa/research/mobility/.
My experience is with the code in the palm_rw directory, where the file rwall.c can be compiled by simply running make.
A fast way to generate for example 10 different topologies with 30 nodes in a 1500 x 300 m^2 using random walk with reflection for a simulation lasting 700 seconds where the nodes have a set velocity of 5 m/s and changes direction every 10 s plus-minus 5 s in a linux bash shell (command line), do this:
i=0; while [ $i -lt 10 ]; do sleep 1; ./rwall 3 30 1500 300 700 5 0 0 0 10 5 > $i.top; let i=i+1; done
The sleep command has to be run to ensure that the rwall code generates 10 randomly different topologies. Without it, the program uses the same random seed for all 10 topologies, and you end up with 10 identical .top files.
To generate 10 static random topologies, I set the simulation time to 1, and the node velocity to 1 (they cannot be set to zero), and leave the rest of the parameters as above.
On a side note, I would like to warn people that not all topology generator tools do what is expected, so I would urge you to throroughly investigate the behavior of the generated topologies, especially when the topologies include mobility.