Nahlidge

Nahlidge

Joined
Oct 02, 2010

Activity Stream

Nahlidge   -  Jan 20, 2012

@Pam Lynn Reply to your question:

I use this weather script, done by eqrunner: http://www.hawkee.com/snippet/7010/

The version I use is slightly older than the current one, but it still works fine.

 Respond  
Nahlidge commented on a Page, Weather script for mIRC  -  Oct 07, 2010

It's not much, but... (the rest of the script is the same)

Yours:

  if (%wu_command == !forecast) || (%wu_command == !forecast5) {
    if (%wu_f1_title != $null) { 
      var %wu_forecast1 $(%wu_f1_title $+ : %wu_f1_fcttext)
      var %wu_forecast2 $(%wu_f2_title $+ : %wu_f2_fcttext)
      if (%wu_f2_title != %wu_P2_weekday ) var %wu_forecast3 $(%wu_P2_weekday $+ : %wu_P2_conditions $+ . High: $+(%wu_P2_highf,$chr(176),F) $chr(47) $+(%wu_P2_highc,$chr(176),C) Low: $+(%wu_P2_lowf,$chr(176),F) $chr(47) $+(%wu_P2_lowc,$chr(176),C)) 
      if (%wu_f2_title == %wu_P2_weekday ) var %wu_forecast3 $(%wu_P3_weekday $+ : %wu_P3_conditions $+ . High: $+(%wu_P3_highf,$chr(176),F) $chr(47) $+(%wu_P3_highc,$chr(176),C) Low: $+(%wu_P3_lowf,$chr(176),F) $chr(47) $+(%wu_P3_lowc,$chr(176),C))
      .timer 1 0 msg %wu_chan %wu_address $+ : %wu_forecast1
      .timer 1 1 msg %wu_chan %wu_forecast2 %wu_space %wu_forecast3 %wu_spaceend 
    }
    if (%wu_f1_title == $null) {
      var %wu_forecast1 $(%wu_P1_weekday $+ : %wu_P1_conditions $+ . High: $+(%wu_P1_highf,$chr(176),F,$chr(40),%wu_P1_highc,$chr(176),C,$chr(41)) Low: $+(%wu_P1_lowf,$chr(176),F,$chr(40),%wu_P1_lowc,$chr(176),C,$chr(41)))
      var %wu_forecast2 $(%wu_P2_weekday $+ : %wu_P2_conditions $+ . High: $+(%wu_P2_highf,$chr(176),F,$chr(40),%wu_P2_highc,$chr(176),C,$chr(41)) Low: $+(%wu_P2_lowf,$chr(176),F,$chr(40),%wu_P2_lowc,$chr(176),C,$chr(41)))
      var %wu_forecast3 $(%wu_P3_weekday $+ : %wu_P3_conditions $+ . High: $+(%wu_P3_highf,$chr(176),F,$chr(40),%wu_P3_highc,$chr(176),C,$chr(41)) Low: $+(%wu_P3_lowf,$chr(176),F,$chr(40),%wu_P3_lowc,$chr(176),C,$chr(41)))
      .timer 1 0 msg %wu_chan %wu_address $+ : %wu_forecast1  
      .timer 1 1 msg %wu_chan %wu_forecast2 %wu_space %wu_forecast3
    }
  }

Mine

 if (%wu_command == !forecast) || (%wu_command == !forecast5) {
    if (%wu_f1_title != $null) { 
      var %wu_forecast1 $(%wu_f1_title $+ : %wu_f1_fcttext)
      var %wu_forecast2 $(%wu_f2_title $+ : %wu_f2_fcttext)
      if (%wu_f2_title != %wu_P2_weekday ) var %wu_forecast3 $(%wu_P2_weekday $+ : %wu_P2_conditions $+ . High: $+(%wu_P2_highf,$chr(176),F) $chr(47) $+(%wu_P2_highc,$chr(176),C) Low: $+(%wu_P2_lowf,$chr(176),F) $chr(47) $+(%wu_P2_lowc,$chr(176),C)) 
      if (%wu_f2_title == %wu_P2_weekday ) var %wu_forecast3 $(%wu_P3_weekday $+ : %wu_P3_conditions $+ . High: $+(%wu_P3_highf,$chr(176),F) $chr(47) $+(%wu_P3_highc,$chr(176),C) Low: $+(%wu_P3_lowf,$chr(176),F) $chr(47) $+(%wu_P3_lowc,$chr(176),C))
      .timer 1 0 msg %wu_chan %wu_address $+ : %wu_forecast1
      .timer 1 1 msg %wu_chan %wu_forecast2 %wu_space %wu_forecast3 %wu_spaceend 
    }
    if (%wu_f1_title == $null) {
      .timer 1 0 .notice %wu_nick 05Error: Try again in a few seconds, also make sure you typed a correct zipcode, city, state or country.
    }
  }

Basically, i just removed/replace the code after the following line:

if (%wu_f1_title == $null) {

Edit: thought I fixed the !forecast5 one too, guess not.

 Respond  
Nahlidge commented on a Page, Weather script for mIRC  -  Oct 02, 2010

[18:58:36] !time 12345
[18:58:37] Schenectady, NY: October 2, 7:59 PM EDT.
[18:58:42] !time 123
[18:58:43] ,: October 3, 12:59 AM .tzname.

Anyway to add a line into the code to make it display an error msg?
Instead of it showing a messed up line?

like,
if %wu* == $null msg # error msg
if %we
* != $null msg # date/time

I've done this with the !forecast/5 ones, but can't figure out the !time one :\

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.