Rock, Paper, and Scissors!
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 4.0 (of 1 scores) |
| Date Added | Apr 27, 2009 |
| Last Updated | Apr 27, 2009 |
| Tags | bot fun irc paper rock rps scissor scissors |
Description
I made this RPS script when i finally decided to make a game. i had never seen one so i figured RPS would be easy. well, here it is. i have not fully tested it, but it should work. if any bug occurs just type !End to unset the games variables.
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 5:02 pm
Posted on Apr 27, 2009 5:02 pm
You should change #ethan to %chan or #
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:10 pm
Posted on Apr 27, 2009 7:10 pm
rating: 5 (average)
reason: change #ethan to $chan. code is mediocre meaning sloppy.
reason: change #ethan to $chan. code is mediocre meaning sloppy.
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:11 pm
Posted on Apr 27, 2009 7:11 pm
%chan? but wouldnt you have to set it? or is it a preset var with the current chan? o.O
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:13 pm
Posted on Apr 27, 2009 7:13 pm
no $chan is all chans... change it!
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:14 pm
Posted on Apr 27, 2009 7:14 pm
ooo. its not %chan its $chan dollar sign
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:18 pm
Posted on Apr 27, 2009 7:18 pm
Too many if statements, it all looks the same.
Also, I'm sure there's a better way to decide who won rather than those 9 if statements.
One more thing, add halt's for things you don't want, like the !rps !accept thing I told you about.
Also, I'm sure there's a better way to decide who won rather than those 9 if statements.
One more thing, add halt's for things you don't want, like the !rps !accept thing I told you about.
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:18 pm
Posted on Apr 27, 2009 7:18 pm
lol. i was ganna say... :L never saw that one :P
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:20 pm
Posted on Apr 27, 2009 7:20 pm
lol my bad, but yeah thatta way it will work on all channels.
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:20 pm
Posted on Apr 27, 2009 7:20 pm
idk many of the $command things. :/ although i could have 3 statements for the first player, then the diff outcomes of %challenger2.choice. :L
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 27, 2009 7:59 pm
Posted on Apr 27, 2009 7:59 pm
Looks nice could be a bit shorter. Something you could do is "if ( %RPS == $null )" to "if (!%RPS)" it's the same thing but less typing, for your on notice add a else so if they type papr or rokc as a typo it well notice them back that there was an error and show to commands or words they can use.
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 28, 2009 2:15 am
Posted on Apr 28, 2009 2:15 am
There are a couple of things I would've done differently, like there's no real reason to halt the script if %RPS is false (!%RPS or %RPS == $null) and instead of checking if $1 is null or != rock I'd use if/else if/else if/else.
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on Apr 28, 2009 4:51 am
Posted on Apr 28, 2009 4:51 am
choose between paper, scissors and stone, and bet your points
you choose paper and betting 50 points, waiting for my turn
1 minute later .....
I choose rock, rock beats paper and you lose 50 points
this is what i'm talking about, and nobody makes this game
you choose paper and betting 50 points, waiting for my turn
1 minute later .....
I choose rock, rock beats paper and you lose 50 points
this is what i'm talking about, and nobody makes this game
mIRC Snippet:
Rock, Paper, and Scissors!
Posted on May 15, 2009 10:59 pm
Posted on May 15, 2009 10:59 pm
try this:
| Code: |
| on *:text:!RPS:$chan: { if ( %RPS == $null ) { msg # 4 $+ $nick 14has started 9ROCK, PAPER, SCISSORS! msg # 14 $+ Who would like to accept 4 $+ $nick $+ 's 14challenge? Just type 8!Accept set %RPS 1 | set %challenger1 $nick | Halt } if ( RPS != $null ) { msg # 14There is currently a game of RPS going on. } } on *:text:!Accept:$chan: { if ( %RPS == 1 ) { msg # 9 $+ $nick 14has accepted 4 $+ %challenger1 $+ 's 14challenge. | set %challenger2 $nick | set %RPS 2 | msg # 14To Chose Rock, Paper, or Scissors, Type 8/Notice $me <Rock, Paper, Scissors> } if ( %RPS == $null ) { msg # 14You must first initiate the RPS game by saying 8 $+ !RPS } } on *:text:!End:$chan: { if ( $nick == %challenger1 || $nick == %challenger2 || $nick isop #Ethan ) { msg # 4 $+ $nick 14has decided to call it quits. | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if (( $nick != %challenger1 ) && ( $nick != %challenger1 ) && ( $nick !isop #ethan )) { msg # 14 $+ You must be participating to end the RPS duel. } } on *:notice:*:?: { if ( %RPS == 1 ) { notice $nick There has to be 2 contenders. } if ( %RPS == 2 ) { if ( $nick == %challenger1 ) { if ( $1 == Rock ) { notice %challenger1 You've chosen Rock. | set %challenger1.choice 1 } if ( $1 == Paper ) { notice %challenger1 You've chosen Paper. | set %challenger1.choice 2 } if ( $1 == Scissors ) { notice %challenger1 You've chosen Scissors. | set %challenger1.choice 3 } if (( $1 == $null ) || (( $1 != Rock ) && ( $1 != Paper ) && ( $1 != Scissors )) { notice %challenger1 You must choose Rock or Paper or Scissors } } if ( $nick == %challenger2 ) { if ( $1 == Rock ) { notice %challenger2 You've chosen Rock. | set %challenger2.choice 1 } if ( $1 == Paper ) { notice %challenger2 You've chosen Paper. | set %challenger2.choice 2 } if ( $1 == Scissors ) { notice %challenger2 You've chosen Scissors. | set %challenger2.choice 3 } if (( $1 == $null ) || (( $1 != Rock ) && ( $1 != Paper ) && ( $1 != Scissors )) { notice %challenger2 You must choose Rock or Paper or Scissors } } if (( $nick != %challenger1 ) || ( $nick != %challenger2 )) { notice $nick You'll have to wait until a free round if you want to play. } } if ( %RPS == $null ) { /notice $nick You must first initiate the game by saying !RPS and then follow the instructions. } } on *:Text:!Finished:#chan: { if ( %RPS == $null ) { msg # 14You must first initiate RPS by typing !RPS } if ( %RPS == 1 ) { msg # 14You need 2 contenders before the game can start. } if ( %RPS == 2 ) { if ( $nick != %challenger1 && $nick != %challenger2 ) { msg # You must be a contender in order to finish the round. | Halt } if ( %challenger1.choice == $null || %challenger2.choice == $null ) { msg # 14You must wait for 11both 14contenders to decide on their weapon. } if ( %challenger1.choice != $null && %challenger2.choice != $null ) { if ( %challenger1.choice == 1 && %challenger2.choice == 1 ) { msg # 4 $+ %challenger1 14chose: 8Rock. 9 $+ %challenger2 14chose: 8Rock. 4TIE GAME! NO WINNER! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 1 && %challenger2.choice == 2 ) { msg # 4 $+ %challenger1 14chose: 8Rock. 9 $+ %challenger2 14chose: 8Paper. 9 $+ %challenger2 14has beaten 4 $+ %challenger1 $+ 14!!! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 1 && %challenger2.choice == 3 ) { msg # 4 $+ %challenger1 14chose: 8Rock. 9 $+ %challenger2 14chose: 8Scissors. 4 $+ %challenger1 14has beaten 9 $+ %challenger2 $+ 14!!! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 2 && %challenger2.choice == 1 ) { msg # 4 $+ %challenger1 14chose: 8Paper. 9 $+ %challenger2 14chose: 8Rock. 4 $+ %challenger1 14has beaten 9 $+ %challenger2 $+ 14!!! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 2 && %challenger2.choice == 2 ) { msg # 4 $+ %challenger1 14chose: 8Paper. 9 $+ %challenger2 14chose: 8Paper. 4TIE GAME! NO WINNER! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 2 && %challenger2.choice == 3 ) { msg # 4 $+ %challenger1 14chose: 8Paper. 9 $+ %challenger2 14chose: 8Scissors. 9 $+ %challenger2 14has beaten 4 $+ %challenger1 $+ 14!!! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 3 && %challenger2.choice == 1 ) { msg # 4 $+ %challenger1 14chose: 8Scissors. 9 $+ %challenger2 14chose: 8Rock. 9 $+ %challenger2 14has beaten 4 $+ %challenger1 $+ 14!!! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 3 && %challenger2.choice == 2 ) { msg # 4 $+ %challenger1 14chose: 8Scissors. 9 $+ %challenger2 14chose: 8Paper. 4 $+ %challenger1 14has beaten 9 $+ %challenger2 $+ 14!!! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } if ( %challenger1.choice == 3 && %challenger2.choice == 3 ) { msg # 4 $+ %challenger1 14chose: 8Scissors. 9 $+ %challenger2 14chose: 8Scissors. 4TIE GAME! NO WINNER! | unset %challenger1 | unset %challenger2 | unset %RPS | unset %challenger1.choice | unset %challenger2.choice | halt } } } |





