This is a game of twister I made on request by LittleD-the-great, by shrinking and adding to his original idea.
It works well and doesn't run more than one instance in the same channel at any one time.
It allows for colours to be used with the !twister trigger.
It can execute the no-more-than-one-instance function across multiple networks.
/twisteron turns the script on, while /twisteroff turns it off (default is on).
Enjoy!
EDIT: Updated with current script.
EDIT: Added code which was missing for some reason.
alias twisteron .enable #twister | echo $active Twister script is now ON.
alias twisteroff .disable #twister | echo $active Twister script is now OFF.
#twister on
alias -l twistnum {
inc -e %twister.num [ $+ [ $chan ] $+ . $+ [ $network ] ]
.timer 1 %twister.num [ $+ [ $chan ] $+ . $+ [ $network ] ] $$1-
}
on *:text:*!twister:#: {
if (*!twister !iswm $$1) halt
inc -e %twister.running [ $+ [ $chan ] $+ . $+ [ $network ] ]
if (%twister.running [ $+ [ $chan ] $+ . $+ [ $network ] ] == 1) {
unset %twister.num [ $+ [ $chan ] $+ . $+ [ $network ] ]
msg $chan $nick Has Started Playing Twister:
var %fall $rand(1,5)
while (%fall < 4) {
twistnum describe $chan Spins The Twister Board $iif(%twister.num [ $+ [ $chan ] $+ . $+ [ $network ] ],Again)
var %colour $r(1,15)
twistnum msg $chan $nick must put their $gettok(left hand.right hand.left foot.right foot,$r(1,4),46) on $+($chr(3),%colour,$chr(44),%colour,--)
var %fall $rand(1,5)
}
if (%fall > 3) twistnum msg $chan Sorry, $nick $+ ! You fell. Better luck next time!
.timer 1 $calc(%twister.num [ $+ [ $chan ] $+ . $+ [ $network ] ] + 1) unset %twister.running [ $+ [ $chan ] $+ . $+ [ $network ] ]
}
if (%twister.running [ $+ [ $chan ] $+ . $+ [ $network ] ] > 1) msg $chan Please wait your turn, $nick $+ .
}
#twister end