- Joined
- Nov 5, 2007
- Sythe Gold
- 0
- Messages
- 169
this is for vb express 2010,
well ive seen a lot of people requesting on how to get a high-scores grabber. this is done through praising, most people do not know what that is so im just gonna skip to the chase.
This is a brief tutorial and will only cover 1 stat dont want to make it to easy for people
1)Add 2 labels and a button to your program,
2)double click the button so that you have the code brought up.
3)anywhere add this chuck of code,
then for your button code use this,
ok so the part that is like
the scores(4) is attack level 5 is the xp i think im doing this from my head. so mess around with it till u get it right, so just add more labels and code to your program to get all the stats,
well ive seen a lot of people requesting on how to get a high-scores grabber. this is done through praising, most people do not know what that is so im just gonna skip to the chase.
This is a brief tutorial and will only cover 1 stat dont want to make it to easy for people
1)Add 2 labels and a button to your program,
2)double click the button so that you have the code brought up.
3)anywhere add this chuck of code,
Code:
Public Function parseHtml(ByVal Name As String) As String()
Dim Html As String
Dim word As Integer = 0
Html = GetPageHTML("http://hiscore.runescape.com/index_lite.ws?player=" + TextBoxX1.Text)
Dim result(Html.Length) As String
Dim length As Integer = Html.Length
If (Html = "") Then
Dim nil(1) As String
Return nil
End If
For i As Integer = 0 To length - 1
If (IsNumeric(Html.Chars(i)) = False) Then
If (Html.Chars(i) = "-") Then
result(word) = "N/a"
word = word + 1
i = i + 2
Else
word = word + 1
End If
Else
result(word) = result(word) & Html.Chars(i)
End If
Next
Return result
End Function
then for your button code use this,
Code:
Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
scores = parseHtml(TextBoxX1.Text)
Try
Label1.Text = "Level:" + scores(4)
Label2.Text = "Xp:" + scores(5)
Catch ex As Exception
Label1.Text = "Xp:N\A"
Label2.Text = "Level:N\A"
ProgressBar1.Value = 0
End Try
ok so the part that is like
Code:
Label1.Text = "Level:" + scores(4)
Label2.Text = "Xp:" + scores(5)
the scores(4) is attack level 5 is the xp i think im doing this from my head. so mess around with it till u get it right, so just add more labels and code to your program to get all the stats,
















