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:

<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)
}
}

Comments

Sign in to comment.
cptpan   -  Sep 30, 2012
This is heaps good!

Using!
 Respond  
napa182   -  Aug 18, 2012
This socket still works fine on my end. I don't know why it is doing what you are saying it is doing on yours.

<~napa182> @riddle
<&Sick0> :[Riddle]: What travels the world but stays in a corner? :[Solution in 10 seconds]:
<&Sick0> :[Solution]: 'A stamp.'

<~napa182> @riddle
<&Sick0> :[Riddle]: Is it legal to bury a man living in Mexico across the border in the United States? :[Solution in 10 seconds]:
<&Sick0> :[Solution]: 'The last time we checked, it was not legal to bury a living man under any circumstances!'

<~napa182> @riddle
<&Sick0> :[Riddle]: A man has 9 children. Half of them are boys. How is this possible? :[Solution in 10 seconds]:
<&Sick0> :[Solution]: 'They are all boys.'
 Respond  
incognitus   -  Aug 18, 2012
Same here. Doesnt display [Solution]. Can you fix that? Thanks, and keep up the good work! ;)
 Respond  
RIcko   -  Jul 02, 2012
I reloaded the script and copy pasted it again from here, it's still getting the same riddle, weird.

***********************************************************************************************
@Riddle
<&Pyro> :[Riddle]: What is broken as soon as it is spoken? :[Solution in 10 seconds]:
<&Pyro> :[Solution]: 'Silence.'
<&Pyro> :[04Riddle]: What is broken as soon as it is spoken? :[Solution in 10 seconds]:
<&Pyro> :[Solution]: 'Silence.'
***********************************************************************************************

Though, it was working fine for me before.
 Respond  
blackvenomm666   -  Jul 02, 2012
well i just tested it and it works fine on my end @ricko it must just be on your end
 Respond  
blackvenomm666   -  Jul 02, 2012
the html may have changed. i'm on a server with napa i'll let him know whats going on @ricko although he's prolly already seen your post lol
 Respond  
RIcko   -  Jul 02, 2012
It keeps getting the same Riddle unless you went to the site and refreshed the page, any solutions Napa?
 Respond  
napa182   -  Dec 20, 2011
lol I was going to say the socket still works fine.
 Respond  
LuminolBlue   -  Dec 20, 2011
Nevermind, it works. I corrected my own mistake. :D
 Respond  
blackvenomm666   -  Dec 20, 2011
i just tested it after regrabbing the link and it works fine luminolblue. which tells me something in your script must be conflicting with it somehow
 Respond  
blackvenomm666   -  Dec 20, 2011
it works for me on v6.32
 Respond  
LuminolBlue   -  Dec 20, 2011
Jethro, you must be doing something different because I get no response when I type @riddle on channel. Yes, everything is up-to-date, including mIRC. :)
 Respond  
Jethro   -  Dec 20, 2011
LuminoBlue, it's still working for me.
 Respond  
LuminolBlue   -  Dec 20, 2011
This script doesn't work. I'm guessing randomriddle.com has changed their layout/links?
 Respond  
napa182   -  Jun 17, 2011
Thank you Epic, an yeah I posted this snippet so if someone wanted to expand it into a little game or something.
 Respond  
Epic   -  Jun 17, 2011
i like it :o, could be beginnings of a riddle themed bot or something
 Respond  
napa182   -  Jun 17, 2011
lol yeah i guess so.. =P
 Respond  
Jethro   -  Jun 16, 2011
And here comes another. As they say, same Ń•hit, different day. lol joking. :P
 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.