Dim NowTime
Dim ReFreshWorld As Integer
Dim SL As Integer
Dim JY As Integer
Dim SLID As Integer
Dim JYID As Integer
Dim Gold As Integer
Dim Reward As Integer
Dim Num1 As Integer
Dim Num2 As Integer
Dim Num3 As Integer
Dim NumSL As Integer
Dim NumJY As Integer
Dim NumAll As Integer
Dim Cure As Integer
Dim Fight As Integer
Dim OldReward As Integer
Dim S1 As String
Public NowH As Integer
Public NowM As Integer
Public NowS As Integer
Public ShowM As String
Public ShowS As String
Public ReadTime As Boolean
Public NumSolInitial
Public NumSolNow
Public GetName
Public Rank
Private Sub Command1_Click()
WebBrowser1.Stop
End Sub
Private Sub Command2_Click()
Timer3.Enabled = True
Label12.Caption = "挂机成功,20:55后自动运行挂"
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer2.Enabled = True
Timer2.Interval = 1000
Timer3.Enabled = False
Timer3.Interval = 5000
Label10.Caption = "当前时间:
" & Time()
Option1.Value = True
ReadTime = False
Combo1.Clear
For i = 0 To 10
Combo1.AddItem i
Next
Combo1.Text = Combo1.List(2)
End Sub
Private Sub StartWorld_Click()
WebBrowser1.Navigate ("http://wap.)
End Sub
Private Sub Timer1_Timer()
WebBrowser1.Navigate ("http://wap.)
End Sub
Private Sub Timer2_Timer()
Label10.Caption = "当前时间:
" & Time()
End Sub
Private Sub Timer3_Timer()
If Time > "20:55" Then
WebBrowser1.Navigate ("http://wap.)
Label12.Caption = ""
Timer3.Enabled = False
End If
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Timer1.Enabled = False
Timer1.Enabled = True
Timer1.Interval = Val(Combo1.Text) * 1000
Set Doc = WebBrowser1.Document
Select Case WebBrowser1.LocationURL
Case "http://wap.
Timer1.Enabled = False
For i = 0 To Doc.All.length - 1
If (LCase(Doc.All(i).tagName)) = "input" Then
If LCase(Doc.All(i).Name) = "id" Then Doc.All(i).Value = "zjh0001"
If LCase(Doc.All(i).Name) = "pass" Then Doc.All(i).Value = "zjh123456"
If LCase(Doc.All(i).Name) = "district" Then Doc.All(i).Value = 16
If LCase(Doc.All(i).Type) = "submit" Then
Doc.All(i).Click
Exit For
End If
End If
Next i
Case "http://wap.
Dim m As Integer
Dim n As Integer
m = InStr(1, WebBrowser1.Document.All(i).outerHTML, "前往世界")
n = InStr(1, WebBrowser1.Document.All(j).outerHTML, "的城池")
If m > 0 And n > 0 Then GetName = Mid(WebBrowser1.Document.All(i).outerHTML, m + 12, n - m - 12)
WebBrowser1.Navigate ("http://wap.)
Case "http://wap.
Cure = InStr(1, WebBrowser1.Document.All(i).outerHTML, "兵力恢复")
Num1 = InStr(1, WebBrowser1.Document.All(i).outerHTML, "剩余兵队")
Num2 = InStr(1, WebBrowser1.Document.All(i).outerHTML, "攻击加成")
Num3 = InStr(1, WebBrowser1.Document.All(i).outerHTML, "剩余红包")
num4 = InStr(1, WebBrowser1.Document.All(i).outerHTML, GetName)
If num4 > 0 Then
If Val(Mid(WebBrowser1.Document.All(i).outerHTML, num4 - 15, 1)) > 0 Then
Rank = "世界军团排名: " & Val(Mid(WebBrowser1.Document.All(i).outerHTML, num4 - 15, 3))
ElseIf Val(Mid(WebBrowser1.Document.All(i).outerHTML, num4 - 14, 1)) > 0 Then
Rank = "世界军团排名: " & Val(Mid(WebBrowser1.Document.All(i).outerHTML, num4 - 14, 2))
Else
Rank = "世界军团排名: " & Val(Mid(WebBrowser1.Document.All(i).outerHTML, num4 - 13, 1))
End If
End If
Label11.Caption = Rank
SL = InStr(1, WebBrowser1.Document.All(i).outerHTML, "首领")
JY = InStr(1, WebBrowser1.Document.All(i).outerHTML, "精英")
If Num1 > 0 And Num2 > 0 Then S1 = Mid(WebBrowser1.Document.All(i).outerHTML, Num1, Num2 - Num1 - 5)
Reward = Val(Mid(WebBrowser1.Document.All(i).outerHTML, Num3 + 5, 3))
If Reward - OldReward = 4 Then
NumSL = NumSL + 1
NumAll = NumAll + 1
List1.AddItem Time & "
" & "攻打首领,获得4个红包"
ElseIf Reward - OldReward = 2 Then
NumJY = NumJY + 1
NumAll = NumAll + 1
List1.AddItem Time & "
" & "攻打精英,获得2个红包"
ElseIf Reward - OldReward = 1 Then
NumAll = NumAll + 1
List1.AddItem Time & "
" & "攻打普通,获得1个红包"
End If
OldReward = Reward
Label2.Caption = "当前" & S1
Label3.Caption = "共有红包数量: " & Reward
Label4.Caption = "总共攻打次数: " & NumAll
Label5.Caption = "攻打首领次数: " & NumSL
Label6.Caption = "攻打精英次数: " & NumJY
If SL > 0 Then SLID = Mid(WebBrowser1.Document.All(i).outerHTML, SL - 3, 1)
If JY > 0 Then JYID = Mid(WebBrowser1.Document.All(i).outerHTML, JY - 3, 1)
If Cure > 0 Then
WebBrowser1.Navigate ("http://wap.)
Exit Sub
End If
If SL > 0 Then
WebBrowser1.Navigate ("http://wap. & SLID)
Exit Sub
ElseIf JY > 0 Then
If Option1.Value = False Then
WebBrowser1.Navigate ("http://wap.)
List1.AddItem Time & "
" & "花10金刷新首领"
Gold = Gold + 10
Label7.Caption = "总共花费金币: " & Gold
Exit Sub
Else
WebBrowser1.Navigate ("http://wap. & JYID)
Exit Sub
End If
Else
If Option3.Value = True Then
WebBrowser1.Navigate ("http://wap.)
List1.AddItem Time & "
" & "花10金刷新精英"
Gold = Gold + 10
Label7.Caption = "总共花费金币: " & Gold
Exit Sub
Else
WebBrowser1.Navigate ("http://wap.)
Exit Sub
End If
End If
Case Else
WebBrowser1.Navigate ("http://wap.)
End Select
End Sub