Rock Paper Scissors game
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 6.0 (of 2 scores) |
| Date Added | May 05, 2008 |
| Last Updated | Jun 25, 2008 |
| Tags | chance compact game mirc paper random remotes rock scissors |
Description
Again, the idea here was to keep it compact. The script randomly picks one type for itself and then uses math(s) to determine who the winner is.
I've been seeing a number of Rock,Paper,Scissors games around and decided to make one for myself.
Script is prompted by !RockPaperScissors <your choice of Rock,Paper,Scissors> .
The math(s) works simply that the way it is worked out, whichever wins, the only available winning calculations are 1 or -2. All others lose.
This also converts the user's first letter of their word to capital (!Rockpaperscissors rock would turn to "Rock")
Examples:
<~Goofy|Around> !RockPaperScissors pencilsharpenings
<Vaseline> [ Goofy|Around ] You've got to choose Rock, Paper or Scissors!
<~Goofy|Around> !RockPaperScissors scissors
<Vaseline> [ Goofy|Around ] <Your Choice: Scissors > <My Choice: Scissors > It's a draw!
<~Goofy|Around> !RockPaperScissors Rock
<Vaseline> [ Goofy|Around ] <Your Choice: Rock > <My Choice: Scissors > Goofy|Around has won!
**Thanks to Goofy|Around (Scakk here) for the endless testing and the script for changing the first letter of the user's input to a capital!**
I've been seeing a number of Rock,Paper,Scissors games around and decided to make one for myself.
Script is prompted by !RockPaperScissors <your choice of Rock,Paper,Scissors> .
The math(s) works simply that the way it is worked out, whichever wins, the only available winning calculations are 1 or -2. All others lose.
This also converts the user's first letter of their word to capital (!Rockpaperscissors rock would turn to "Rock")
Examples:
<~Goofy|Around> !RockPaperScissors pencilsharpenings
<Vaseline> [ Goofy|Around ] You've got to choose Rock, Paper or Scissors!
<~Goofy|Around> !RockPaperScissors scissors
<Vaseline> [ Goofy|Around ] <Your Choice: Scissors > <My Choice: Scissors > It's a draw!
<~Goofy|Around> !RockPaperScissors Rock
<Vaseline> [ Goofy|Around ] <Your Choice: Rock > <My Choice: Scissors > Goofy|Around has won!
**Thanks to Goofy|Around (Scakk here) for the endless testing and the script for changing the first letter of the user's input to a capital!**
mIRC Snippet:
Rock Paper Scissors game
Posted on Jun 7, 2008 11:53 am
Posted on Jun 7, 2008 11:53 am
It's a good rock paper scissors script, but it would be better if the commands was shorter, so i just changed it to !RPS (8/10)
mIRC Snippet:
Rock Paper Scissors game
Posted on Jun 23, 2008 10:40 pm
Posted on Jun 23, 2008 10:40 pm
8/10 good script i had to change it some so its easier to use.
---
lol ragbot you gave him a 4/10 if you voted if you didn't, well then sorry for the odd accusation.
---
all those '4's in my script are sopose to have the color box.. it isn't showing up in code... i wonder why?
| Code: |
| on *:text:!rps*:#: { if ($2 == p) { var %PlayerChoice Paper | goto rps } if ($2 == r) { var %PlayerChoice Rock | goto rps } if ($2 == s) { var %PlayerChoice Scissors | goto rps } if ($2 == paper) { var %PlayerChoice $2 | goto rps } if ($2 == rock) { var %PlayerChoice $2 | goto rps } if ($2 == scissors) { var %PlayerChoice $2 | goto rps } else { msg $chan [4 $nick ] You've got to choose Rock, Paper or Scissors! | halt } :rps var %ScriptChoiceNum $rand(0,2) var %ScriptChoice $replace(%ScriptChoiceNum,2,Paper,1,Rock,0,Scissors) if (%PlayerChoice == %ScriptChoice) { msg $chan [4 $nick ] <Your Choice:4 $replace($($upper($left(%PlayerChoice,1)) $+ $right(%PlayerChoice,-1)),$chr(32),$chr(32)) > <My Choice:4 %ScriptChoice > It's a draw! | halt } var %PlayerChoiceNum $replace(%PlayerChoice,Paper,2,Rock,1,Scissors,0) if (($calc(%ScriptChoiceNum - %PlayerChoiceNum) == 1) || ($calc(%ScriptChoiceNum - %PlayerChoiceNum) == -2)) { var %winner $me } else { var %winner $nick } msg $chan [4 $nick ] <Your Choice:4 $replace($($upper($left(%PlayerChoice,1)) $+ $right(%PlayerChoice,-1)),$chr(32),$chr(32)) > <My Choice:4 %ScriptChoice > [4 %Winner ] has won! } |
---
lol ragbot you gave him a 4/10 if you voted if you didn't, well then sorry for the odd accusation.
---
all those '4's in my script are sopose to have the color box.. it isn't showing up in code... i wonder why?
mIRC Snippet:
Rock Paper Scissors game
Posted on Jun 23, 2008 10:47 pm
Posted on Jun 23, 2008 10:47 pm
| Code: |
var -s %PlayerChoice $2 | /var -s %PlayerChoiceNum $replace(%PlayerChoice,Paper,2,Rock,1,Scissors,0) | /var -s %ScriptChoiceNum $rand(0,2) | /var -s %ScriptChoice $replace(%ScriptChoiceNum,2,Paper,1,Rock,0,Scissors) |
can't that be changed to
| Code: |
var -s %PlayerChoice $2, -s %PlayerChoiceNum $replace(%PlayerChoice,Paper,2,Rock,1,Scissors,0), -s %ScriptChoiceNum $rand(0,2), -s %ScriptChoice $replace(%ScriptChoiceNum,2,Paper,1,Rock,0,Scissors) |
mIRC Snippet:
Rock Paper Scissors game
Posted on Jun 24, 2008 3:20 pm
Posted on Jun 24, 2008 3:20 pm
what does the -s do? i've never seen one in a script...
mIRC Snippet:
Rock Paper Scissors game
Posted on Jun 30, 2008 11:32 am
Posted on Jun 30, 2008 11:32 am
-s echoes it back to status window, e.g.:
%PlayerChoice set to Rock
%PlayerChoice set to Rock









