[TUT]Highscores Grabber[TUT]

Discussion in 'Programming General' started by master447, Jul 3, 2010.

[TUT]Highscores Grabber[TUT]
  1. Unread #1 - Jul 3, 2010 at 7:49 PM
  2. master447
    Joined:
    Nov 5, 2007
    Posts:
    169
    Referrals:
    0
    Sythe Gold:
    0

    master447 Active Member
    Banned

    [TUT]Highscores Grabber[TUT]

    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,

    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,
     
  3. Unread #2 - Jul 5, 2010 at 3:41 AM
  4. freddy1990
    Joined:
    Jul 1, 2005
    Posts:
    149
    Referrals:
    1
    Sythe Gold:
    0

    freddy1990 Active Member

    [TUT]Highscores Grabber[TUT]

    Heh, I think normally a tutorial would explain how the code works :p
    Also, is GetPageHTML even a default VB function?
     
  5. Unread #3 - Jul 5, 2010 at 9:45 AM
  6. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    [TUT]Highscores Grabber[TUT]

    Code:
    Dim WC as New WebClient
    Dim STR as String = WC.DownloadString("website")
    
    EDIT: Before I forget OP, please post in the right section next time.
     
  7. Unread #4 - Jul 18, 2010 at 9:00 AM
  8. TheHacker
    Joined:
    Apr 1, 2009
    Posts:
    1,088
    Referrals:
    0
    Sythe Gold:
    0

    TheHacker Guru

    [TUT]Highscores Grabber[TUT]

    Hmmm interesting, nice
     
  9. Unread #5 - Aug 23, 2010 at 8:18 PM
  10. Burn Notice
    Joined:
    Aug 23, 2010
    Posts:
    23
    Referrals:
    0
    Sythe Gold:
    0

    Burn Notice Newcomer
    Banned

    [TUT]Highscores Grabber[TUT]

    Confused on what it does
     
  11. Unread #6 - Aug 24, 2010 at 10:51 AM
  12. Itz_you202
    Joined:
    Aug 13, 2010
    Posts:
    176
    Referrals:
    0
    Sythe Gold:
    0

    Itz_you202 Active Member

    [TUT]Highscores Grabber[TUT]

    I don't get it :s.
     
  13. Unread #7 - Aug 24, 2010 at 10:55 AM
  14. blindkilla
    Joined:
    Jun 22, 2005
    Posts:
    1,896
    Referrals:
    0
    Sythe Gold:
    6
    Discord Unique ID:
    282000633404456960
    Discord Username:
    sogord

    blindkilla Guru
    $25 USD Donor New

    [TUT]Highscores Grabber[TUT]

    It's a highscores grabber (as the OP clearly states), but I'm sure you guys were just posting to get your post count up.
     
< [HELP] YouTube subscriber bot. | Looking for VOLUNTEER developers >

Users viewing this thread
1 guest


 
 
Adblock breaks this site