Haber, es un bot para xnova el clon de ogame. El formualrio principal tiene los botones conectar, hangar, edificios, investigaciones y defensa.
El code del form1 es:
Dim doc As Object
Dim var_input As Object
Dim var_value As Object
Dim var_but As Object
Private Sub Command1_Click()
Set doc = WebBrowser1.Document
Set var_input = doc.getelementbyid("username")
var_input.Value = Text1.Text
Set var_input = doc.getelementbyid("password")
var_input.Value = Text2.Text
Set var_but = doc.getelementbyid("submit")
var_but.Click
End Sub
Private Sub Command2_Click()
Form2.Show
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
WebBrowser1.Navigate "http://uni3.zagamex.com.ar"
End Sub
Al clickar sobre hangar deberia de verse el formulario2 (Form2)
Codigo Form2:
Dim hangar As Object
Dim var_input As Object
Dim var_value As Object
Dim var_click As Object
Dim bucle
Private Sub Command1_Click()
Dim html
If Option1.Enabled Then naves = "fmenge[202]"
If Option2.Enabled Then naves = "fmenge[203]"
If Option3.Enabled Then naves = "fmenge[204]"
If Option4.Enabled Then naves = "fmenge[205]"
If Option5.Enabled Then naves = "fmenge[206]"
If Option6.Enabled Then naves = "fmenge[207]"
If Option7.Enabled Then naves = "fmenge[208]"
If Option8.Enabled Then naves = "fmenge[209]"
If Option9.Enabled Then naves = "fmenge[210]"
If Option10.Enabled Then naves = "fmenge[211]"
If Option11.Enabled Then naves = "fmenge[212]"
If Option12.Enabled Then naves = "fmenge[213]"
If Option13.Enabled Then naves = "fmenge[214]"
If Option14.Enabled Then naves = "fmenge[215]"
If Option15.Enabled Then naves = "fmenge[216]"
For bucle = 1 To Val(Text1.Text)
Form1.WebBrowser1.Navigate "http://uni3.zagamex.com.ar/game.php?page=buildings&mode=fleet"
Set hangar = WebBrowser1.Document
Set var_input = hangar.getelementbyid("val(naves)")
Set var_input.Value = Text2.Text
For Each html In hangar.getelementbytagname("input")
If html.Value = "Construir" Then html.Click
Next
Next
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Dim naves As String
End Sub