Rock, Paper, Scissors

By Destro168 on Jul 26, 2008

It's simply a game of Rock, Paper, Scissors. Start the game with "!RPS".

Instructions are stated as the game goes on.

on *:TEXT:*:#: {
  if ($1 == !RPS) && ( !%startgame ) { msg $chan $nick has started a game. Type !Join to play
    set %startgame on
    set %Player1check $nick
    set %TimeToChoosePlayer2 on
  }
  if ( $1 == !Join ) && ( on == %TimeToChoosePlayer2 ) && ( !%joinedgame ) { 
    set %Player2check $nick
    if ( %Player1check == %Player2check ) { msg $chan Player 1 has already been chosen. Player 2 has to choose
      set %joinedgame $null 
    }
    else {
      msg $chan $nick has joined the game. Players will have 2 seconds to choose between Rock, Paper, or Scissors after "Shoot!" is said.
      msg $chan Player 1 Use " ! " to prefix your choice! 3!Rock 1or 3!Paper 1or 3!Scissors.
      msg $chan Player 2 Use " ~ " to prefix your commands! 3~Rock 1or 3~Paper 1or 3~Scissors.
      set %joinedgame on
      set %TimeToThrowdown on
      set %Timetochoose on
    }
  }
  if ( on == %Timetochoose ) && ( !%Timetochooseoff ) {
    set %Timetochooseoff off
    set %CantChoose on
    .timerr 1 7 msg $chan 4Rock!
    .timerp 1 8 msg $chan 4Paper!
    .timersc 1 9 msg $chan 4Scissors!
    .timersh 1 10 msg $chan 3Shoot!
    .timercc 1 10 set %CantChoose off
    .timerct 1 13 set %ContinueTimer on
    .timerts 1 14  msg $chan TOO SLOW. Game is over!
    .timeru 1 14  unsetall
  }
  if  ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( !%P1Chose ) && ( off == %CantChoose ) {
  set %Player1check2 $nick }
  if ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }   
  if ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( %Player1check2 == %Player2check )  && ( !%P1Chose ) && ( off == %CantChoose ) { msg $chan Player 2, please use " ~ " to prefix your commands. }
  if  ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early } 
  if ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( %Player1check2 != %Player1check ) && ( %Player1check2 != %Player2check )  && ( !%P1Chose ) && ( off == %CantChoose ) { msg $chan You are currently not playing this game. }
  if  ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == !Rock ) && ( on == %TimeToThrowdown ) && ( %Player1check == %Player1check2 )  && ( !%P1Chose ) && ( off == %CantChoose ) { 
    set %Player1Choice Rock
    msg $chan Player 1 has chosen 3Rock.
    set %P1Chose on
  }
  if  ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( !%P1Chose ) && ( off == %CantChoose ) {
  set %Player1check2 $nick }
  if ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }   
  if ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( %Player1check2 == %Player2check )  && ( !%P1Chose ) && ( off == %CantChoose ) { msg $chan Player 2, please use " ~ " to prefix your commands. }    
  if  ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early } 
  if ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( %Player1check2 != %Player1check ) && ( %Player1check2 != %Player2check )  && ( !%P1Chose ) && ( off == %CantChoose ) { msg $chan You are currently not playing this game. }
  if  ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == !Paper ) && ( on == %TimeToThrowdown ) && ( %Player1check == %Player1check2 )  && ( !%P1Chose ) && ( off == %CantChoose ) { 
    set %Player1Choice Paper
    msg $chan Player 1 has chosen 3Paper.
    set %P1Chose on
  }
  if  ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( !%P1Chose ) && ( off == %CantChoose ) {
  set %Player1check2 $nick }
  if ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }   
  if ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( %Player1check2 == %Player2check )  && ( !%P1Chose ) && ( off == %CantChoose ) { msg $chan Player 2, please use " ~ " to prefix your commands. }    
  if  ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early } 
  if ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( %Player1check2 != %Player1check ) && ( %Player1check2 != %Player2check )  && ( !%P1Chose ) && ( off == %CantChoose ) { msg $chan You are currently not playing this game. }
  if  ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == !Scissors ) && ( on == %TimeToThrowdown ) && ( %Player1check == %Player1check2 )  && ( !%P1Chose ) && ( off == %CantChoose ) { 
    set %Player1Choice Scissors
    msg $chan Player 1 has chosen 3Scissors.
    set %P1Chose on
  }
  if ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( !%P2Chose ) && ( off == %CantChoose ) { set %Player2check2 $nick }
  if ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }   
  if ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( %Player2check2 == %Player1check )  && ( !%P2Chose ) && ( off == %CantChoose ) { msg $chan Player 1, please use " ! " to prefix your commands. }
  if  ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early } 
  if ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( %Player2check2 != %Player2check ) && ( %Player2check2 != %Player1check )  && ( !%P2Chose ) && ( off == %CantChoose ) { msg $chan You are currently not playing this game. }
  if  ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == ~Rock ) && ( on == %TimeToThrowdown ) && ( %Player2check == %Player2check2 )  && ( !%P2Chose ) && ( off == %CantChoose ) { 
    set %Player2Choice Rock
    msg $chan Player 2 has chosen 3Rock.
    set %P2Chose on
  }
  if ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( !%P2Chose ) && ( off == %CantChoose ) { set %Player2check2 $nick }
  if ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }   
  if ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( %Player2check2 == %Player1check )  && ( !%P2Chose ) && ( off == %CantChoose ) { msg $chan Player 1, please use " ! " to prefix your commands. }
  if  ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early } 
  if ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( %Player2check2 != %Player2check ) && ( %Player2check2 != %Player1check )  && ( !%P2Chose ) && ( off == %CantChoose ) { msg $chan You are currently not playing this game. }
  if  ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == ~Paper ) && ( on == %TimeToThrowdown ) && ( %Player2check == %Player2check2 )  && ( !%P2Chose ) && ( off == %CantChoose ) { 
    set %Player2Choice Paper
    msg $chan Player 2 has chosen 3Paper.
    set %P2Chose on
  }
  if ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( !%P2Chose ) && ( off == %CantChoose ) { set %Player2check2 $nick }
  if ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }   
  if ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( %Player2check2 == %Player1check )  && ( !%P2Chose ) && ( off == %CantChoose ) { msg $chan Player 1, please use " ! " to prefix your commands. }
  if  ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early } 
  if ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( %Player2check2 != %Player2check ) && ( %Player2check2 != %Player1check )  && ( !%P2Chose ) && ( off == %CantChoose ) { msg $chan You are currently not playing this game. }
  if  ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( on == %CantChoose ) { .notice $nick You have choosen too early }
  if ( $1 == ~Scissors ) && ( on == %TimeToThrowdown ) && ( %Player2check == %Player2check2 )  && ( !%P2Chose ) && ( off == %CantChoose ) { 
    set %Player2Choice Scissors
    msg $chan Player 2 has chosen 3Scissors.
    set %P2Chose on
  }
  if (on == %P1Chose) && (on == %P2Chose) {
    if (%Player1Choice == Rock) && (%Player2Choice == Rock) && ( !%Gameover ) { 
      msg $chan It is a tie!
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Rock) && (%Player2Choice == Paper) && ( !%Gameover ) { 
      msg $chan Player 2 has won!
      set %Gameover on
      timerts off
      unsetall 
    }
    if (%Player1Choice == Rock) && (%Player2Choice == Scissors) && ( !%Gameover ) { 
      msg $chan Player 1 has won! 
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Paper) && (%Player2Choice == Rock) && ( !%Gameover ) {
      msg $chan Player 1 has won! 
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Paper) && (%Player2Choice == Paper) && ( !%Gameover ) {
      msg $chan It is a tie 
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Paper) && (%Player2Choice == Scissors) && ( !%Gameover ) {
      msg $chan Player 2 has won! 
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Scissors) && (%Player2Choice == Rock) && ( !%Gameover ) {
      msg $chan Player 2 has won! 
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Scissors) && (%Player2Choice == Paper) && ( !%Gameover ) {
      msg $chan Player 1 has won! 
      set %Gameover on 
      timerts off
      unsetall 
    }
    if (%Player1Choice == Scissors) && (%Player2Choice == Scissors) && ( !%Gameover ) {
      msg $chan It is a tie! 
      set %Gameover on 
      timerts off
      unsetall 
    }
  }
}

Comments

Sign in to comment.
NXArmada   -  Nov 04, 2009

Any way you can do it so it does not unsetall. I have tons of variables for other scripts and this script wipes all the variables

 Respond  
wizard38   -  Oct 09, 2008

I want this game a long time but for a player against the script, but it seems that nobody makes this game

 Respond  
WeXaztor   -  Oct 09, 2008

the game should end by itself if no-one joins after starting the game
if that's not to hard to fix, ive got no skills in this though

 Respond  
wizard38   -  Jul 31, 2008

Could you make a game for one player but like this \"choose between rock, paper or Scissors\"
the player make !paper 50
and the player choose and wait about 1 minute and in the end he say \"i choose \"\"\"\" and you lost 50 points\" or \"its a tie\" or \"you win 50 points\"

something like that

thanks

 Respond  
Destro168   -  Jul 30, 2008

I could make it possible for one player. I\'ll get to in a few days :P

 Respond  
wizard38   -  Jul 28, 2008

i like this game but for one player, two players no
is possible for one player?

 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.