You may be better off rerunning the analysis using the TENT basis, as Rick suggested.
However, if averages are all you want, the ancient afni plugin "SingleTrial Avg" can do it without resorting to a lot of scripting. I have not used it in ages, but someone asked me about it last week, coincidentally. You need to create a .1D text file with a column of numbers, 0 for "off" timepoints and 1 for "on" timepoints (which define the windows to be averaged), and as many rows as timepoints (TRs) in the data set. The output is a 3D+time data set where time is the length of the longest "on" window defined (unless you set the max limit).
Note that this calculates the same thing that paranoidandroid suggested above. If your stimulus onsets occur at fractions of TR (e.g. at time 1.0, 6.5, etc. with TR=2s), neither of these approaches will attempt to interpolate the time series to account for that, i.e. what is averaged is the data from the timepoint (TR) as given in the 1D input file.