Adblock breaks this site

Dynamic something

Discussion in 'Programming General' started by dgameman1, Mar 20, 2008.

  1. dgameman1

    dgameman1 Active Member
    Banned

    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0
    Dynamic something

    K i was looking around the forum and saw soemone post all the runescape world lists, and in that topic, someone else wrote that you can use like a dynamic thing of somesort, Don't exactly remember but what I remembered was that he said that if you do the Dynamic thing, you never have to update your World links, and I would be very pleased if you give me a link, and I may have 2 posts, (3 now) But that doesn't mean I don't know anything, I'm new with Visual basics, And i've been on these forums since last year, I think, but I don't really post alot so.. Ya, PLEASE AND THANKYOU..
     
  2. Terrankiller

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1
  3. dgameman1

    dgameman1 Active Member
    Banned

    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0
    Dynamic something

    Lol and wher should I be looking on that site? It's not under the program thing, its not fawg... or scar.. So
     
  4. Terrankiller

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1
    Dynamic something

    Dynamic means change. If your world list never updates, then its not dynamic in the first place. You would have to program your own auto-updating world list function. Or you can use FAWG to program and update your world list.
     
  5. dgameman1

    dgameman1 Active Member
    Banned

    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0
    Dynamic something

    Oh and since im new to vb do you think that would be hard to make? (for me)
     
  6. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    Dynamic something

    Hmm, pretty hard for someone that is new to vb, but say pretty please and I'll give you my source.

    Code:
    Public Type WorldInfo
        Prefix As String
        Theme As String
        Type As String
        Location As String
        Flag As String
        People As String
        Status As String
    End Type
    
    Public Function GetWorldInfo(ByVal World As Integer, HTML As String) As WorldInfo
        Dim pos(9) As Long, SearchW(1) As Integer
        pos(0) = InStr(1, HTML, "e(" & World & ",")
        If pos(0) = 0 Then GetWorldInfo.Status = "Nonexistant": Exit Function
        pos(7) = InStr(pos(0), HTML, ",") + 1
        pos(8) = InStr(pos(7), HTML, ",")
        pos(9) = InStr(pos(8) + 1, HTML, ",")
        If Mid(HTML, pos(8) + 1, 1) = 1 Then
            GetWorldInfo.Status = "Offline"
        Else
            GetWorldInfo.Status = "Online"
        End If
        GetWorldInfo.Type = Mid(HTML, pos(7), pos(8) - pos(7))
        pos(1) = InStr(pos(0), HTML, """,") + 3
        pos(2) = InStr(pos(1), HTML, ",""") + 2
        pos(3) = InStr(pos(1), HTML, """,")
        pos(4) = InStr(pos(2) + 1, HTML, ",")
        pos(5) = InStr(pos(3) + 1, HTML, ",")
        GetWorldInfo.Location = Mid(HTML, InStr(pos(4) + 1, HTML, ",") + 1, InStr(pos(4) + 1, HTML, ")") - InStr(pos(4) + 1, HTML, ",") - 1)
        pos(6) = InStr(1, HTML, "l==" & GetWorldInfo.Location & "?""")
        pos(7) = InStr(pos(3) + 2, HTML, ",")
        GetWorldInfo.Theme = Mid(HTML, InStr(pos(0), HTML, ",""") + 2, (InStr(pos(0), HTML, """,") - InStr(pos(0), HTML, ",""")) - 2)
        GetWorldInfo.Prefix = Mid(HTML, pos(2), pos(3) - pos(2))
        GetWorldInfo.Type = IIf(GetWorldInfo.Type = 0, "Free", "Member")
        GetWorldInfo.Location = Mid(HTML, InStr(pos(6), HTML, ">") + 1, InStr(InStr(pos(6), HTML, ">"), HTML, """") - InStr(pos(6), HTML, ">") - 1)
        GetWorldInfo.Flag = Mid(HTML, InStr(pos(6), HTML, "?""") + 2, InStr(InStr(pos(6), HTML, ">"), HTML, """") - InStr(pos(6), HTML, "?""") - Len(GetWorldInfo.Location) - 3) & "flag"
        GetWorldInfo.People = Mid(HTML, pos(3) + 2, pos(7) - pos(3) - 2)
    End Function
    Yes I know it is sloppy, but it gets the job done. Just make sure you feed it a real world number and it will return the correct prefix.
     
  7. dgameman1

    dgameman1 Active Member
    Banned

    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0
    Dynamic something

    Thank you
     
< My Auto Seller | saving in vb.net >


 
 
Adblock breaks this site