The Guessing Bot! v0.5

By OrFeAsGr on Apr 10, 2016

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) ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Image

;;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*
}

Load it in a clean remote!
The starting trigger is !guess
Thanks for viewing or using! Leave a reply if you like it or need help or for suggestions!
Please do not remove the advertising message! It is delayed for 1200 seconds everytime it is sent so it won't be that annoying!
If you share this script please do not remove the advertising comments you might find in some lines! Or share the link to this post!
PEACE <3

Do you want to help me make some money? You can do it without paying for nothing! Just visit my site http://humanity.ucoz.com ,turn off your ad blocker, watch an ad and turn it back on! You'll be giving me something less than a cent! Thanks!

Or do you want to donate some bucks because you like my scripts??? Visit https://www.paypal.me/OrFeAsGr
Thx! ^_^

Comments

Sign in to comment.
dma   -  Jul 15, 2016

excuse me but i dont think this works anymore i get this all the time
[ @ZoinX ] Hey! I'm an mIRC Script not Ainstain! You wait for your turn dma. I'm guessing dma's number at the moment.

lol its Einstien

OrFeAsGr  -  Jul 26, 2016

Updated & Fixed!
Now will autocancel after 1min of no response!
Have fun!

Sign in to comment

Arigateaux   -  Apr 19, 2016

It's good to see people still writing scripts and posting them to Hawkee.

OrFeAsGr  -  Apr 19, 2016

:) Scripting is my drug! :D

dma  -  Jun 11, 2016

good game! <3 it .... im still waiting for the scores for !WNICK =( I dont think you made that one

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.