Here's the standard stuff to get people started with dialogs: https://imagej.nih.gov/ij/macros/DialogDemo.txt
Basic steps are
1) Call the create() function
2) Add items
4) Get the items in the order that they were added to the dialog.
You can also use the utility functions for directories: path = getDirectory("Choose a Directory");
ImageJ Macro language doesn't appear to have the concept of working directory, so always save the path for everything in a variable so you can prepend to the file names.
Have a look at the "File" builtin functions to handle directory & file names: https://imagej.nih.gov/ij/developer/macro/functions.html#F . Also check out builtin functions "Dialog.xxx" and d2s(n, decimalPlaces) for your advanced dialog item & string formatting needs for serialized file names, respectively.
There is no return from the user hitting cancel.
Save early, save often.
And if you ever have to do anything complicated with ImageJ, just plan on learning Java.