Trasferisci Ricerche
<%
Dim Is_Researching = 0
Dim Exist = 0
sqlConn.Open()
sqlComm = New SqlCommand("SELECT In_Costr_Res FROM Pianeti WHERE Proprietary = '" & Proprietary & "' AND C_Laboratorio > 4 AND In_Costr_Res = 'No' ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
Exist = Exist + 1
If r("In_Costr_Res") = "Si" Then
Is_Researching = 1
End If
End While
r.Close()
sqlConn.Close()
If Is_Researching = 1 Then
%>Non puoi trasferire le Ricerche mentre stai ricercando!!!<%
End If
If Exist < 2 Then
%>Devi avere almeno due Paesi con un'Università di almeno Livello 5 che non stanno attualmente ricercando!!!<%
End If
'FAI IL CONTO DEL COSTO DELLE RICERCHE
If Is_Researching = 0 AND Exist > 1 Then
Dim R_arr(11)
Dim R1_arr(11)
R_arr(1) = "R_Add_Cavalli"
R_arr(2) = "R_Filoni_Oro"
R_arr(3) = "R_Armi"
R_arr(4) = "R_Tempr_Ferro"
R_arr(5) = "R_Scudi"
R_arr(6) = "R_Mura"
R_arr(7) = "R_Guardie"
R_arr(8) = "R_Torrette"
R_arr(9) = "R_Assedio"
R_arr(10) = "R_Esplorazione"
R1_arr(1) = 0
R1_arr(2) = 0
R1_arr(3) = 0
R1_arr(4) = 0
R1_arr(5) = 0
R1_arr(6) = 0
R1_arr(7) = 0
R1_arr(8) = 0
R1_arr(9) = 0
R1_arr(10) = 0
sqlConn.Open()
sqlComm = New SqlCommand("SELECT R_Add_Cavalli, R_Filoni_Oro, R_Armi, R_Tempr_Ferro, R_Scudi, R_Esplorazione, R_Assedio, R_Mura, R_Guardie, R_Torrette, R_Velocita FROM Pianeti WHERE Proprietary = '" & Proprietary & "' AND C_Laboratorio > 4 AND In_Costr_Res = 'No' ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
For i = 1 to 10
If r(R_arr(i)) > R1_arr(i) Then
R1_arr(i) = r(R_arr(i))
End If
Next
End While
r.Close()
sqlConn.Close()
Dim Costo = 0
sqlConn.Open()
sqlComm = New SqlCommand("SELECT R_Add_Cavalli, R_Filoni_Oro, R_Armi, R_Tempr_Ferro, R_Scudi, R_Esplorazione, R_Assedio, R_Mura, R_Guardie, R_Torrette, R_Velocita FROM Pianeti WHERE Proprietary = '" & Proprietary & "' AND C_Laboratorio > 4 AND In_Costr_Res = 'No' ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
For i = 1 to 10
Costo = Costo + (R1_arr(i) - r(R_arr(i)))
Next
End While
r.Close()
sqlConn.Close()
Costo = Costo*5000
Dim Vis_Trasferisci = 0
If Messaggio.Text = "" Then
Vis_Trasferisci = 1
Messaggio.Text = "Vuoi Trasferire le tue Ricerche?
Il trasferimento delle tue ricerche ti costerà "& Costo &" Monete D'Oro"
End If
%>
<%
If Vis_Trasferisci = 1 Then %>
<% End If %>
<%
End If
%>
|
|