Buongiorno
avrei bisogno un aiuto da qualche programmatore o esperto di script.
Lo script qui sotto calcola le migliori ambate sommando 2 estratti.
Vorrei se possibile cercare con quali abbinamenti sono uscite le ambate.
Ho inserito la funzione abbinamenti ma non riesco a far calcolare gli abbinamenti migliori nel periodo scelto ad avvio script.
Grazie mille a chi mi può aiutare
Sub Main()
'SetColorSezione(vbBlack)
'EndColorSezione
Dim som(5,5,90),estr(2,5),Val(5,5,90),amb(90)
Dim r2,es,nmc,perc,ncg,ultest,n,z,nn,s,ru1,l,i,ru2,trovato,j,Valido,m,k2,k3,k,nv,zz,rv,aRetAbb,h
Dim pt(1)
pt(1) = 1
'r2 = InputBox("Inserisci la Ruota di Gioco):",,1)
rv = ScegliRuota
es = InputBox("Inserisci 0 per l'ultima, 1 la prima, ecc. (0-12):",,9)
nmc = InputBox("Numero di mesi da considerare:",,5)
perc = InputBox("Inserisci la percentuale (0-100):",,99)
ncg = InputBox("Inserisci il numero di colpi(0 per un mese):",,0)
ultest = EstrazioneFin ' inserite qui il numero indice dell'ultima estrazione'DEL MESE ??
For r2 = rv To rv
If r2 = 11 Then r2 = 12
n = EstrazioneFin
z = 0
trovato = False
While z < eval(nmc)
' Attenzione questa sotto deve essere tutta una riga
If(((eval(es) = 0) And(n = ultest)) Or((IndiceMensile
= eval(es) And(eval(es) > 0)) Or((IndiceMensile(n + 1) = 1) And(eval(es) = 0)))) Then
' fine riga
z = z + 1
End If
n = n - 1
Wend
nn = n + 1
For i = 1 To 90
amb(i) = 0
Next
If eval(es) = 0 Then
s = "All'ultima"
Else
s = "Alla " + es
End If
s = s + "° estrazione del mese per "
If eval(ncg) = 0 Then
s = s + "un mese:"
Else
If eval(ncg) = 1 Then
s = s + ncg + " colpo:"
Else
s = s + ncg + " colpi:"
End If
End If
ColoreTesto(1)
Scrivi s
ColoreTesto(2)
Scrivi
Scrivi "Statistica dal " + DataEstrazione(nn) + " al " + DataEstrazione(EstrazioneFin) & " Ruota di Gioco " & NomeRuota(r2) & " Percentuale di Vincita " & perc & "%"
Scrivi
ColoreTesto(0)
For ru1 = 1 To 12
If ru1 <> 11 Then
For ru2 = ru1 To 12
If ru2 <> 11 Then
Messaggio " Elaboro la ruota n° " & CInt(ru1) & " con la n° " & CInt(ru2)
z = 0
For i = 1 To 5
For l = 1 To 5
For j = 1 To 90
som(i,l,j) = 0
Val(i,l,j) = True
Next
Next
Next
For j = 1 To 2
For i = 1 To 5
estr(j,i) = 0
Next
Next
Valido = False
For n = nn To EstrazioneFin
If eval(es) = 0 Then m = n + 1 Else m = n End If
' Attenzione questa sotto deve essere tutta una riga
If(((es = 0) And(n = ultest)) Or((IndiceMensile(m) = eval(es) And(eval(es) > 0)) Or((IndiceMensile(m) = 1) And(eval(es) = 0)))) Then
' fine riga
z = z + 1
For i = 1 To 5
estr(1,i) = Estratto(n,ru1,i)
estr(2,i) = Estratto(n,ru2,i)
Next
For i = 1 To 5
For l = 1 To 5
For j = 1 To 90
Val(i,l,j) = True
Next
Next
Next
If eval(ncg) = 0 Then
k2 = 9
If(IndiceMensile(n + 12) = eval(es)) Then
k2 = 8
End If
Else
k2 = eval(ncg)
End If
k3 = n + k2
If k3 > EstrazioneFin Then k3 = EstrazioneFin
For nv = n + 1 To k3
For i = 1 To 5
For j = 1 To 5
For l = 1 To 5
k = Estratto(nv,r2,i) - estr(1,j) - estr(2,l)
While k <= 0
k = k + 90
Wend
If Val(j,l,k) = True Then
som(j,l,k) = som(j,l,k) + 1
Val(j,l,k) = False
End If
Next
Next
Next
Next
End If
Next
For i = 1 To 5
For l = 1 To 5
For j = 90 To 90
zz = Int((z/100)*perc)
s = CStr(eval(i)) + "°" + FormatSpace(SiglaRuota(ru1),2) + " + " + CStr(eval(l)) + "°"
s = s + FormatSpace(SiglaRuota(ru2),8) + " + " + FormatSpace(CStr(eval(j)),2) + "............... su " + NomeRuota(r2) + " "
s = s + CStr(som(i,l,j)) + " casi " + ": " + FormatSpace(CStr(Fuori90(eval(estr(1,i) + estr(2,l) + j))),2)
If Val(i,l,j) = True Then
s = s + " in corso"
ColoreTesto(7)
Else
ColoreTesto(1)
s = s + " x "
End If
If(som(i,l,j) >= zz) Then
If(Not(ru1 = ru2) Or((ru1 = ru2) And(i < l))) Then
Scrivi s,1
amb(Fuori90(eval(estr(1,i) + estr(2,l) + j))) = amb(Fuori90(eval(estr(1,i) + estr(2,l) + j))) + 1
Call Abbinamenti((Fuori90(eval(estr(1,i) + estr(2,l) + j))),aRetAbb,EstrazioneFin -(nmc*13),EstrazioneFin,rv,0)
For h = 1 To 10
Scrivi aRetAbb(h,1) & " con presenze " & aRetAbb(h,2)
'ImpostaGiocata 1,amb,ru1,ru2,pt,ncg,0
'Gioca es,1,,1
Next
End If
End If
Next
Next
Next
End If
Next
End If
Next
Next
End Sub
avrei bisogno un aiuto da qualche programmatore o esperto di script.
Lo script qui sotto calcola le migliori ambate sommando 2 estratti.
Vorrei se possibile cercare con quali abbinamenti sono uscite le ambate.
Ho inserito la funzione abbinamenti ma non riesco a far calcolare gli abbinamenti migliori nel periodo scelto ad avvio script.
Grazie mille a chi mi può aiutare
Sub Main()
'SetColorSezione(vbBlack)
'EndColorSezione
Dim som(5,5,90),estr(2,5),Val(5,5,90),amb(90)
Dim r2,es,nmc,perc,ncg,ultest,n,z,nn,s,ru1,l,i,ru2,trovato,j,Valido,m,k2,k3,k,nv,zz,rv,aRetAbb,h
Dim pt(1)
pt(1) = 1
'r2 = InputBox("Inserisci la Ruota di Gioco):",,1)
rv = ScegliRuota
es = InputBox("Inserisci 0 per l'ultima, 1 la prima, ecc. (0-12):",,9)
nmc = InputBox("Numero di mesi da considerare:",,5)
perc = InputBox("Inserisci la percentuale (0-100):",,99)
ncg = InputBox("Inserisci il numero di colpi(0 per un mese):",,0)
ultest = EstrazioneFin ' inserite qui il numero indice dell'ultima estrazione'DEL MESE ??
For r2 = rv To rv
If r2 = 11 Then r2 = 12
n = EstrazioneFin
z = 0
trovato = False
While z < eval(nmc)
' Attenzione questa sotto deve essere tutta una riga
If(((eval(es) = 0) And(n = ultest)) Or((IndiceMensile

' fine riga
z = z + 1
End If
n = n - 1
Wend
nn = n + 1
For i = 1 To 90
amb(i) = 0
Next
If eval(es) = 0 Then
s = "All'ultima"
Else
s = "Alla " + es
End If
s = s + "° estrazione del mese per "
If eval(ncg) = 0 Then
s = s + "un mese:"
Else
If eval(ncg) = 1 Then
s = s + ncg + " colpo:"
Else
s = s + ncg + " colpi:"
End If
End If
ColoreTesto(1)
Scrivi s
ColoreTesto(2)
Scrivi
Scrivi "Statistica dal " + DataEstrazione(nn) + " al " + DataEstrazione(EstrazioneFin) & " Ruota di Gioco " & NomeRuota(r2) & " Percentuale di Vincita " & perc & "%"
Scrivi
ColoreTesto(0)
For ru1 = 1 To 12
If ru1 <> 11 Then
For ru2 = ru1 To 12
If ru2 <> 11 Then
Messaggio " Elaboro la ruota n° " & CInt(ru1) & " con la n° " & CInt(ru2)
z = 0
For i = 1 To 5
For l = 1 To 5
For j = 1 To 90
som(i,l,j) = 0
Val(i,l,j) = True
Next
Next
Next
For j = 1 To 2
For i = 1 To 5
estr(j,i) = 0
Next
Next
Valido = False
For n = nn To EstrazioneFin
If eval(es) = 0 Then m = n + 1 Else m = n End If
' Attenzione questa sotto deve essere tutta una riga
If(((es = 0) And(n = ultest)) Or((IndiceMensile(m) = eval(es) And(eval(es) > 0)) Or((IndiceMensile(m) = 1) And(eval(es) = 0)))) Then
' fine riga
z = z + 1
For i = 1 To 5
estr(1,i) = Estratto(n,ru1,i)
estr(2,i) = Estratto(n,ru2,i)
Next
For i = 1 To 5
For l = 1 To 5
For j = 1 To 90
Val(i,l,j) = True
Next
Next
Next
If eval(ncg) = 0 Then
k2 = 9
If(IndiceMensile(n + 12) = eval(es)) Then
k2 = 8
End If
Else
k2 = eval(ncg)
End If
k3 = n + k2
If k3 > EstrazioneFin Then k3 = EstrazioneFin
For nv = n + 1 To k3
For i = 1 To 5
For j = 1 To 5
For l = 1 To 5
k = Estratto(nv,r2,i) - estr(1,j) - estr(2,l)
While k <= 0
k = k + 90
Wend
If Val(j,l,k) = True Then
som(j,l,k) = som(j,l,k) + 1
Val(j,l,k) = False
End If
Next
Next
Next
Next
End If
Next
For i = 1 To 5
For l = 1 To 5
For j = 90 To 90
zz = Int((z/100)*perc)
s = CStr(eval(i)) + "°" + FormatSpace(SiglaRuota(ru1),2) + " + " + CStr(eval(l)) + "°"
s = s + FormatSpace(SiglaRuota(ru2),8) + " + " + FormatSpace(CStr(eval(j)),2) + "............... su " + NomeRuota(r2) + " "
s = s + CStr(som(i,l,j)) + " casi " + ": " + FormatSpace(CStr(Fuori90(eval(estr(1,i) + estr(2,l) + j))),2)
If Val(i,l,j) = True Then
s = s + " in corso"
ColoreTesto(7)
Else
ColoreTesto(1)
s = s + " x "
End If
If(som(i,l,j) >= zz) Then
If(Not(ru1 = ru2) Or((ru1 = ru2) And(i < l))) Then
Scrivi s,1
amb(Fuori90(eval(estr(1,i) + estr(2,l) + j))) = amb(Fuori90(eval(estr(1,i) + estr(2,l) + j))) + 1
Call Abbinamenti((Fuori90(eval(estr(1,i) + estr(2,l) + j))),aRetAbb,EstrazioneFin -(nmc*13),EstrazioneFin,rv,0)
For h = 1 To 10
Scrivi aRetAbb(h,1) & " con presenze " & aRetAbb(h,2)
'ImpostaGiocata 1,amb,ru1,ru2,pt,ncg,0
'Gioca es,1,,1
Next
End If
End If
Next
Next
Next
End If
Next
End If
Next
Next
End Sub