I suggest you use [ code] tags around formatted text.
Will this work for you?
Code:
Trigger Type: Command, Numeric Arg: 7, Arg list: lis
Commands:
set command 'listen
set target 'keeper'man'groundskeeper
if %command.contains('%cmd%)% && %target.contains('%arg%)%
%send% %actor% The groundskeeper sighs and says 'I'm sorry my friend, today is not the day to mourn the ones we've lost. You've probably noticed the caved in graves about the cemetery... I'm not quite sure how these came about, but it has caused great trauma among the people of Tarsis. They demand answers and I've been tirelessly trying to find them.
wait 2 s
%send% %actor% The groundskeeper lets out another deep sigh.
wait 1 s
%send% %actor% 'And to think... just a few days ago my biggest problem was getting the stench of goblin out of here.'
%echoaround% %actor% The groundskeeper begins to converse with %actor.name%.
else
%send% %actor% Who you tryin' to listen to stupid? The air???
end
As you see, the wait command needs no "variable context" signs (the reason 'send' needs %'s is that there's actually 3 different commands in the background, depending on the current context. The %send% command is then translated internally to either wsend, msend or osend).
The magic in the beginning tries to look up the argument in the potential allowed strings by first appending them with a single quote.
You might want to avoid calling your player stupid, btw. If there's something they are doing wrong, it's typically because you havent been specific enough in your descriptions.