Code:
alias getroom {
  if (!$bvar($1,0)) { return }
  var %pos = $bfind($1,1,?name=) + 6, %pos2, %next
  while (%pos != 6) {
    %next = $iif($bfind($1,%pos,?name=),$v1,$bvar($1,0))
    echo -a Rooms for $bvar($1,$+(%pos,-,$calc($bfind($1,%pos,") - 1))).text $+ :
    %pos2 = $bfind($1,%pos,?rm=) + 4
    while (%pos2 != 4) && (%pos2 < %next) {
      echo -a $bvar($1,$+(%pos2,-,$calc($bfind($1,%pos2,') - 1))).text
      %pos2 = $bfind($1,%pos2,?rm=) + 4
    }
    %pos = $bfind($1,%pos,?name=) + 6
  }
}