dma commented on a Page, Scramble Nick Bot Game  -  Jan 04, 2016

wish i had more people in my casino room to guess their names

CrazyDriver  -  Jan 04, 2016

I have a little update on this which I have used for a while now.

on *:text:!wnick:#: {
  if (%qnick.game-status != on) {
    set %qnick.game-status on
    set %qnick.game-nick $qnickrand($chan)
    set %qnick.game-last-nick %qnick.game-nick
    if (!%qnick.game-games) { set %qnick.game-games 1 }
    if (%qnick.game-games) { inc %qnick.game-games }
    /nscrammble %qnick.game-nick $chan
    set %qnick.game-start $ctime
  }
  else {
    if (!%floo-time) {
      set -u15 %floo-time ok
      /nscrammble %qnick.game-nick $chan
    }
  }
}    
alias qnickrand {
  var %qnick.game-nick1 = $nick($1,$r(1,$nick($1,0)))
  while ( %qnick.game-nick1 = %qnick.game-last-nick ) {
    set %qnick.game-nick1 $nick($1,$r(1,$nick($1,0)))
  }
  return %qnick.game-nick1
}
alias nscrammble {
  /msg $2 4[0Guess The Nickname4]  4(0 $+ Game N°: %qnick.game-games $+ 4) 0:: 7If you giveup type 4!0giveup 0:: 7Unscramble this nickname0:4 $misturecs(%qnick.game-nick)
} 
on *:text:%qnick.game-nick:#: {
  if (%qnick.game-status == on) {
    /msg $chan 4[0Correct4] 0 $+ $nick 7got it right4!! 0:: 4(0 $+ Game N°: %qnick.game-games $+ 4) 0:: 7Game Time0:7 $duration($calc($ctime - %qnick.game-start)) 0:: 7The nickname was0:4 %qnick.game-nick 0:: 7To start a new game type  4!0wnick 
    set %qnick.game-status off
    unset %qnick.game-nick
  }
}
on *:text:!giveup:#: {
  if (%qnick.game-status == on) {
    /msg $chan 4[0Answer4] 4(0 $+ Game N°: %qnick.game-games $+ 4) 0:: 7The scrambled nickname was0:4 %qnick.game-nick 
    set %qnick.game-status off
    unset %qnick.game-nick
    /msg $chan 4[0Nickname Scramble4] 7To start a new game type 4!0wnick 
  }
}

alias misturecs {
  var %trrr = $lower($1)
  var %trr = $len($1)
  var %trr1 = 1
  while (%trr1 <= %trr) {
    var %trr2 = %trr2 $+ $mid(%trrr,%trr1,1) $+ .
    inc %trr1
  } 
  var %tra = %trr2
  var %tr = $numtok(%trr2,46)
  var %tr1 = 1
  var %tr2 = %tr
  while (%tr1 <= %tr) {
    set %tr3  $rand(1,%tr2)
    var %trr12 = $remove(%tra,.)
    var %tr4 = %tr4 $+ $mid(%trr12,%tr3,1) 
    var %tra = $deltok(%tra,%tr3,46)
    dec %tr2
    inc %tr1
  }
  return %tr4
}
CrazyDriver  -  Jan 05, 2016

It should've added the color codes to it but I guess it doesn't add them automatically :/

dma  -  May 14, 2016

it has colors anyway ;) dma - irc.axon.pw #irc - it rocks with more people in the channel.. have fun folks...................

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.