#include $dll = DllOpen("user32.dll") $compte = 0 $si = 0 $x = @DesktopWidth / 2 $y = @DesktopHeight / 2 -200 $a = 0 $p = 0 GUICreate("Tapez A et P pour jouer",@DesktopWidth,@DesktopHeight,1,1) GUISetState() $pas = InputBox("Jeu","Choisissez la difficulté du jeu:" & @CRLF & "Plus le chiffre est bas, plus il faut etre sportif pour gagner.",'16') $antitriche = InputBox("Jeu","Voulez Vous Activer le mode anti triche?" & @CRLF & "1 Pour Oui, 0 pour Non.",'1') Sleep(1000) SplashTextOn ( "", "3" , 100 , 80 , -1 , -1, 1 , "" , 48) Sleep(1000) SplashTextOn ( "", "2" , 100 , 80 , -1 , -1, 1 , "" , 48) Sleep(1000) SplashTextOn ( "", "1" , 100 , 80 , -1 , -1, 1 , "" , 48) Sleep(1000) SplashTextOn ( "", "0" , 100 , 80 , -1 , -1, 1 , "" , 48) Sleep(1000) SplashOff( ) While 1 $t = TimerInit( ) If _IsPressed( "41", $dll) Then While _IsPressed( "41", $dll) If $t >= 2000 And $antitriche Then $x = $x - 1 Sleep(10) WEnd $x = $x + $pas $a = $a + 1 EndIf If _IsPressed( "50", $dll) Then While _IsPressed( "50", $dll) If $t >= 2000 And $antitriche Then $x = $x + 1 Sleep(10) WEnd $x = $x - $pas $p = $p + 1 EndIf SplashImageOn("",@ScriptDir &"\1.bmp",1,200,$x,$y, 1) ;SplashTextOn("","",1,200,$x,$y, 1) If $x <= 0 then SplashOff() msgbox(64,"","Joueur 'p' a gagné" & @CRLF &"avec "& $p & " touches. " &@CRLF & "Le joueur 'a' a perdu avec "&$a & " touches." ) Exit EndIf If $x >= @DesktopWidth then SplashOff() msgbox(64,"","Joueur 'a' a gagné" & @CRLF &"avec "& $a & " touches. " &@CRLF & "Le joueur 'p' a perdu avec "&$p & " touches." ) Exit EndIf Sleep(1) WEnd Func p() EndFunc