I am trying to add cooldowns to user Spikenet's !addcom commands found here.

Code:
ON *:TEXT:*:#: {
  tokenize 32 $strip($1-,burci)
  if ($read(# $+ commands.txt, nts, $1)) {
    var %com = $v1
    var %com = $replace(%com,@user@,$iif($2,$2,?),@nick@,$nick,@target@,$target)
    if (-ul=mod == $gettok(%com,1,32)) && ($nick !isop $chan) { msg $chan  | return }
    msg $chan $iif(-ul=mod == $gettok(%com,1,32),$gettok(%com,2-,32),$gettok(%com,1-,32))
  }
}


I tried adding something like this:
Code:
      if ((%(%com)) || ($($+(%,flood(%com).,$nick),2))) { return }
      set -u3 %flood(%com) On
      set -u3 %flood(%com). $+ $nick On


and

Code:
      set %lastcom $1
      if (((%lastcom, $+ flood)) || ($($+((%,lastcom $+ flood),.,$nick),2))) { return }
      set -u3 (%lastcom, $+ flood) On
      set -u3 (%lastcom, $+ flood). $+ $nick On  

But the cooldown variables it creates look like this:
%flood(%com) On
%flood(%com).jimieo On
Or the command doesn't function.

Instead of using the actual command

ex: if I use !test I want the cooldown to be %floodtest

Could someone point me in the right direction to do this? I would greatly appreciate it.