you simply sprinkle the debug message to see if the code branches there. You can have it as the 1st line of the event, to see if the event even triggers, then again following the IF() statement to see if the code continues past there or not. for example, just inserting it into your existing code:

Code
on *:text:!ultra:#tehrani: {
echo -s $remove($script,$mircdir) $scriptline DEBUG event $event nick $nick (1-) $1-
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
echo -s $remove($script,$mircdir) $scriptline DEBUG event $event nick $nick (1-) $1-
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan http://bit.ly/3aI4xkn KKomrade $+
}