I'm trying to make a program for a pokemon rpg (specifically, a pokemon grabber) and my vb6 knowledge is extremely lacking so.. can anyone help me out here?
Code:
Private Sub cmdLogin_Click()
Dim strHTML As String
strHTML = Wrapper.PostWrapper("http://srpg.myircshells.com/login.php", "user=" & txtUser.Text & "&pass=" & txtPass.Text)
If InStr(1, strHTML, "failed") Then
lblStatus.Caption = "Bad password."
ElseIf InStr(1, strHTML, "logged") Then
lblStatus.Caption = "Logged In."
Else
lblStatus.Caption = "Unknown Error."
End If
If lblStatus.Caption = "Logged In." Then
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/index.php", "http://srpg.myircshells.com/login.php")
End If
If InStr(1, strHTML, "Shadow RPG") Then
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php", "http://srpg.myircshells.com/index.php")
End If
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php?action=explore", "http://srpg.myircshells.com/promo.php")
lblStatus.Caption = "Working."
If InStr(1, strHTML, "Try again") Then
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php?action=explore", "http://srpg.myircshells.com/promo.php?action=explore")
ElseIf InStr(1, strHTML, "Unown") Then
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php?action=catch", "http://srpg.myircshells.com/promo.php?action=explore")
Else
lblStatus.Caption = "?"
End If
End Sub The actual logging in seems to be working flawlessly, but I just dunno how to make it loop to catch a pokemon (and if it doesn't find one, continue searching). You'll most likely have to take a look at the site if you're gonna try and help :x