Well, one of my friends made a spin the bottle script, and it made me remember a script I saw on here a while back (http://www.hawkee.com/snippet/5746/) and I thought I'd try to make that persons idea work with a spin the bottle game.
on *:text:.Spin:#: {
if (%Spin.Spinning != yes) {
if ($sock(spin)) sockclose spin
sockopen spin www.watchout4snakes.com 80
set %Spin.nick $nick(#,$r(1,$nick(#,0)))
sockmark spin # %Spin.nick
set %Spin.Spinning yes
set %Spin.Spinner $nick
set %Spin.chan #
}
else {
.msg # The bottle is already spinning!
}
}
on *:sockopen:spin: {
sockwrite -n $sockname GET /creativitytools/RandomWord/RandomPhrase.aspx HTTP/1.1
sockwrite -n $sockname Host: watchout4snakes.com
sockwrite -n $sockname User-Agent: Spin the bottle
sockwrite -n $sockname $crlf
}
on *:sockread:spin: {
var %r | sockread %r | tokenize 32 %r
if ($regex(%r,main_lblPhrase.+>(.+)</span>)) {
tokenize 32 $sock($sockname).mark $regml(1)
.describe %Spin.Chan %Spin.Spinner spins the bottle... %Spin.Spinner must $3- %Spin.nick
set %Spin.Spinning no
unset %Spin.Spinner
unset %Spin.nick
unset %Spin.chan
return
}
if ($1 == </HTML>) sockclose $sockname
}