This works I found it kinda funny.
Ill add more phrases later on 100 or so then repost
on *:TEXT:!phrase*:#:{
var %p = $rand(1,16)
if (%p == 1) .timer 1 2 msg $chan Be nice to your kids. They'll choose your nursing home
if (%p == 2) .timer 1 2 msg $chan Diplomacy - the art of letting someone have your way.
if (%p == 3) .timer 1 2 msg $chan Every man should marry. After all, happiness is not the only thing in life
if (%p == 4) .timer 1 2 msg $chan If you are born ugly blame your parents, if you died ugly blame your doctor.
if (%p == 5) .timer 1 2 msg $chan They've got a picture of her at the hospital - it saves using the stomach pump
if (%p == 6) .timer 1 2 msg $chan Computers make very fast, very accurate mistakes.
if (%p == 7) .timer 1 2 msg $chan There is an exception to every rule, except this one.
if (%p == 8) .timer 1 2 msg $chan I am planning to be more spontaneous in the future.
if (%p == 9) .timer 1 2 msg $chan Success is a relative term. It brings so many relatives
if (%p == 10) .timer 1 2 msg $chan The wise never marry, and when they marry they become otherwise.
if (%p == 11) .timer 1 2 msg $chan When you are working late, the boss will never be around. When you are surfing the net the boss will always drop by.
if (%p == 12) .timer 1 2 msg $chan Love is photogenic, It needs darkness to develop.
if (%p == 13) .timer 1 2 msg $chan Before you borrow money from a friend, decide which you need more
if (%p == 14) .timer 1 2 msg $chan Every morning is the dawn of a new error.
if (%p == 15) .timer 1 2 msg $chan Press any key to continue or any other key to quit...
if (%p == 16) .timer 1 2 msg $chan There is an exception to every rule, except this one.
}
@Dark| Windows named them -->> http://en.wikipedia.org/wiki/Winsock
@napalm` You should try tackling a real page like google or wikipedia and then see if you change your tune. There are only a handfull of scripters who have the time, patience and skill to parse these pages.
What you are saying is ridiculous. Just because you can paste a script into a remote doesn't mean that you can script at a high level and parse html pages.
I'm 100% standing by napalm's use of socket. By using the manual add of phases, you have to enter them one at a time, and then you're gonna add more if you want to increase the number of them. Over time, you'll see your remote get bigger and bigger...the script response time is thus getting slower. That, in conclusion, is not really an efficient way of going about it.
Just an example of how to use sockets to return phrases. This is in NO way a finished product.
on *:TEXT:!phrase:#:{
if (%phrase.f) { set -u3 %phrase.f 1 | return }
phrase # | set -u3 %phrase.f 1
}
alias phrase {
sockopen phrase www.smartphrase.com 80
sockmark phrase $1-
}
on 1:sockopen:phrase:{
if ($sockerr) echo $color(kick) -s PHRASE SOCKOPEN ERROR: $sock($1).wsmsg
sockwrite -n $sockname POST $+(/cgi-bin/randomphrase.cgi?spanish&,$gettok(serious:humorous,$r(1,2),58),&normal) HTTP/1.1
sockwrite -n $sockname Host: www.smartphrase.com
sockwrite -n $sockname $crlf
}
on 1:sockread:phrase:{
var %r | sockread %r
if ($sockerr) echo $color(kick) -s PHRASE SOCKREAD ERROR: $sock($1).wsmsg
elseif ($regex(%r,<HTML>)) set -u10 %phrase.c 0
elseif (%r == <TD ALIGN="center" WIDTH=420 BGCOLOR="#DCDCFF">) {
sockread %r | inc %phrase.c
if (%phrase.c == 2) $iif($sock($sockname).mark ischan,msg $v1,echo $color(info) -a PHRASE:) $regsubex(%r,.+<P>(.+),\1)
}
elseif ($regex(%r,<.HTML>)) { unset %phrase.c | sockclose $sockname }
}