By Scakk on Jan 16, 2009

Completely redid it as the previous site , which did work , never updated and gave the same horoscope everyday. I have since altered it to get the one from the NewYork Post. It still uses the previous site for retrieving the dates the sign covers.

Usage: !horoscope sign

Update: Jan 18th 2009: Added $lower($2) in the trigger event. Added the dates the sign covers in the script.

Update Jan 18th 2009: Completely redid it to use a site that actually updates the horoscopes.

Update Jan 29th 2009: Had to redo it again as the site decided to not work at times.

Update Feb 11th 2009: Redid it yet again using another site as previous site altered the location of the stuff to much.

Update Sep 14th 2011: Redid entire script as site changed, yet again....

on *:text:!horoscope*:#: {
  if ($group(#horoscope).status == on) { msg $chan Please wait a few moments. }
  if ($group(#horoscope).status == off) {
    if ($istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) {
      set %horosign $lower($2) | set %horochan $chan
      sockopen horoscope shine.yahoo.com 80
      .enable #horoscope
    if (!$2 || !$istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) { 
      msg $chan Horoscope usage: !Horoscope <sign> 
      msg $chan Options: Aquarius Pisces Aries Taurus Gemini Cancer Leo Virgo Libra Scorpio Sagittarius Capricorn 
#horoscope off
on *:sockopen:horoscope: {
  sockwrite -n $sockname GET $+(/astrology/,%horosign,/daily-overview/) HTTP/1.1
  sockwrite -n $sockname Host: shine.yahoo.com
  sockwrite -n $sockname Connection: close
  sockwrite -n $sockname Authorization: Basic 
  sockwrite -n $sockname $crlf
on *:sockread:horoscope: { 
  sockread %horotemp 
  if (<h2 class="extended"> isin %horotemp) { set %horoover $nohtml($v2) }
  if (&ndash; isin %horotemp) { set %horotime $replace($nohtml($v2),&ndash;,-,/,$chr(32)) }
  if (<h2> isin %horotemp) { inc %t_t 1 | set %horoquickie $+ %t_t $nohtml($v2) }
  if (<p> isin %horotemp) { inc %r_r 1 | set %horooverview $+ %r_r $nohtml($v2) }
on *:sockclose:horoscope: {
  msg %horochan Sign & Dates: $colored($+($upper($left(%horosign,1)),$right(%horosign,-1)),12) $&
    @ $colored($horotime(%horotime),12) Today: $colored($gettok(%horoover,4-6,32),12)
  msg %horochan Quickie: $colored(%horoquickie2,3)
  msg %horochan Overview: $colored(%horooverview3,3)
  unset %horo* %t_t %r_r
  .disable #horoscope
; Usage: $colored(TEXT,N1,N2) or $colored(TEXT,N1,N2).b
; N1 & N2 are both optional.
alias colored { if ($isid) { return $+($iif($prop = b,$chr(2)),$iif($2 isnum 0-15,$+($chr(3),$iif($len($2) == 1,$+($chr(48),$2),$2))),$iif($3 isnum 0-15,$+($chr(44),$iif($len($3) == 1,$+($chr(48),$3),$3))),$1,$chr(15)) } }
alias -l nohtml {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
alias horotime { 
  return $& 
    $month($gettok(%horotime,1,32)) $ord($gettok(%horotime,2,32)) $&
    - $month($gettok(%horotime,4,32)) $ord($gettok(%horotime,5,32))
alias month { 
  return $replace($1,10,October,11,November,12,December,1,January,2,February,$&
#horoscope end


Sign in to comment.
Adorkable   -  Aug 28, 2012

Apparently not, hopefully Scakk will see this and fix or comment.

cptpan   -  Aug 25, 2012

This no longer works?

startmeup   -  Sep 26, 2011

That worked just fine..thank you very much sir!

Scakk   -  Sep 26, 2011

In the script find the spot that has

msg %horochan Quickie: $colored(%horoquickie1,3)

change it to

msg %horochan Quickie: $colored(%horoquickie2,3)
startmeup   -  Sep 26, 2011

After your update< it worked fine...now I get his. I tried a fresh copy as well and still the same result...any ideas?
Quickie: yuhead-logo h2{ width:213px; height:48px; background-image:url(http://l.yimg.com/a/i/brand/purplelogo/uh/us/20/lifestyle/shine.png); _background-image:url(http://l.yimg.com/a/i/brand/purplelogo/uh/us/20/lifestyle/shine.gif); } .yuhead-logo a{ width:213px; height:48px; } .yuhead-logo div.yuhead-comarketing { width:213px; } Shine from Yahoo! Search

Scakk   -  Sep 16, 2011

@Jethro Fixed the channel bit. Interesting site there.

@GrimReaper. I use mIRC 6.35 also and did not get those $chr(9) ... Odd... Thanks for the score.

Warriorii  -  Sep 29, 2014

The horoscope didn't work for me. but not sure how to copy it. been a long time since I have been on here and it changed. use to u just hi-lighted and copied it but that don't work here. so I copied comments and all then deleted out everything except the script but it didn't work anyway. can someone tell me how the heck you copy scripts here lol?

Sign in to comment

GrimReaper   -  Sep 16, 2011

Nice update Scakk.. I did find when I used it on mIRC 6.35, It came up with loads of $chr(9) characters.. I added a little $remove in the SOCKCLOSE part.

Get's a like and 9 from me. :)

Jethro   -  Sep 16, 2011

Scakk, I think you forgot to remove the listened channel #back-lot

There is a great yahoo site called yahoo pipes, which provides graphical user interface for building data that aggregates feeds, webpages, etc..

Check out this link for yahoo astrolgy:


You can also get it by clicking RSS or JSON.

The Pipe is made possible by a contributor, which makes finding a particular sign easily.

napa182   -  Sep 14, 2011

About time you updated this Scakk =P
8/10 +Like

Scakk   -  Sep 14, 2011

Update Sep 14th 2011: Redid entire script as site changed, yet again....

[11:20] <Goofy|AFK> !horoscope libra
[11:20] Sign & Dates: 12Libra @ 12 September 23rd - October 22nd Today: 12September 14, 2011
[11:20] Quickie: 03 Appreciate the smaller things in life -- even clouds in the sky deserve your notice.
[11:20] Overview: 03 Your love life can run on autopilot for the time being -- you need to focus all this social energy on other people! Old friends, colleagues, customers, family and more all need your attention now.

Warriorii   -  Sep 13, 2011

It was working fine for me then it just stopped. Hope u fix it we really like it and use it alot

Adorkable   -  Jul 28, 2011

I hope you can fix it Scakk, my room loves it!

Scakk   -  Jul 26, 2011

The site itself has completely changed its layout. I will either have to redo it from that site or from another one.

startmeup   -  Jul 26, 2011

Was working fine< now returns nothing...tried a fresh copy of it and still the same result.

[12:31] Sign & Dates: () Today:
[12:31] Quickie:
[12:31] Overview:

thats it....any ideas?

Cold_Fussion   -  Jan 04, 2011

[22:56:29] !horoscope aries
[22:56:31] Sign & Dates: 07() Today: 12
[22:56:32] Quickie: 03
[22:56:32] Overview:

mind telling me what server ur on and then i can maybe check from there?

Cold_Fussion   -  Jan 04, 2011

thanks..... will retry now.... :)

Scakk   -  Jan 04, 2011

I just tested it and it works fine. Perhaps the site was down for some reason.

[15:44] <Goofy|AFK> !horoscope libra
[15:45] Sign & Dates: 07Libra (9/23-10/22) Today: 12Tuesday, January 4, 2011
[15:45] Quickie: 03Stay focused on the important things in life -- if it's not fun, it's not right.
[15:45] Overview: 03Your home life could use some shaking up, and while that's not exactly fun, it is still vital. Make sure that your family or roommates get the heads-up so you don't take them by surprise.

Cold_Fussion   -  Jan 04, 2011

ok well can u please update this to work??? cos it seems outdated now thanks...

Jethro   -  Aug 16, 2010

Hmmmm...ok. I always presume that once a socket script stops functioning, it often, in most cases, has to do with the source code.

napa182   -  Aug 16, 2010

um the snippet seems to be working fine for me

<~napa182> !horoscope Virgo
<&Sick0> Sign & Dates: Virgo (8/23-9/22) Today: Monday, August 16, 2010
<&Sick0> Quickie: You're in a holding pattern right now. Wait until there's an opening and then move.
<&Sick0> Overview: Your curiosity isn't of the cat-killing variety, so go exploring and see what you come up with. It's a safe bet that your life gets a lot more interesting as a result. Inspire friends to do the same.

<~napa182> !horoscope Aquarius
<&Sick0> Sign & Dates: Aquarius (1/20-2/18) Today: Monday, August 16, 2010
<&Sick0> Quickie: Some private information is in danger of being divulged today -- plug up the leaks.
<&Sick0> Overview: Your working life is seeing a boost today, though it may not feel like one at first. In fact, you may be tempted to storm out of the office -- or interview -- but patience pays off in a big way.

Jethro   -  Aug 16, 2010

Jenny, the source code of the website may have changed. It's time scakk updates his snippet.

Jenny   -  Aug 16, 2010

Why is this suddenly not working anymore?

`Dean   -  Feb 06, 2010

Works great, thanks!

[13:47] <+`Dean> .horoscope scorpio
[13:47] <~exHelp> Sign & Dates: Scorpio (10/23-11/21) Today: Saturday, February 6, 2010
[13:47] <~exHelp> Quickie: Be patient and avoid temptation. What seems like a sure bet won't pay off.
[13:47] <~exHelp> Overview: Try not to worry to much about the past -- you need to focus on your vision of the future. It's a really good time for you to step up and enlist the aid of those who are sympathetic to your cause.

Al_Bundy33   -  Dec 19, 2009


Al_Bundy33   -  Dec 06, 2009

I like this horoscope script, doesn't flood either. Can you add a way that i can do /horoscope and it shows it in the room too?

greenlanter420   -  Mar 01, 2009

really nice script great updates it keeps getting better and better!

Scakk   -  Feb 10, 2009

Update Feb 11th 2009: Redid it yet again using another site as previous site altered the location of the stuff to much.

undertaker28   -  Feb 02, 2009

sites a bit of hit n miss but
but the script is awesome 10/10

PuNkTuReD   -  Jan 31, 2009

nice snippet scakk 8/10

Scakk   -  Jan 29, 2009

Update Jan 29th 2009: Had to redo it again as the site decided to not work at times.

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.