Hammer have you looked at /didtok at all.

Code:
 
 var %i = 1
  while ($gettok( $hget(CharSheet,Skill), %i, 32)) {
    did -a $dname 10 $ifmatch
    inc %i 
 }


could be replaced with.

Code:

 didtok $dname 10 32 $hget(CharSheet,Skill)