can someone tell me if there is a better easier way to script this? it is part of a weather script that i am makeing. everything works ok for the most part, but was just wondering if there was a quicker way of doing this:

Code:
 on *:sockclose:getwet:{
  if ( $line(@Weather_Parser,27) == Wind ) {
    set %city $remove($line(@Weather_Parser,8),$chr(9) $+ Forecast and )
    set %loc $replace($line(@Weather_Parser,11),Observed,$chr(32) $+ Observed) $line(@Weather_Parser,12)
    set %vis $line(@Weather_Parser,39) $+ : $line(@Weather_Parser,40) $+ $line(@Weather_Parser,41) $+ $line(@Weather_Parser,42)
    set %cond $line(@Weather_Parser,37) $+ :  $line(@Weather_Parser,38)
    set %wind $line(@Weather_Parser,27) $+ : $line(@Weather_Parser,28) $line(@Weather_Parser,29) $+ $line(@Weather_Parser,30) $+ $line(@Weather_Parser,31)
    set %temp $line(@Weather_Parser,13) $+ : $replace($line(@Weather_Parser,14),°,$chr(176)) $+ / $+ $replace($line(@Weather_Parser,16),°,$chr(176))
  } 
  elseif ( $line(@weather_parser,23) == Wind ) {
    set %city $remove($line(@Weather_Parser,8),$chr(9) $+ Forecast and )
    set %loc $replace($line(@Weather_Parser,11),Observed,$chr(32) $+ Observed) $line(@Weather_Parser,12)
    set %vis $line(@Weather_Parser,35) $+ : $line(@Weather_Parser,36) $+ $line(@Weather_Parser,37) $+ $line(@Weather_Parser,38)
    set %cond $line(@Weather_Parser,33) $+ : $line(@Weather_Parser,34)
    set %wind $line(@Weather_Parser,23) $+ : $line(@Weather_Parser,24) $line(@Weather_Parser,25) $+ $line(@Weather_Parser,26) $+ $line(@Weather_Parser,27)
    set %temp $line(@Weather_Parser,13) - $replace($line(@Weather_Parser,14),°,$chr(176)) $+ / $+ $replace($line(@Weather_Parser,16),°,$chr(176))

  } 
  window -c @Weather_Parser
  echo -a ============ %city ================================
  echo -a == %temp == %wind 
  echo -a == %cond == %vis 
  echo -a == %loc 
  echo -a ==========================================================
  unset %city %loc %vis %cond %wind %temp %query %getwet-temp
}
 


i know this code is really ugly


PS: Sorry bou the wide code, i dont know how to break it down to look nicer in the forums.