Find
You are looking at a card shark
To play simply say one of these:
say rock
say scissors
say paper
Created by
wolis
, last updated 31 Jan 2015
Code
##sxay:runsub whattodo;
##examines:runsub
##whattodo:instructions;
var $mychoice to (rock,scissors,paper);
if $init_cmd like $mychoice then adraw else chk0;
##chk0:
if "(rock|scissors|paper)" like $init_cmd then chk1 else instructions;
##chk1:
var $combo to "$mychoice $init_cmd";
if $combo like rock scissors then iwin else chk2;
##chk2:
if $combo like paper rock then iwin else chk3;
##chk3:
if $combo like scissors paper then iwin else playerwin;
##iwin:
say 'result',"[$actor] says 'I chose $mychoice so I win! $mychoice beats $init_cmd'";
##playerwin:
say 'result',"[$actor] says 'I chose $mychoice so You win! $init_cmd beats $mychoice'";
##adraw:
say 'result',"[$actor] says 'I chose $mychoice so we draw, we both chose $mychoice'";
##instructions:
say 'info',"[$actor] says 'If you want to play Rock,Scissors,Paper with me, just say your choice, I will make my choice then say who won";
##end;