Hello!
I tried to wright a Rock Paper Scissors script. That i wanted to do like this, Ill give u an example on how
[OP player]: !rps jane lars cat
Bot: jane vs lars - a cat in pot - Please /msg Bot !rock, !paper or !scissors now!
jane:/msg bot !rock
lars:/msg bot !paper
Bot: lars wins the cat over jane with paper against rock
Heres what ive written:
alias -l applyaction {
msg %rollchan STATUS $2 : $3 : %roller1 : %roller2 : %roll1 : %roll2
if ($2 == %roller1) {
set %roll1 $3
}
elseif ($2 == %roller2) {
set %roll2 $3
}
elseif (%rollchan != $null) { kick %rollchan $2 It is not your turn to play this game! }
if ((%roll1 != $null) && (%roll2 != $null)) {
if (%roll1 == %roll2) {
msg %rollchan Duel between %roller1 and %roller2 was a draw, both using %roll1
unset %*roll*
}
elseif (((%roll1 == rock) && (%roll2 == scissors)) || ((%roll1 == scissors) && (%roll2 == paper)) || ((%roll1 == paper) && (%roll2 == rock))) {
msg %rollchan %roller1 wins the %rollpot over %roller2 with %roll1 against %roll2
unset %*roll*
}
else {
msg %rollchan %roller2 wins the %rollpot over %roller1 with %roll2 against %roll1
unset %*roll*
}
}
}
on *:TEXT:!rps*:if ($nick isop $chan) {
if (($2 != $null) && ($3 != $null) && ($4 != $null)) {
set %roller1 $2
set %roller2 $3
set %rollpot $4
set %rollchan $chan
msg $chan %roller1 vs %roller2 - a %rollpot in Pot - Please /msg $me !rock, !paper or !scissors now!
}
}
}
on *:TEXT:!rock:?:{ applyaction $nick rock }
on *:TEXT:!paper:?:{ applyaction $nick paper }
on *:TEXT:!scissors:?:{ applyaction $nick scissors }
on *:NOTICE:!rock:?:{ applyaction $nick rock }
on *:NOTICE:!paper:?:{ applyaction $nick paper }
on *:NOTICE:!scissors:?:{ applyaction $nick scissors }
But when i come to the part where the roller1 and roller2 types !rock or !paper or ! scissors the bot sends a message that everyone can read even the oppoment before choosing self...;
STATUS rock : : roller1 : boten : :
I would like it to hidd this text somehow. And after that when it has both players haved choosed it will say who won.
And then one more thing
Is it possible to make the bot text with Bold. Like this text:
Bot:
lars wins the cat over jane with paper against rockThanks!
Dear // Ludvig!