Random Riddle an Solution
Platform: mIRC
Published Jun 16, 2011
Updated Jun 18, 2011
This is just a little socket that will pull a random riddle from
randomriddles.com , and then in 10 seconds it will show the solution to it.
I just thought I would share it, cause someone may have a use for it.
Copy/Paste into a new remote of your bot, or into a new remote of your own mIRC client.
Like always do what ever you want to this snippet. I do not care.
Trigger is @riddle
Example:
Quote
<napa182> @riddle
<~Sick0> The more you of them you take, the more you leave behind. What are they? [Solution in 10 seconds]
<~Sick0> [Solution] 'Footsteps'
alias -l riddle {
if (!%rid) { inc -u11 %rid
if ($sock(riddle)) sockclose riddle
sockopen riddle www.randomriddles.com 80
sockmark riddle msg #
}
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Riddle/Solution Socket
echo 04 -a An Irc.EzzyChat.com Production
}
on *:input:#:if ($regex($1,/^@riddle$/iS)) riddle
on $*:text:/^@riddle$/iS:#:riddle
on *:sockopen:riddle: {
sockwrite -n riddle GET / HTTP/1.1
sockwrite -n riddle Host: $+($sock(riddle).addr,$str($crlf,2))
}
on *:sockread:riddle: {
var %riddle | sockread %riddle
if ($regex(%riddle,/<i>(.+?)<a.+alert\50(.+?)\51.+<\/i>/)) {
$sock(riddle).mark :[04Riddle]: $regml(1) :[04Solution in 10 seconds]:
.timerriddle 1 10 $sock(riddle).mark :[04Solution]: $regml(2)
}
}