SCRIPT ID: GUESSINGBOT
Hello!
This is an IRC Game Script! Remember the classic guessing games where the bot selects a random number and you try to guess it??
Well! Time for a change, don't you think?
This Bot Script will ask you to select a number from 1 to 7 and will try to guess it!
As more users play the bot will become "smarter" and guess right more times than wrong!
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::v0.5 > 28/7/2016 ::
::Added: Auto Cancel After Player 1min idle (idle as in no game commands used) ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;;Guessing Bot Script by OrFeAsGr;; http://humanity.ucoz.com ;; More Scripts!
;;Current version: v0.5 ;;
;;Have Fun;;;
;; http://hawkee.com/snippet/16940/ ;;
ON *:TEXT:*:#: {
if ($strip($1) == !guess) {
if (!%GUESSINGBOTversion) || (%GUESSINGBOTversion != v0.5) { set %GUESSINGBOTversion v0.5 }
if (!%guesson) {
st-gb $nick $chan !ready
set %guesson readywait
.timer 1 1 msg $chan Hey $nick ... Think of a number from 1 to 7 and i'll try to guess it! Type !ready when you're ready!
set %guessnick $nick
set %guesschan $chan
}
elseif (%guesson) {
.timer 1 1 msg $chan Hey! I'm an mIRC Script not Ainstain! You wait for your turn $+($nick,.) I'm guessing $+(%guessnick,'s) number at the moment.
}
}
elseif ($strip($1) == !ready) {
if (%guesson == readywait) && (%guessnick == $nick) && (%guesschan == $chan) {
.timerst-gb 1 60 st-gb $nick $chan !utry
.timer 1 1 msg $chan OK! Now you have to define how many tries i got! Type !utry 1-5
set %guesson utrywait
}
}
elseif ($strip($1) == !utry) {
if (%guesson == utrywait) && (%guessnick == $nick) && (%guesschan == $chan) {
if ($strip($2) isnum 1-5) {
.timerst-gb 1 60 st-gb $nick $chan !uright/!uwrong
set %utry $strip($2)
set %guesson guessing
.timer 1 1 msg $chan Alright! I'm gonna start guessing now! If i guess right type: !uright
.timer 1 2 msg $chan If i guess wrong type !uwrong
.timer 1 3 guessnum
}
}
}
elseif ($strip($1) == !uright) || ($strip($1) == !uwrong) {
if (%guesson == guessing) && (%guessnick == $nick) && (%guesschan == $chan) {
.timerst-gb 1 60 st-gb $nick $chan !uright/!uwrong
if ($strip($1) == !uright) {
if (!%fguess) {
set %fguess 1
}
inc $+(%,num,%crand) 1
inc %foundnums 1
inc %totnums 1
.timerst-gb* off
.timer 1 1 msg $chan Yayyyy! I found it on my $ord(%guessnum) attempt! I'm so damn smart! Thanks for playing with me $nick <3
.timer 1 5 msg %guesschan Out of %totnums numbers i have guessed right %foundnums and wrong %notfoundnums
if (!%adv) { set -u1200 %adv 1 | .timer 1 10 msg %guesschan The Guessing Bot Script by OrFeAsGr :.::. http://humanity.ucoz.com .::.: }
unset %guess* %crand %saidguess %nfrands %utry
}
else {
.timer 1 1 msg %guesschan uuuh! Cmon!
.timer 1 2 guessnum
}
}
}
}
alias guessnum {
inc %guessnum 1
if (%guessnum <= %utry) {
if (!%fguess) {
if ($numtok(%nfrands,32) < %utry) {
var %rand = $rand(1,7)
while ($istok(%nfrands,%rand,32)) {
var %rand = $rand(1,7)
}
set %nfrands $addtok(%nfrands,%rand,32)
set %crand %rand
.timer 1 1 msg %guesschan Is it..... %rand ????
}
}
elseif (%fguess) {
var %t = %guessnum
var %max = 0
while (%t <= 7) {
if ($($+(%,num,%t),2) > %max) {
var %max = %t
;OrFeAsGr http://humanity.ucoz.com
}
inc %t
}
if (%max == 0) || (%max == %guesslmax) || ($istok(%saidguess,%max,32)) {
var %randx = $rand(1,7)
while ($istok(%saidguess,%randx,32)) {
var %randx = $rand(1,7)
}
set %saidguess $addtok(%saidguess,%randx,32)
set %crand %randx
.timer 1 1 msg %guesschan Is the number you thought of.... %randx
}
elseif (%max != 0) || (%max != %guesslmax) || (!$istok(%saidguess,%max,32)) {
set %saidguess $addtok(%saidguess,%max,32)
set %guesslmax %max
.timer 1 1 msg %guesschan Maybe it is... idk... %max ??
}
}
}
elseif (%guessnum > %utry) {
.timerst-gb* off
inc %totnums 1
inc %notfoundnums 1
.timer 1 1 msg %guesschan Oh damn it! I lost all my chances!
.timer 1 2 msg %guesschan Thanks for playing %guessnick
.timer 1 6 msg %guesschan Out of %totnums numbers i have guessed right %foundnums and wrong %notfoundnums
if (!%adv) { set -u1200 %adv 1 | .timer 1 10 msg %guesschan The Guessing Bot Script by OrFeAsGr :.::. http://humanity.ucoz.com .::.: }
unset %guess* %crand %saidguess %nfrands %utry
}
;;;;;The Guessing Bot Script by OrFeAsGr;;;;;;
;;;;;;http://hawkee.com/snippet/16940/;;;;;;;;
;;;;;;;;;http://humanity.ucoz.com;;;;;;;;;;;;;
;;;;;;;;Check Out Humanity IRC Bot;;;;;;;;;;;;
}
alias st-gb {
if ($timer(st-gb).secs) {
.timerst-gb* off
}
.timerst-gb 1 60 msg $2 $1 Didn't Use $3 Command In Time... Now Accepting New Player!
.timerst-gb2 1 60 unset %crand %saidguess %nfrands %utry %guess*
}
Or do you want to donate some bucks because you like my scripts??? Visit https://www.paypal.me/OrFeAsGr
Thx! ^_^
Updated & Fixed!
Now will autocancel after 1min of no response!
Have fun!