wizard1970 Posted July 31, 2008 Report Share Posted July 31, 2008 how i put a timer is this game, lets say.....1 minute i want put a timer like this ""msg $chan $nick has started a cookie guessing game! guess by saying !cg NUMBER, you have 1 minute"" thanks on *:TEXT:!cguess*:#:{ if (%numberzz == $null) goto this if (%numberzz != $null) goto that :this msg $chan $nick has started a cookie guessing game! guess by saying !cg NUMBER. set %numberzz $rand(0,100) echo 3 -a %numberzz .notice Sephiroth1n6 the answer is %numberzz halt :that .notice $nick a game is in progress. please wait until the game is over, or you could just type !stopcookie halt } on *:TEXT:!stopcookie*:#:{ if (%numberz != $null) goto not if (%numberz == $null) goto yup :not msg $chan Cookie Guessing Stopped By $nick $+ . The Answer Was %numberz $+ . unset %numberzz halt :yup .notice $nick There Is Currently No Game In Progress. halt } on *:TEXT:!cg *:#:{ if ($2 > %numberzz) goto greater if ($2 < %numberzz) goto lesser if ($2 == %numberzz) goto equal if (%numberzz == $null) goto whom else goto what :greater msg $chan $nick $+ , That Answer Was Wrong! But Keep Guessing. Try a Lower Number! halt :lesser msg $chan $nick $+ , That Answer Was Wrong! But Keep Guessing. Try a Higher Number! halt :equal msg $chan $nick Guessed The Correct Number of cookies, %numberzz and gets to eat them all!!! unset %numberzz halt :what halt :whom .notice $nick there is currently no game in progress. Type !cguess to start a game. halt } Link to comment Share on other sites More sharing options...
Guest Travis Posted July 31, 2008 Report Share Posted July 31, 2008 Set a 60 second timer that does this. msg $chan Game Over Unset %numberzz Link to comment Share on other sites More sharing options...
wizard1970 Posted July 31, 2008 Author Report Share Posted July 31, 2008 (edited) Where i put this? :noidea: Edited July 31, 2008 by wizard1970 Link to comment Share on other sites More sharing options...
Guest Travis Posted July 31, 2008 Report Share Posted July 31, 2008 (edited) on *:TEXT:!cguess*:#:{ if (%numberzz == $null) goto this if (%numberzz != $null) goto that :this msg $chan $nick has started a cookie guessing game! guess by saying !cg NUMBER. You have 1 minute to guess. timercg 1 60 /cg_stop $chan set %numberzz $rand(0,100) echo 3 -a %numberzz .notice Sephiroth1n6 the answer is %numberzz halt :that .notice $nick a game is in progress. please wait until the game is over, or you could just type !stopcookie halt } on *:TEXT:!stopcookie*:#:{ if ($timer(cg)) { timercg off } if (%numberz != $null) goto not if (%numberz == $null) goto yup :not msg $chan Cookie Guessing Stopped By $nick $+ . The Answer Was %numberz $+ . unset %numberzz halt :yup .notice $nick There Is Currently No Game In Progress. halt } on *:TEXT:!cg *:#:{ if ($2 > %numberzz) goto greater if ($2 < %numberzz) goto lesser if ($2 == %numberzz) goto equal if (%numberzz == $null) goto whom else goto what :greater msg $chan $nick $+ , That Answer Was Wrong! But Keep Guessing. Try a Lower Number! halt :lesser msg $chan $nick $+ , That Answer Was Wrong! But Keep Guessing. Try a Higher Number! halt :equal msg $chan $nick Guessed The Correct Number of cookies, %numberzz and gets to eat them all!!! unset %numberzz .timercg off halt :what halt :whom .notice $nick there is currently no game in progress. Type !cguess to start a game. halt } alias cg_stop { msg $1 Game Over unset %numberzz } This isn't tested. Edited July 31, 2008 by Travis Link to comment Share on other sites More sharing options...
wizard1970 Posted July 31, 2008 Author Report Share Posted July 31, 2008 well the timer it works fine but the message the end of the game not appears msg $1 Game Over Link to comment Share on other sites More sharing options...
Guest Travis Posted August 1, 2008 Report Share Posted August 1, 2008 timer sends the channel name as $1. I dont know your server. If the room names start with % you can try removing the % and adding it when you join. Link to comment Share on other sites More sharing options...
wizard1970 Posted August 1, 2008 Author Report Share Posted August 1, 2008 now it works thanks travis for you help Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted August 1, 2008 Report Share Posted August 1, 2008 This topic has been resolved. If anyone needs it reopened, PM a global mod or admin. Link to comment Share on other sites More sharing options...
Recommended Posts