Code:
alias makebinarystring { return $regsubex($1,/(.)/g,$asc(\t) $+ $chr(32)) }

dialog map {
  title "Network map"
  size -1 -1 300 300
  list 1, 0 0 300 300, size vsbar
}

raw 015:*:{ 
  bset &data 1 $makebinarystring($mid($rawmsg,$calc($pos($rawmsg,:,2) + 1))) 13 10
  bwrite $qt($scriptdir $+ map.dat) -1 -1 &data
  haltdef
}
raw 017:*:{
  if (!$dialog(map)) { dialog -m map map }
  did -r map 1
  loadbuf -o map 1 $qt($scriptdir $+ map.dat)
  .remove $qt($scriptdir $+ map.dat)
  haltdef
}
raw 018:*:{ haltdef }


This works fine, I've tested it. If you still can't get it working then raw numerics probably differ for your network.