Vindicator209 Posted October 13, 2006 Share Posted October 13, 2006 (edited) Haha, another one of these button games, except this one tests your reflexes, well sort of... expandcollapse popup;Thanks to: ;SmOke_N ;SkiFreak ;Xenoqis ;for helping fix a small problem... #include <GuiConstants.au3> Dim $seconds, $allow, $time, $timer GuiCreate("GUI", 115, 52,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor ( 0xff0000 ) $Button_1 = GuiCtrlCreateButton("<DONT CLICK>", 10, 10, 90, 30) GuiSetState(@SW_SHOW) GuiSetState() $allow=1 $2=Random(5000,10000,1) AdlibEnable("_EnableButton",$2) While 1 $msg = GuiGetMsg() Select Case $msg = $Button_1 Switch GuiCtrlRead($Button_1) Case $allow=1 MsgBox(0,"STOP!","You clicked too soon! try again!",5) Exit Case $allow = 0 $timer = TimerDiff($time) $seconds = Round($timer/1000,2) MsgBox(0,"Your Reflex time!","Your reflex time is:" & $seconds) If $seconds < .1 Then MsgBox(0,"Your Reflex time!","GREAT! You are ranked: CHAMPION") Exit EndIf If $seconds < .2 Then MsgBox(0,"Your Reflex time!","WOW... You are ranked: FAST") Exit EndIf If $seconds < .3 Then MsgBox(0,"Your Reflex time!","Wow! You are ranked: SPEEDY") Exit EndIf If $seconds < .4 Then MsgBox(0,"Your Reflex time!","Great! You are ranked: OKAY") Exit EndIf If $seconds < .5 Then MsgBox(0,"Your Reflex time!","HORRIBLE! You are ranked: S L O W") Exit EndIf If $seconds > .5 Then MsgBox(0,"Your Reflex time!","HORRIBLE! You are so slow, I wont even give you a rank!") Exit EndIf EndSwitch Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Func _EnableButton() GUISetBkColor ( 0x00ff00 ) GUICtrlSetData($Button_1,"<CLICK>") $allow=0 $time = TimerInit() EndFunc I got .29, anyone beat me? haha Edited October 13, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
this-is-me Posted October 13, 2006 Share Posted October 13, 2006 Who else would I be? Link to comment Share on other sites More sharing options...
CoderDunn Posted October 13, 2006 Share Posted October 13, 2006 (edited) best i got was 0.29 Edited October 13, 2006 by Hallman Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 13, 2006 Author Share Posted October 13, 2006 (edited) hah.. its pretty hard, I wanted the button actually to be red, and change green when you can click it, so it hits your brain faster, but I didnt know how to do it so.. yea ahh, I got 0.27 now, but I fond a way to sorta cheat, you can HOLD the button down and let go when it says click, it saves you about 3 centiseconds, lol Edited October 13, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
NELyon Posted October 13, 2006 Share Posted October 13, 2006 (edited) .29.25 Edited October 13, 2006 by codemyster Link to comment Share on other sites More sharing options...
zcoacoaz Posted October 13, 2006 Share Posted October 13, 2006 (edited) hah.. its pretty hard, I wanted the button actually to be red, and change green when you can click it, so it hits your brain faster, but I didnt know how to do it so.. yeawhy not do this?expandcollapse popup;Thanks to: ;SmOke_N ;SkiFreak ;for helping fix a small problem... #include <GuiConstants.au3> Dim $seconds, $allow, $time, $timer GuiCreate("GUI", 115, 52,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor ( 0xff0000 ) $Button_1 = GuiCtrlCreateButton("<DONT CLICK>", 10, 10, 90, 30) GuiSetState(@SW_SHOW) GuiSetState() $allow=1 $2=Random(5000,10000,1) AdlibEnable("_EnableButton",$2) While 1 $msg = GuiGetMsg() Select Case $msg = $Button_1 Switch GuiCtrlRead($Button_1) Case $allow=1 MsgBox(0,"STOP!","You clicked too soon! try again!",5) Exit Case $allow = 0 $timer = TimerDiff($time) $seconds = Round($timer/1000,2) MsgBox(0,"Your Reflex time!","Your reflex time is:" & $seconds) If $seconds < .1 Then MsgBox(0,"Your Reflex time!","GREAT! You are ranked: CHAMPION") Exit EndIf If $seconds < .2 Then MsgBox(0,"Your Reflex time!","WOW... You are ranked: FAST") Exit EndIf If $seconds < .3 Then MsgBox(0,"Your Reflex time!","Wow! You are ranked: SPEEDY") Exit EndIf If $seconds < .4 Then MsgBox(0,"Your Reflex time!","Great! You are ranked: OKAY") Exit EndIf If $seconds < .5 Then MsgBox(0,"Your Reflex time!","HORRIBLE! You are ranked: S L O W") Exit EndIf If $seconds > .5 Then MsgBox(0,"Your Reflex time!","HORRIBLE! You are so slow, I wont even give you a rank!") Exit EndIf EndSwitch Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Func _EnableButton() GUISetBkColor ( 0x00ff00 ) GUICtrlSetData($Button_1,"<CLICK>") $allow=0 $time = TimerInit() EndFunc edit: woot! 800 posts Edited October 13, 2006 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 13, 2006 Author Share Posted October 13, 2006 heh, cool, ill add that [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
phantom Posted November 18, 2006 Share Posted November 18, 2006 Thats my best. Link to comment Share on other sites More sharing options...
_Kurt Posted November 18, 2006 Share Posted November 18, 2006 (edited) 0.24 here EDIT: 0.23 now EDIT: 0.19 !!!!! Skilled Edited November 18, 2006 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Achilles Posted November 18, 2006 Share Posted November 18, 2006 (edited) 0.24 here EDIT: 0.23 now EDIT: 0.19 !!!!! Skilled I used to think .25 was good.... Nice KurtEDIT: Nice game MethodZero! Edited November 18, 2006 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 18, 2006 Share Posted November 18, 2006 (edited) woo .23.2almost have the top score, this would be alot easier with a bot.19 tied Edited November 18, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
jvanegmond Posted November 18, 2006 Share Posted November 18, 2006 15ms , you can hold your mouse button, or use tab -> spacebar and keep it pressed down, and release it when you see the green. That will definately improve your time. github.com/jvanegmond Link to comment Share on other sites More sharing options...
clearguy Posted November 18, 2006 Share Posted November 18, 2006 (edited) I got .27...Bam! 13!!!!Beat that H-how?!?!?!?!?EDITNow .22 thanx to Manadar's tip Edited November 18, 2006 by clearguy I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
dandymcgee Posted November 18, 2006 Share Posted November 18, 2006 (edited) Wow! wtf? I have no idea how I did that... I did something to mess it up though. I was playing around with the space bar and i ended up getting a .3 for score but then i hit spacebar again really fast and the .3 msgbox disappeared and new one popped up saying i got a .9, then when i hit spacebar again the .9 msgbox went away and it said my rank was champion. I hit spacebar again and the program closed. that was really wierd, and I can't seem to do it again. Anyways my high score is .17 without a bot, and .3 with a bot. HINT: Another way to help your reflexes is to maximize the window (I don't know if MethodZero purposly made a maximizable window or not, but it helps to have your entire screen change color rather than that small little gui). EDIT: Okay, here is my epileptic version of it (as you can tell from my sig I like blinking things, and this also makes it a bit harder): expandcollapse popup;Thanks to: ;SmOke_N ;SkiFreak ;Xenoqis ;for helping fix a small problem... ;Edited by: Dandymcgee #include <GuiConstants.au3> Dim $seconds, $allow, $time, $timer, $Current_CTime, $count, $color, $Colors GuiCreate("GUI", 115, 52,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor ( 0xff0000 ) $Button_1 = GuiCtrlCreateButton("<DONT CLICK>", 10, 10, 90, 30) $allow = 1 $Colors = TimerInit() $count = 0 $random = 300 $color = 1 $2=Random(5000,10000,1) AdlibEnable("_EnableButton",$2) GuiSetState() While 1 $Current_CTime = TimerDiff($Colors) If $allow = 1 And $Current_CTime > $count + $random Then If $color = 1 Then GUISetBkColor ( 0x0000ff ) $color = 3 ElseIf $color = 2 Then GUISetBkColor ( 0xff0000 ) $color = 4 ElseIf $color = 3 Then GUISetBkColor ( 0xff00ff ) $color = 2 ElseIf $color = 4 Then GUISetBkColor ( 0xffff00 ) $color = 1 EndIf $count = $count + 800 $random = Random(100, 800) EndIf $msg = GuiGetMsg() Select Case $msg = $Button_1 Switch GuiCtrlRead($Button_1) Case $allow=1 MsgBox(0,"STOP!","You clicked too soon! try again!",5) Exit Case $allow = 0 $timer = TimerDiff($time) $seconds = Round($timer/1000,2) MsgBox(0,"Your Reflex time!","Your reflex time is:" & $seconds) If $seconds < .1 Then MsgBox(0,"Your Reflex time!","GREAT! You are ranked: CHAMPION") Exit EndIf If $seconds < .2 Then MsgBox(0,"Your Reflex time!","WOW... You are ranked: FAST") Exit EndIf If $seconds < .3 Then MsgBox(0,"Your Reflex time!","Wow! You are ranked: SPEEDY") Exit EndIf If $seconds < .4 Then MsgBox(0,"Your Reflex time!","Great! You are ranked: OKAY") Exit EndIf If $seconds < .5 Then MsgBox(0,"Your Reflex time!","HORRIBLE! You are ranked: S L O W") Exit EndIf If $seconds > .5 Then MsgBox(0,"Your Reflex time!","HORRIBLE! You are so slow, I wont even give you a rank!") Exit EndIf EndSwitch Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Func _EnableButton() GUISetBkColor ( 0x00ff00 ) GUICtrlSetData($Button_1,"<CLICK>") $allow = 0 $time = TimerInit() EndFunc EDIT: WOW! OMG! I just let my sister play the epileptic version... she got 0.02!!!!!!!!!!!!! She saw the yellow and let go, but it turned to green before it knew the button had been pressed. I'm putting this screenshot online in honor of my 14 year old sister MASTER OF REFLEX!!!! (Pretty embarrassing when she beats my bot's score of 0.03) Edited November 19, 2006 by dandymcgee - Dan [Website] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 19, 2006 Share Posted November 19, 2006 .03 with a bot Link to comment Share on other sites More sharing options...
dandymcgee Posted November 19, 2006 Share Posted November 19, 2006 Lol I edited my post. NOBODY HERE CAN BEAT MY SISTER!!!!! She seriously did that with the spacebar... freakin ridiculous! - Dan [Website] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now