you can shorten the code to
on :DIALOG:nickcon:sclick::{ if ($did==01) { echo -a hello there } if ($did==02) { echo -a there hello } } etc