Guessing game
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 4.0 (of 1 scores) |
| Date Added | Sep 13, 2007 |
| Last Updated | Sep 14, 2007 |
Introduction
Usage:
!neword
Starts a new game. Message your bot using the following format:
; new word (word)
; new hint1 (first hint)
; new hint2 (second hint)
!startgame
Starts the game
!guessword
!guessword (word)
!stopguess
ends the game
Notes:
When loading this into your bot's remotes. Type: /set %owner (etc)
Thank you simplicity for helping me improve my snippet.
mIRC Snippet:
Guessing game
Posted on Sep 13, 2007 5:15 pm
Posted on Sep 13, 2007 5:15 pm
You have a few errors:
The timers do not turn off when the word is said or the stopguess occurs.
If you do not have halfop or op you will receive an error.
I edited your code a bit. I fixed the timers by adding a .timersay off. Try this:
Otherwise, not bad. I recommend a little more work put into this. Maybe use a text file to read different words or make it into something bigger such as a scramble game.
The timers do not turn off when the word is said or the stopguess occurs.
If you do not have halfop or op you will receive an error.
I edited your code a bit. I fixed the timers by adding a .timersay off. Try this:
| Code: |
on *:TEXT:*:#:{ if ($1 = !guessword) && ($gettok(%gamestatus,1,32)) { if ($2 = %word) { set %win on msg $chan $nick has won the game! if ($nick !isvo $chan) && ($me isop $chan) { mode # +v $nick } .timersay off halt } } if ($1 = !stopguess) && ($gettok(%gamestatus,1,32) = on) { unset %gamestatus msg $chan Guessing game has been stopped. .timersay off } if ($1 = !startgame) && (!$gettok(%gamestatus,1,32)) { unset %hintstatus unset %win set %gamestatus on msg $chan Guessing game has started. .timersay 1 5 msg $chan Hint: %hint1 if (%win != on) { .timersay 1 30 msg $chan Hint: %hint2 .timersay 1 50 msg $chan Sorry, your time is up! The word was %word $+ . } } if ($1 = !neword) && ($nick iswm %owner) { msg $nick Please enter your word and hints. } } on *:TEXT:*:?:{ if ($1 = new) { if ($2 = word) set %word $3 if ($2 = hint1) set %hint1 $3 if ($2 = hint2) set %hint2 $3 } } |
Otherwise, not bad. I recommend a little more work put into this. Maybe use a text file to read different words or make it into something bigger such as a scramble game.


