This spin-the-bottle script runs across multiple channels and networks, only running one at any time in each channel. It has many results.
Replace #ROOM_GOES_HERE with the room(s) you want it to work in, or # for all rooms.
/bottleon turns the game on
/bottleoff turns it off
Paste in a new file in your bot's remotes. (File=>New)
alias bottleon .enable #bottle | echo 4 -a Spin-the-bottle script is now ON.
alias bottleoff .disable #bottle | echo 4 -a Spin-the-bottle script is now OFF.
#bottle off
on *:text:*!bottle:#ROOM_GOES_HERE: {
if (*!bottle !iswm $$1) halt
inc -e %bottle.running [ $+ [ $chan ] $+ . $+ [ $network ] ]
if (%bottle.running [ $+ [ $chan ] $+ . $+ [ $network ] ] == 1) {
var %phrases kiss.kiss.kiss.smooch.snog.lapdance for.slap.hug.thumb war.tickle.snuggle with.massage.buy a gift for.buy a drink for.snog.poke.dance with.do a teaser for.lick.grope.send a picture to.stuff happiness down the throat of
var %lander $nick($chan,$r(1,$nick($chan,0,a)),a)
.timer 1 0 msg $chan 2 $+ $nick is now spinning the bottle...
.timer 1 1 msg $chan 12The bottle goes round and round the merry-go-round..
if (%lander != $nick) .timer 1 2 msg $chan 10The Bottle lands on4 %lander 10-4 $nick 10now has to12 $gettok(%phrases,$r(1,$numtok(%phrases,46)),46) %lander $+ 10!
elseif (%lander == $nick) .timer 1 2 msg $chan 7The Bottle landed on you (4 $+ %lander $+ 7) - Kiss your arm.
unset %bottle.running [ $+ [ $chan ] $+ . $+ [ $network ] ]
}
if (%bottle.running [ $+ [ $chan ] $+ . $+ [ $network ] ] > 1) msg $chan 4Please wait your turn,12 $nick $+ 4.
}
#bottle end
Instead of using /inc and an extraordinarily long variable, why not use /set %currentplayer $nick and change the if event to
if (%currentplayer (!)= $nick) { etc }
Also, there is no need to use a local variable and $gettok, why not just make an alias that does that? I made one:
alias -l rprop { return $($+($,$r(1,$0)),2) }
Basically returns a random token out of the string. For example: $rprop(testing,this,alias) could return testing, this, or alias. So you could make the $gettok and local variable to $rprop(kiss,kiss,smooch,etc,etc). But that\'s what I would do and you don\'t necessarily have anything wrong with your code. Just some suggestions. Good job and nice idea though. I might make a snippet like this even though their are millions of spin the bottle snippets out there. ;]