Updated once again
Simple Coin Toss Game.
load into a new remote of ur bot.
To turn it on right click on ur menubar or in a channel.
Bot must have +o in channel to play
trigger is @toss heads or @toss tails..
to see ur score type @score to see other peoples score type @score
Like always go ahead an rip strip this snippet how ever you want idc
example:
<&Sick0> @toss heads
<@Beast> Sick0 flips The Coin... Sick0, The Coin Landed on (heads)
<@Beast> We Have a Winner
<&Sick0> @toss tails
<@Beast> Sick0 flips The Coin... Sick0, The Coin Landed on (heads)
<&Sick0> @score
<@Beast> Sick0's Score For The Coin Toss Game Wins: 3 Kicks: 1
<&Sick0> @score napa182
<@Beast> napa182's Score For The Coin Toss Game Wins: 14 Kicks: 2
#coin off
on $@*:text:/^@(toss\s(heads|tails)$|score\s?(\S+)?)/iS:#: {
if (!$($+(%,coin,$nick),2)) { inc -u3 $+(%,coin,$nick)
if (toss isin $regml(1)) {
var %y = $regml(2), %x = $gettok(heads.tails,$r(1,2),46)
msg # $nick flips The Coin... $nick $+ , The Coin Landed on $+($chr(40),%x,$chr(41))
$iif(%x = %y,msg # We Have a Winner,kick # $nick Aww Sorry You Lose)
hinc -m Coin $+($nick,$iif(%x = %y,Won,Kick)) 1
}
if (score isin $regml(1)) {
var %z = $iif($regml(2),$v1,$nick)
msg # %z $+ 's Score For The Coin Toss Game Wins:04$&
$iif($hget(Coin,$+(%z,Won)),$v1,0) Kicks:04 $iif($hget(Coin,$+(%z,Kick)),$v1,0)
}
}
}
#coin end
on *:load:{
coinload
echo 04 -a You Have Just Loaded Napa182's Coin Toss Game
echo 07 -a An irc.EzzyChat.com Production.
}
on *:connect:coinload
on *:exit:coinsave
on *:disconnect:coinsave
alias -l coinsave .hsave Coin $qt($scriptdirCoin.hsh)
alias -l coinload $iif(!$exists($qt($scriptdirCoin.hsh)),.hmake Coin 100,.hload Coin $qt($scriptdirCoin.hsh))
menu menubar,channel {
.Turn Coin Toss Game $iif($group(#coin) = on,Off,On):{
$+(.,$iif($group(#coin) = on,dis,en),able) #coin
echo -a Coin Toss Game Is Now $group(#coin)
}
}