[GIOCO] Zanzare Kill 0.1

« Older   Newer »
  Share  
Gianlu-thebest
CAT_IMG Posted on 6/5/2010, 14:58     +1   -1




xD non capisco come mi è venuto in mente di fare questa stupidaggine xD...

In questo gioco si devono cercare di acchiappare le zanzare cliiccandoci sopra xD
ci sono 3 livelli...
uno più difficile dell'altro..
per ogni zanzare uccisa ci sono due punti...
le immagini sono:
zanzara.bmp
SPOILER (click to view)
image


source:
SPOILER (click to view)
CODICE
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
;End Include

_GDIPlus_Startup()


$zanzara = @ScriptDir&"\images\zanzara.bmp"
$rac = @ScriptDir&"\images\racchetta.bmp"
$punti = 0
$avviato = False
$livello = 1
$ini = @ScriptDir&"\punti.ini"

If not FileExists($zanzara) Then Exitt(1)

;        Benvenuto

$benvenuto = GUICreate("Welcome to ZanZare Kill 0.1", 633, 102, 192, 124)
$benv = GUICtrlCreateLabel("Quante Volte le zanzare ti hanno punto?"&@CR&"Vuoi vendicarti??", 64, 16, 324, 37)
$vend = GUICtrlCreateButton("Vendicati!!!", 408, 24, 201, 49, 0)

GUISetState()

While 1
       $nMsg = GUIGetMsg()
       Switch $nMsg
               Case $GUI_EVENT_CLOSE
                       Exit
               Case $vend
                       Vendicati()
       EndSwitch
WEnd

Func Vendicati()
       $Gui = GUICreate("Zanzare Kill 0.1", 673, 490, 302, 218)
       $Group1 = GUICtrlCreateGroup("Comandi", 8, 8, 649, 73)
       $go = GUICtrlCreateButton("Inizia", 24, 32, 75, 25, 0)
       $stop = GUICtrlCreateButton("Stop", 104, 32, 75, 25, 0)
       $exit = GUICtrlCreateButton("Esci", 184, 32, 75, 25, 0)
       $save = GUICtrlCreateButton("Salva punteggio", 264, 32, 99, 25, 0)
       GUICtrlCreateLabel("Punteggio: ", 396, 38, 58, 17)
       Global $lpunti = GUICtrlCreateLabel("0", 464, 38, 100, 22)
       GUICtrlSetFont(-1, 19, 400, 0, "Visitor TT2 (BRK)")
       GUICtrlCreateGroup("", -99, -99, 1, 1)
       $Group2 = GUICtrlCreateGroup("Gioco:", 8, 96, 649, 377)
       GUICtrlCreateGroup("", -99, -99, 1, 1)
       Global $image = GUICtrlCreatePic("",25,100,100,100)
       GUISetState(@SW_HIDE,$benvenuto)
       GUISetState(@SW_SHOW,$Gui)

       While 1
               $nMsg = GUIGetMsg()
               Switch $nMsg
                       Case $GUI_EVENT_CLOSE
                               stop()
                               Exit
                       Case $go
                               login()
                               If $cmdline[0] = 1 Then
                                       trucchi()
                               EndIf
                       Case $image
                               If $avviato = True Then
                                       $punti += 2
                                       printp()
                               EndIf
                       Case $stop
                               stop()
                       Case $exit
                               stop()
                               Exit
                       Case $save
                               salva()
               EndSwitch
       WEnd
       ;End
EndFunc


Func exitt($cod)
       If $cod = 1 Then
               MsgBox(48,"Errore","Mancano i file necessari per far funzionare il programma")
               Exit
       Else
               salva()
               Exit
       EndIf
EndFunc

Func salva()
       IniWrite($ini,"punteggio","migliore",$punti)
       If Not @error Then
               MsgBox(64,"Salvato :)","Punteggio salvato :)",3)
       Else
               MsgBox(48,"Errore nel salvataggio del punteggio","Errore nel salvataggio del punteggio")
       EndIf
EndFunc

Func zanzare($file = $zanzara, $zabz = $image)
       Local $pos = Random(0,400), $pos2 = Random(60,490)
       If IsDeclared("zabz") <> -1 Then
               $zabz = $image
       EndIf
       GUICtrlSetImage($zabz,$zanzara)
       ControlMove("","",$zabz,$pos,$pos2)
EndFunc

Func trucchi()
       $F1 = GUICreate("Trucchi - Cheat", 633, 115, 192, 124)
       $Button1 = GUICtrlCreateButton("Add Score", 16, 8, 593, 41, 0)
       $Button2 = GUICtrlCreateButton("Save false score ( 1.000.000 of points)", 16, 56, 595, 41, 0)
       GUISetState(@SW_SHOW)

       While 1
               $nMsg = GUIGetMsg()
               Switch $nMsg
                       Case $GUI_EVENT_CLOSE
                               ExitLoop
               EndSwitch
       WEnd
EndFunc


Func printp($lab=$lpunti)
       GUICtrlSetData($lab,$punti)
EndFunc

Func login()
       Global $avviato = True
       GUICtrlSetCursor($image,$rac)
       zanzare($zanzara,$image)
       AdlibRegister("zanzare",1000)
       AdlibRegister("checkLevel")
EndFunc        

Func checklevel()
       If $livello = 1 And $punti > 50 Then
               livellosuccessivo()
       ElseIf $livello = 2 And $punti > 80 Then
               livellosuccessivo()
       Elseif $livello = 3 And $punti > 150 Then
               campione()
       EndIf
EndFunc

Func livellosuccessivo()
       AdlibUnRegister("zanzare")
       If $livello = 1 Then
               $livello += 1
               MsgBox(64,"Livello successivo","Complimeti, hai superato il primo livello!")
               AdlibRegister("zanzare",700)
       ElseIf $livello = 2 Then
               $livello += 1
               MsgBox(64,"Livello successivo","Complimeti, hai superato il secondo livello!")
               AdlibRegister("zanzare",400)
       EndIf
EndFunc

Func campione()
       MsgBox(64,"Complimenti","Complimenti, Sei il campione!"&@CR&"Il tuo punteggio è "&$punti&" punti.")
       stop()
EndFunc

Func stop()
       AdlibUnRegister("zanzare")
       AdlibUnRegister("checklevel")
       MsgBox(64,"Punteggio","Il tuo punteggio è di: "&$punti)
       GUICtrlSetImage($image,"")
       GUICtrlSetData($lpunti,0)
       $punti = 0
       salva()
EndFunc


download: http://autoitprograms.altervista.org/Zanza...zareKill0.1.rar

Edited by Gianlu-thebest - 6/5/2010, 16:21
 
Top
Aaly
CAT_IMG Posted on 6/5/2010, 15:03     +1   -1




Carino, ma a me dice che mancano i file necessari per far partire il programma
 
Top
Gianlu-thebest
CAT_IMG Posted on 6/5/2010, 15:05     +1   -1




Scarica il file e mettilo in images\zanzare.bmp
nell cartella dello script
 
Top
Aaly
CAT_IMG Posted on 6/5/2010, 15:28     +1   -1




Bellùù
 
Top
ACIDBURN16
CAT_IMG Posted on 6/5/2010, 15:51     +1   -1




Bello, a morte le zanzare xD
 
Top
xdmisterx
CAT_IMG Posted on 6/5/2010, 16:35     +1   -1




lollissimo xD
 
Top
Kurt_Black_hat 2.0
CAT_IMG Posted on 6/5/2010, 16:49     +1   -1




Mi alleno per quest'estate :D xD
 
Top
MHack
CAT_IMG Posted on 6/5/2010, 17:00     +1   -1




Troppo crudele! Mhuahahahaha! Lollolissimamentelolloso XD
 
Top
ACIDBURN16
CAT_IMG Posted on 6/5/2010, 17:54     +1   -1




CITAZIONE (MHack @ 6/5/2010, 18:00)
Troppo crudele! Mhuahahahaha! Lollolissimamentelolloso XD

crudele quando ti pungono xD, ripeto a morte le zanzare :D
 
Top
Gianlu-thebest
CAT_IMG Posted on 6/5/2010, 18:35     +1   -1




Ahah xD Sono troppo contento che vi piaccia :)
 
Top
-Anubi-
CAT_IMG Posted on 15/5/2010, 16:57     +1   -1




NOOOOOOO ! Povere zanzare ! Assassini ( Vedi chi parla xD )
 
Top
ACIDBURN16
CAT_IMG Posted on 15/5/2010, 17:53     +1   -1




CITAZIONE (-Anubi- @ 15/5/2010, 17:57)
NOOOOOOO ! Povere zanzare ! Assassini ( Vedi chi parla xD )

ASSASSINI UN CORNO :D
 
Top
Gianlu-thebest
CAT_IMG Posted on 15/5/2010, 21:30     +1   -1




Non andate troppo OT
 
Top
EnigmaCJ™
CAT_IMG Posted on 15/5/2010, 22:03     +1   -1




Mi da errore sulla linea 136...
 
Top
Gianlu-thebest
CAT_IMG Posted on 15/5/2010, 22:23     +1   -1




In allegato la vers. corretta

Download attachment
Zanzare_Kill.rar ( Number of downloads: 30 )

 
Top
14 replies since 6/5/2010, 14:58   210 views
  Share