NFL NHL NBA and MLB scores

By kllmoon on Apr 11, 2010

Screenshots

This is the script as re-written by nappa (thank you btw) Works fine for all major sports. Triggers are :

.nhl
.nfl
.nba
.mlb

Just copy and paste in the remote of your bot and enjoy :)

on $*:text:/^.(n(hl|ba|fl)?|mlb)$/iS:#:{
  if (!$hget(scores,count)) {
    if ($sock(scores)) sockclose scores
    sockopen scores feeds.feedburner.com 80 
    sockmark scores $regml(1) msg # 4,15
  } 
} 
on *:sockopen:scores: { 
  sockwrite -n $sockname GET $+(/mpiii/,$gettok($sock(scores).mark,1,32),.php) HTTP/1.1 
  sockwrite -n $sockname Host: $+(feeds.feedburner.com,$str($crlf,2)) 
} 
on *:sockread:scores: { 
  var %scores | sockread %scores
  if ($regex(%scores,/<title>(.+)<\/title>/)) { 
    hinc -mu5 scores count 1 
    $iif($hget(scores,count) >= 3,$gettok($sock(scores).mark,2-,32) $regml(1)) 
  }
}

Comments

Sign in to comment.
dma   -  May 27, 2016

does not work anymore

 Respond  
ovelayer   -  Sep 16, 2013

sence it is football season now..maybe jethro could have the heart to fix pretty please oh please

 Respond  
ovelayer   -  Jun 09, 2013

isn't giving scores anymore just returns same..
jethro? someone could fix would be awsome!
thanks
and is there anyway of adding checking a certian team's score to all of the checks?.. !mlb scores red sox
edit:
just thought of this...would be cool if you could check a teams schedule as well.. !mlb schedule red sox

PackardBell  -  Jun 09, 2013

yeah. i tested it and it doesn't work proper...
Too bad i can't fix it my own :>

It only goes till the 17th of may...

Sign in to comment

ovelayer   -  Mar 04, 2013

great script..

 Respond  
uneek   -  Sep 24, 2012

Jethro, any way to make that snippet work for NFL teams as well?

 Respond  
snackled   -  Oct 23, 2011

Thank you so much Jethro! Excellent work as always :)

 Respond  
Jethro   -  Oct 23, 2011

Here you go, snackled. Place the script below in a new remote by itself as a separate script:

on *:text:$($iif(.ncaa * iswm $strip($1),$1)):*:{
  if (!$(,$+(%,f,$site,#))) { inc -u3 $+(%,f,$site,#)
    set -l %ncaa $+(ncaa,$r(1,$ticks))
    sockopen %ncaa feeds.feedburner.com 80
    sockmark %ncaa $strip($2) msg $iif(#,#,$nick)
  }
}
on *:sockclose:ncaa*:{
  $gettok($sock($sockname).mark,2-3,32) No such team as $&
    $qt($gettok($sock($sockname).mark,1,32))
}
on *:sockread:ncaa*: {
  if (!$sockerr) { var %ncaa | sockread %ncaa
    if ($gettok($sock($sockname).mark,1,32) isin %ncaa) {
      $gettok($sock($sockname).mark,2-3,32) $&
    $gettok($gettok(%ncaa,-1,62),1,60) | sockclose $sockname } }
}
on *:sockopen:ncaa*:{
  if (!$sockerr) {
    sockwrite -n $sockname GET /collegesportsinfo-scores HTTP/1.1
    sockwrite -n $sockname Host: $+($sock($sockname).addr,$str($crlf,2))
    sockwrite -n $sockname Connection: close
  }
}

I'll suggest that you change the trigger name to something else so that it doesn't interfere with the other socket script.

 Respond  
Stewie1k94   -  Oct 22, 2011

Nice script. Good work!

 Respond  
snackled   -  Oct 22, 2011

@Jethro
Not really any specific team but say I wanted to check the score of x team, could do like .ncaa Georgia and it lists only the scores that contain Georgia.

 Respond  
weishaupt   -  Oct 22, 2011

what would be REALLY cool is if somebody could type in something like:

me: .Jose Bautista

and then the bot spits back:

Jose Bautista: batting average / slugging percentage / on base percentage / home runs

not sure how this could be accomplished through feedburner, but i do know that stats like this are available from sites like ESPN and Yahoo Sports.

 Respond  
Jethro   -  Oct 22, 2011

Which teams are you interested in finding their scores only? Please explain more in detail.

 Respond  
snackled   -  Oct 22, 2011

@Jethro
Thanks for updating this to include NCAA scores :) Really awesome script...very useful. Just a thought, would there be anyway to search a specific string to find a score? Or possibly for NCAA only include games with ranked teams? Thanks again for this!

 Respond  
weishaupt   -  Oct 22, 2011

i tested this yet again with both the laptop and the desktop and it is working fine.

 Respond  
Alrac   -  Oct 21, 2011

i use mirc 6.21 and i have tried Napa182's and yours....neither 1 works :-(

 Respond  
Alrac   -  Oct 21, 2011

oh, sorry about that.....Napa182's

 Respond  
Jethro   -  Oct 21, 2011

I meant, which script did you choose to use here? Napa182's or mine? Just give you an idea:

on *:input:#:{
if ($regex($1,/^.(n(hl|ba|fl)?|mlb)$/iS)) {
if ($sock(scores)) sockclose scores
sockopen scores feeds.feedburner.com 80
sockmark scores $regml(1) msg # 4,15
}
}

 Respond  
Alrac   -  Oct 21, 2011

nhl and nfl would be great

 Respond  
Jethro   -  Oct 20, 2011

Alrac, which one are you using here? We have many examples about.

 Respond  
Alrac   -  Oct 20, 2011

can sum1 add an on input to this?

 Respond  
irchainscriptz   -  Oct 20, 2011

I've tried it and it works great!!

Image

 Respond  
snackled   -  Oct 20, 2011

@kendall008

Seems to be working here. What type of issue were you having?

 Respond  
kendall008   -  Oct 10, 2011

does this code still i work i tried it but cant get it to

 Respond  
Jethro   -  Oct 10, 2010

weishaupt, I'm not sure if napa did it inadvertently or not. The alternative examples he provided had the link for www.mpiii.com , which was an entirely different url from getting the scores at feeds.feedburner.com. To fix that, you need to change them back to the feedburner one.

I also added the college football scores to the script, requested by TwiztedChat]. TwistedChat], to get the college foodball scrore, enter: .ncaa or !ncaa

Here is it:

on $*:text:/^([!.])(n(hl|ba|fl|caa)?|mlb)$/iS:#:{
  if ($regml(2) == ncaa) { ncaa }
  if (!$hget(scores,count)) { 
    if ($sock(scores)) sockclose scores
    sockopen scores feeds.feedburner.com 80
    sockmark scores $regml(2) $iif($regml(1) = !,.notice $nick,msg #) 4,15
    $gettok($sock(scores).mark,2-,32) 4,15Gathering $regml(2) info please wait.....
  }
}
on *:sockopen:scores: {
  sockwrite -n $sockname GET $+(/mpiii/,$gettok($sock(scores).mark,1,32),.php) HTTP/1.1
  sockwrite -n $sockname Host: $+($sock(scores).addr,$str($crlf,2))
}
on *:sockread:scores: {
  var %scores | sockread %scores
  if ($regex(%scores,/<title>(.+)<\/title>/)) {
    hinc -mu5 scores count 1
    $iif($hget(scores,count) >= 3,$+(.,timerscore,$v1) 1 $calc($v1 *2) $&
      $gettok($sock(scores).mark,2-,32) $+([,$calc($v1 -2),]) $regml(1))
  }
}
alias -l ncaa { 
  if (!$hget(ncaa,count)) { 
    if ($sock(ncaa)) sockclose ncaa
    sockopen ncaa feeds.feedburner.com 80
    sockmark ncaa $regml(2) $iif($regml(1) = !,.notice $nick,msg #) 4,15
    $gettok($sock(ncaa).mark,2-,32) 4,15Gathering $regml(2) info please wait.....
  }
}
on *:sockopen:ncaa: {
  sockwrite -n $sockname GET /collegesportsinfo-scores HTTP/1.1
  sockwrite -n $sockname Host: $+($sock(ncaa).addr,$str($crlf,2))
}
on *:sockread:ncaa: {
  var %ncaa | sockread %ncaa
  if ($regex(%ncaa,/<title>(.+)<\/title>/)) {
    hinc -mu5 ncaa count 1
    $iif($hget(ncaa,count) >= 3,$+(.,timerscore,$v1) 1 $calc($v1 *2) $&
      $gettok($sock(ncaa).mark,2-,32) $+([,$calc($v1 -2),]) $regml(1))
  }
}
ovelayer  -  Mar 04, 2013

is there anyway to add standing to the script? would love to be able to see the standing in each group

TheWhistler  -  Dec 20, 2013

why isnt the .nfl working all i get is Gathering nfl info please wait.....
the.mlb works great but nothing else will work
.n [» Fri Dec 20 | 10:29:15 pm «] <~Billy> Gathering n info please wait.....
.ncaa works [1] NY Mets 5 St. Louis 2 (FINAL)
main 1 i need to work is the .nfl
anyway i could get 1 just for the .nfl ???

Sign in to comment

TwiztedChat]   -  Oct 09, 2010

i'd love to see college football added to this

 Respond  
weishaupt   -  Sep 23, 2010

napa182, could you post the code for the script you are using?

 Respond  
napa182   -  Sep 13, 2010

hmm the one with the link from feedburner still works

.nfl Minnesota 9 New Orleans 14 (FINAL) Miami 15 Buffalo 10 (FINAL) Detroit 14 Chicago 19 (FINAL) Cincinnati 24 New England 38 (FINAL) Carolina 18 NY Giants 31 (FINAL) Atlanta 9 Pittsburgh 15 (FINAL - OT) Cleveland 14 Tampa Bay 17 (FINAL) Denver 17 Jacksonville 24 (FINAL) Indianapolis 24 Houston 34 (FINAL) Arizona 17 St. Louis 13 (FINAL) Green Bay 27 Philadelphia 20 (FINAL) San Francisco 6 Seattle 31 (FINAL) Dallas 7 Washington 13 (FINAL) Baltimore at NY Jets (7:00 PM ET) San Diego at Kansas City (10:15 PM ET)
 Respond  
StonaJakey   -  Sep 12, 2010

no longer works, says please wait but never returns the scores, ive requested a new one in the forums, so check there if anyone else is interested in a new version/complete recode of this :D

 Respond  
ericfx   -  Jun 09, 2010

Jethro comes to the rescue again :) Thanks a lot bud!

 Respond  
Jethro   -  Jun 09, 2010

ericfx, just change this line:> sockmark scores $regml(1) msg # 4,15To:

sockmark scores $regml(1) notice $nick 4,15
 Respond  
ericfx   -  Jun 09, 2010

kllmoon very useful script. Is there a way you can post a version where it notices the user only? Thanks a lot!

 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.