on *:TEXT:!setgame*:#:{ if (%game == on) { /notice $nick There is a game already. Please wait | halt }
else { if ($nick == iZezirna) {
/msg $chan $nick has just started a new game! type !hint1 for hint 1 , !hint2 for hint 2 , !hint3 for hint 3 . You have 5 guesses till the game ends.
set %game on
set %answer $2
set %hint1 $3
set %hint2 $4
set %hint3 $5
}
}
}
on *:TEXT:!hint1:#:{ /msg $chan Hint number one is : %hint1 }
on *:TEXT:!hint2:#:{ /msg $chan Hint number two is : %hint2 }
on *:TEXT:!hint3:#:{ /msg $chan Hint number three is : %hint3 }
on *:TEXT:!endgame:#:{ if ($nick == iZezirna) {
msg $chan $nick has just ended the game ! The answer was %answer $+ .
unset %game on
unset %answer
unset %hint1
unset %hint2
unset %hint3
}
}
on *:Text:!guess*:#: {
if ($2 == %answer) {
msg $chan $nick has just got the answer! it was %answer
else {
if (%guess [ $+ [ $address($nick,2) ] ] == $null) {
set %guess [ $+ [ $address($nick,2) ] ] 0
}
if (%guess [ $+ [ $address($nick,2) ] ] != $null) {
inc %guess [ $+ [ $address($nick,2) ] ] 1
}
if (%guess [ $+ [ $address($nick,2) ] ] == 1) {
msg $chan Wrong! Remmeber you only have 5 chances!
}
if (%guess [ $+ [ $address($nick,2) ] ] == 2) {
msg $chan Wrong! Remmeber you only have 5 chances!
}
if (%guess [ $+ [ $address($nick,2) ] ] >= 3) {
msg $chan Wrong! Remmeber you only have 5 chances!
}
if (%guess [ $+ [ $address($nick,2) ] ] >= 4) {
msg $chan Wrong! Remmeber you only have 5 chances!
}
if (%guess [ $+ [ $address($nick,2) ] ] >= 5) {
msg $chan Wrong! The answer was %answer $+ .
}
unset %game on
unset %answer
unset %hint1
unset %hint2
unset %hint3
unset %guess
}
}
}