Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($msg =~ m/^!rpsmode/i) {
- if ($msgtwo eq "fair") {
- $irc->yield(privmsg => $channel, "Okay. Fine, $nick, I'll be fair.");
- $rpsfair = "true";
- }
- if ($msgtwo eq "unfair") {
- $irc->yield(privmsg => $channel, "Hehehehe...");
- $rpsfair = "false";
- }
- else {
- $irc->yield(privmsg => $channel, "Please use the correct syntax.");
- }
- }
- if ($msg =~ m/^!rps/i) {
- if ($rpsfair eq "false") {
- if ($msgtwo eq "rock") {
- $irc->yield(privmsg => $channel, "Paper.");
- }
- elsif ($msgtwo eq "paper") {
- $irc->yield(privmsg => $channel, "Scissors.");
- }
- elsif ($msgtwo eq "scissors") {
- $irc->yield(privmsg => $channel, "Rock.");
- }
- elsif ($msgtwo eq "gun") {
- $irc->yield(kick => $channel => $nick => "Cheater.");
- }
- else {
- $irc->yield(privmsg => $channel, "Invalid.");
- }
- }
- else {
- @rpschoices = ("scissors","paper","rock");
- $rpsnum = int(rand(3));
- $rpschoice = "$rpschoices[$rpsnum]";
- $irc->yield(privmsg => $channel, "$rpschoice");
- if ($msgtwo != "@rpschoices") {
- $irc->yield(privmsg => $channel, "Invalid.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement