By Gex
Platform:  mIRC
Published  Feb 24, 2006
Updated  Mar 01, 2006
!horoscope uses www.daily-horoscopes.com to get the latest horoscope information(updated daily): Load this script on your bot and write !horoscope <sign> in the channel to get the info abt it.
note: there is a flood protecion included to prevent users from using !horoscope more than 3 times in 5 seconds. on *:text:!horoscope *:* {
inc -u5 %m 1
if (%m > 3) { notice $nick flood detected.please wait 4 seconds before using !horoscope again }
else {
if ($istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) {
sockopen horo www.daily-horoscopes.com 80
set %horo $2
set %channi $chan
else { msg $chan I dont know what is the 4 $2 Horoscope | notice $nick Horoscope usage: !horoscope <sign> }

on *:sockopen:horo: {
if (!$sockerr) {
sockwrite -n horo GET / $+ %horo $+ .php HTTP/1.0
sockwrite horo $crlf
on *:sockread:horo: {
var %tmp
if (%xa) {
sockread %tmp | msg %channi 8,12 %horo $+ : 0 $+ %tmp
sockclose horo | unset %xa | unset %channi | unset %horo
.sockread %tmp
if (<FONT SIZE="+1"> isin %tmp) { set %xa 1 }


Sign in to comment.
Gex   -  Nov 18, 2011
I gotta update this to use regex instead
LostTruths   -  Sep 03, 2010
What about making a horoscope animal like Sagittarius is a rat. Chinese Horoscope Animal Signs.
<LostTruths> !sagittarius
<SmartyPants> Sagittarius: Your friends and family have a lot to say today -- too much, most likely! That doesn't mean you should blow them off, but at some point your impatience is sure to show through. Then it's time to act!
<LostTruths> !rat
<SmartyPants> Rat: Proceed with caution on the day of the Wood Rabbit. Treading lightly around others could help defend against gossips and petty attacks on your character. Spending frugally is advisable, as these times could put a strain on your checkbook and unforeseen expenditures might begin to pile up.
undertaker28   -  Jan 16, 2009
^Neptune   -  Oct 23, 2008
Either the site has gone under a HTML change, in which case this script needs to be updated. Or, the site could have been temporarily down. Works fine for me now.
undertaker28   -  Oct 23, 2008

have been using this for a while now,
but its now stopped working any ideas?

bearruler   -  Feb 26, 2006
if ($2 isin AquariusPiscesAriesTaurusGeminiCancerLeoVirgoLibraScorpioSagittariusCapricorn) {

You could
if ($istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46))

That would prevent someone trying !horoscpe Tau or !horoscope a
Also, make sure the socket isnt open with if ($sock(horo))
It will give you annoying errors if you try reopening a socket thats already opened

Gex   -  Feb 25, 2006
lol yep i will fix it .. thx
Urza   -  Feb 25, 2006
i think he means cause your missing a : at the end. although it still seems to work without it. i always thought it was necessary.

Instead of
if ($2 isin AquariusPiscesAriesTaurusGeminiCancerLeoVirgoLibraScorpioSagittariusCapricorn) {
i\'d suggest using $istok(Aquarius|pisces|...,$2,124) or something, the way it is now will trigger on bogus things like !horoscope a or !horoscope nican lol
Gex   -  Feb 25, 2006
DarthReven: its already working...whats wrong(ive tried it alot and it always works)??? O_o
Noutrious   -  Feb 25, 2006
why won`t? I don`t see a mistake here!
DarthReven   -  Feb 25, 2006
your on text event won\'t work
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.