|
Option Explicit
Dim iConta As Integer
Dim lPunteggio As Integer
Dim iConta1 As Integer
Dim X As Integer
Dim X1 As Integer
Dim X2 As Integer
Dim iConta2 As Integer
Private Sub Form_Load()
Randomize
End Sub
Private Sub lblSend_Click()
Dim Nick As String
Dim X As Long
Nick = InputBox("Inserisci un nickname:", "NICK")
If Nick = "" Then Exit Sub
X = ShellExecute(hWnd, "Open", "http://otrebor6.altervista.org/punti.php?punti=" & "Punteggio: " & lblPunti.Caption & " Nickname: " & Nick, vbNullString, vbNullString, SW_NORMAL)
End Sub
Private Sub mnuFileEsci_Click()
'Termino il programma
End
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
End
End Sub
Private Sub Image1_Click()
MsgBox "http://www.forrestwalter.com/"
End Sub
Private Sub lblRiprendi_Click()
PlaySound App.Path & "\Allarme.wav", 0, SND_FILENAME Or SND_SYNC
lblL1.Top = 120
lblL2.Top = 120
lblL3.Top = 120
txtTesto.Text = ""
txtTesto2.Text = ""
txtTesto3.Text = ""
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Timer4.Enabled = True
lblRiprendi.Visible = False
lblSupporto.Visible = False
lblSupportoAereo.Visible = False
End Sub
Private Sub lblSupporto_Click()
PlaySound App.Path & "\Mitra.wav", 0, SND_FILENAME Or SND_SYNC
X = X - 3
X1 = X - 3
X2 = X2 - 3
lblLivello.Caption = "Aiuto eseguito, velocità diminuita"
ProgressBar1.Value = ProgressBar1.Value - 15
lPunteggio = lPunteggio - 150
lblSupporto.Visible = False
End Sub
Private Sub lblSupportoAereo_Click()
PlaySound App.Path & "\Aereo che passa.wav", 0, SND_FILENAME Or SND_SYNC
X = X - 4
X1 = X - 4
X2 = X2 - 4
lblLivello.Caption = "Aiuto eseguito, velocità diminuita"
ProgressBar1.Value = ProgressBar1.Value - 20
lPunteggio = lPunteggio - 300
lblSupportoAereo.Visible = False
End Sub
Private Sub mnuFileGo_Click()
iConta2 = 0
X = 0
X2 = 0
X1 = 0
lPunteggio = 0
iConta = 0
lblLivello.Caption = "By Roberto VB"
lblL1.Top = 120
lblL2.Top = 120
lblL3.Top = 120
ProgressBar1.Value = 0
txtTesto.Text = ""
txtTesto2.Text = ""
txtTesto3.Text = ""
lblSend.Visible = False
chkSupporto.Value = 0
' Mette in ordine casuale le parole
Dim parole
parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
Randomize
lblL1.Caption = parole(Rnd() * 40)
parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
Randomize
lblL2.Caption = parole(Rnd() * 40)
parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
Randomize
lblL3.Caption = parole(Rnd() * 40)
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Timer4.Enabled = True
txtTesto.Visible = True
txtTesto2.Visible = True
txtTesto3.Visible = True
lblLivello.Visible = True
txtTesto.SetFocus
mnuFileGo.Enabled = False
End Sub
Private Sub mnuHelpAbout_Click()
frmAbout.Show 1
End Sub
Private Sub mnuHelpHowplay_Click()
frmhelp.Show 1
End Sub
Private Sub mnuWebSegnalabug_Click()
Dim X As Long
X = ShellExecute(hWnd, "Open", "http://otrebor6.altervista.org/bugsparole.html", vbNullString, vbNullString, SW_NORMAL)
End Sub
Private Sub Timer1_Timer()
If lblL1.Top >= 5775 Then
Timer1.Enabled = False
End If
lblL1.Top = lblL1.Top + X
imgAereo1.Top = lblL1.Top + 300
If InStr(1, txtTesto.Text, lblL1.Caption) Then
lblL1.Top = 120
txtTesto.Text = ""
NuovoLivello
txtTesto2.SetFocus
End If
End Sub
Public Sub NuovoLivello()
'Randomizzo nuovamente tutte le parole
Dim parole
lPunteggio = lPunteggio + 50
lblPunti.Caption = lPunteggio
PlaySound App.Path & "\Distrutto.wav", 0, SND_FILENAME Or SND_SYNC
parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "topo", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "Dott.Rossi", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
Randomize
lblL1.Caption = parole(Rnd() * 40)
X = X + 1
iConta2 = iConta2 + 1
lblLivello.Caption = "Livello " & Str(iConta2)
ProgressBar1.Value = ProgressBar1.Value + 1
lblProgressbar.Caption = ProgressBar1.Value & "/100"
End Sub
Sub Pausa()
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
lblRiprendi.Visible = True
If ProgressBar1.Value <= 20 Then
lblSupporto.Visible = False
Else
lblSupporto.Visible = True
End If
If ProgressBar1.Value >= 30 Then
lblSupportoAereo.Visible = True
Else
lblSupportoAereo.Visible = False
End If
End Sub
Public Sub NuovoLivello2()
Dim parole
lPunteggio = lPunteggio + 50
lblPunti.Caption = lPunteggio
PlaySound App.Path & "\Distrutto.wav", 0, SND_FILENAME Or SND_SYNC
parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
Randomize
lblL2.Caption = parole(Rnd() * 40)
lblL2.Top = lblL2.Top + X1
X1 = X1 + 1
ProgressBar1.Value = ProgressBar1.Value + 1
lblProgressbar.Caption = ProgressBar1.Value & "/100"
End Sub
Public Sub NuovoLivello3()
Dim parole
lPunteggio = lPunteggio + 50
lblPunti.Caption = lPunteggio
PlaySound App.Path & "\Distrutto.wav", 0, SND_FILENAME Or SND_SYNC
parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
Randomize
lblL3.Caption = parole(Rnd() * 40)
lblL3.Top = lblL3.Top + X2
X2 = X2 + 1
ProgressBar1.Value = ProgressBar1.Value + 1
lblProgressbar.Caption = ProgressBar1.Value & "/100"
Select Case iConta2
Case Is = 4
Pausa
Case Is = 8
Pausa
Case Is = 12
Pausa
Case Is = 15
Pausa
Case Is = 21
Pausa
Case Is = 28
Pausa
Case Is = 33
Pausa
Case Is = 40
Pausa
Case Is = 48
Pausa
End Select
End Sub
Private Sub Timer2_Timer()
If lblL2.Top >= 5775 Then
Timer2.Enabled = False
End If
lblL2.Top = lblL2.Top + X1
imgAereo2.Top = lblL2.Top + 300
If InStr(1, txtTesto2.Text, lblL2.Caption) Then
lblL2.Top = 120
txtTesto2.Text = ""
NuovoLivello2
txtTesto3.SetFocus
End If
End Sub
Private Sub Timer3_Timer()
If lblL3.Top >= 5775 Then
Timer3.Enabled = False
End If
lblL3.Top = lblL3.Top + X2
imgAereo3.Top = lblL3.Top + 300
If InStr(1, txtTesto3.Text, lblL3.Caption) Then
lblL3.Top = 120
txtTesto3.Text = ""
NuovoLivello3
txtTesto.SetFocus
End If
End Sub
Private Sub Timer4_Timer()
If Timer1.Enabled = False And Timer2.Enabled = False And Timer3.Enabled = False Then
lblLivello.Caption = "Hai Totalizzato " & Str(lPunteggio) & " punti" & " in " & Str(iConta) & " secondi"
Timer4.Enabled = False
mnuFileGo.Enabled = True
lblSupporto.Visible = False
lblSend.Visible = True
End If
lblTime.Caption = Timer1.Interval / 1000
iConta = iConta + 1
lblTime.Caption = Str(iConta)
'Controllo la progressbar
Select Case ProgressBar1.Value
Case Is >= 20
If chkSupporto.Value = Checked Then lblSupporto_Click
Case Is <= 0
lblLivello.Caption = "Impossibile effettuare il supporto"
Case Is >= 100
lblLivello.Caption = "Allarme, è necessario il supporto"
Case Else
lblSupporto.Visible = False
End Select
End Sub
Private Sub txtTesto_GotFocus()
lblL1.ForeColor = vbRed
End Sub
Private Sub txtTesto_LostFocus()
lblL1.ForeColor = vbYellow
End Sub
Private Sub txtTesto2_GotFocus()
lblL2.ForeColor = vbRed
End Sub
Private Sub txtTesto2_LostFocus()
lblL2.ForeColor = vbYellow
End Sub
Private Sub txtTesto3_GotFocus()
lblL3.ForeColor = vbRed
End Sub
Private Sub txtTesto3_LostFocus()
lblL3.ForeColor = vbYellow
End Sub
|
|