RouletteV2

By WacKy- on Feb 19, 2005

This is my version 2 of my roulette, easy one this time tho , not a %10 chance on winning, anyway, u can edit it as u wish but u dont realy need 2 hehe , hf :)

on 1:TEXT:*!roulette*:#:{
  if (%roul.time) { halt
  }
  elseif ($me !isop $chan) {
    msg $chan [- I need to be opped in $chan in order to start roulette. -]
  }
  else {
    set -u15 %roul.time 1
    set %roulette.n $rand(1,3)
    set %roulette.nick $nick
    set %roulette.c $chan
    inc %roul.p [ $+ [ $address($nick,2) ] ] 
    timerroulette 1 15 roulettelose {
      msg $chan [- You are now playing roulette -]
      msg $chan [- You have got 15 seconds to guess which number it is -]
      msg $chan [- Numbers are 1 - 2 - 3 ][Use: !number <Num> -]
    }
  }
}

on 1:TEXT:!number *:#:{
  if ($nick == %roulette.nick) { }
  if ($2 != %roulette.n) { /roulettelose }
  if ($2 == %roulette.n) { /roulettewin
  }
}

alias roulettewin {
  inc %roul.w [ $+ [ $address($nick,2) ] ] 
  msg %roulette.c [- Well Done %roulette.nick You Did It! -]
  msg %roulette.c [- You're Stats: Played: ( %roul.p [ $+ [ $address($nick,2) ] ] ) ][Lost: ( %roul.l [ $+ [ $address($nick,2) ] ] ) ][Won: ( %roul.w [ $+ [ $address($nick,2) ] ] ) -]
  msg %roulette.c [- Next Player. -]
  unset %roulette*
  timers off
}

alias roulettelose {
  inc %roul.l [ $+ [ $address($nick,2) ] ] 
  msg %roulette.c [- Unlucky %roulette.nick You Failed! ][Number = %roulette.n -]
  msg %roulette.c [- You're Stats: Played: ( %roul.p [ $+ [ $address($nick,2) ] ] ) ][Lost: ( %roul.l [ $+ [ $address($nick,2) ] ] ) ][Won: ( %roul.w [ $+ [ $address($nick,2) ] ] ) -]  
  msg %roulette.c [- Next Player. -]
  timers off
  unset %roulette*
}

Comments

Sign in to comment.
enymizer   -  Sep 01, 2006

Nice 1.. ;)

 Respond  
StonedStoner   -  Feb 24, 2005

on the code /timers off u should change it to /timerroulette off so it doesnt stop all the users timers just the one the script activated

 Respond  
TENb`   -  Feb 20, 2005

Not bad i will add this code to my game bot :)

 Respond  
xDaeMoN   -  Feb 20, 2005

ON your code \"on 1:TEXT:!roulette:#:{\", what if the op typed !roulette inside the sentence, then the game would start thought not intentionally... It would be better if it does not have the wildcards like this... \"on 1:TEXT:!roulette:#:{\"

 Respond  
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.