set %host.type $did(25).sel
or
set %host.type $calc($did(25).sel - 1)
Pick from those based on whether or not you want the line number stored or the actual host type stored (the second one will store the host type instead of the line number). If you use the second one, then use the +1 calculation I showed you above for selecting the correct line.