Code: Select all
on *:TEXT:!cricket:#: {
msg # 7Single Player Cricket match started. $nick Now Type !bat to play as Batsman.
set %sbat $addtok(%sbat,$nick,32)
}
ON *:TEXT:!bat:#: {
if (!$istok(%sbat,$nick,32)) { msg $chan [ $+ $nick $+ ]: 4,15Error, You are not a Batsman, type !cricket to join single player game! | return }
var %z = $r(0,6)
if (%z = 6) {
msg # $read $scriptdir/six.txt
}
if (%z = 4) {
msg # $read $scriptdir/four.txt
}
if (%z = 0) {
goto out
}
if (%z = 5) {
inc %totalsoloruns [ $+ [ $nick ] ] 1
inc %soloruns [ $+ [ $nick ] ] 1
msg # WIDE BALL!!! and with this 7 $nick score %soloruns [ $+ [ $nick ] ] Runs.
HALT
}
inc %totalsoloruns [ $+ [ $nick ] ] %z
inc %soloruns [ $+ [ $nick ] ] %z
msg # 10 $2 $nick has made %z runs on this ball,7 $nick total score %soloruns [ $+ [ $nick ] ] Runs.
HALT
:out
msg # 4 $nick is OUTTTTTTT wowwwwwwwwwwww !! $nick has scored 4 %soloruns [ $+ [ $nick ] ] Runs!
set %soloruns [ $+ [ $nick ] ] 0
set %sbat $remtok(%sbat,$nick,32)
}
on *:TEXT:!runs*:#:{
msg # $nick 4,15has made Total12 %totalsoloruns [ $+ [ $nick ] ] RUNS in all single player matches and 5and12 %soloruns [ $+ [ $nick ] ] 5in this match.
}