Get Least Full World [Source]

Discussion in 'Archives' started by Covey, Jan 28, 2007.

Get Least Full World [Source]
  1. Unread #1 - Jan 28, 2007 at 7:31 AM
  2. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Get Least Full World [Source]

    This function will ONLY get the least full world (members or free) and tell you what world it is. It will NOT connect to that world or tell you how many players are in it. It includes simple error handling so it won't die if something has gone wrong.

    Code:
    Public Function GetLeastFull(sType As String) As Integer
        Dim mStr As String, sWorld() As String
        If Inet1.StillExecuting Then Exit Function
        If LCase(sType) = "free" Then mStr = Inet1.openurl("http://www.runescape.com/lang/en/aff/runescape/serverlist.ws?lores.x=1&plugin=0&order=MPWL") Else mStr = Inet1.openurl("http://www.runescape.com/lang/en/aff/runescape/serverlist.ws?lores.x=1&plugin=0&order=PWML")
        sWorld() = Split(mStr, " Type")
        sWorld() = Split(sWorld(1), "World ")
        sWorld() = Split(sWorld(1), "</a>")
        If Not IsNumeric(sWorld(0)) Then MsgBox "An error has occurred please contact the program designer", vbInformation, "Get Least Full World": Exit Function
        GetLeastFull = sWorld(0)
    End Function
    How to call the Least Full Members World:
    Code:
    GetLeastFull("members")
    How to call the Least Full Members World:
    Code:
    GetLeastFull("free")
    I was going to post my old looping function but i thought meh it was pretty simple to make so i won't be a code whore (for once :) ) and release it.

    Enjoy
     
  3. Unread #2 - May 21, 2007 at 4:04 PM
  4. ViruZ3
    Joined:
    May 21, 2007
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0

    ViruZ3 Member

    Get Least Full World [Source]

    I get an error when it trys to find the least full world... Look like this:

    Code:
    If Inet1.StillExecuting
    
    Can you help me?
     
  5. Unread #3 - May 22, 2007 at 3:21 AM
  6. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Get Least Full World [Source]

    is your inet called inet1..
     
  7. Unread #4 - May 22, 2007 at 4:22 AM
  8. Aussie King
    Joined:
    Jan 25, 2007
    Posts:
    667
    Referrals:
    1
    Sythe Gold:
    0

    Aussie King Apprentice
    Banned

    Get Least Full World [Source]

    nice ty mate.
     
  9. Unread #5 - May 23, 2007 at 3:29 AM
  10. roflm40
    Joined:
    May 22, 2007
    Posts:
    97
    Referrals:
    0
    Sythe Gold:
    0

    roflm40 Member
    Banned

    Get Least Full World [Source]

    Nice, ty for sharing.
     
  11. Unread #6 - May 23, 2007 at 4:48 AM
  12. ViruZ3
    Joined:
    May 21, 2007
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0

    ViruZ3 Member

    Get Least Full World [Source]

    Ok i got it but where do i put it so it says the least full world? In a textbox? Label? :confused:
     
  13. Unread #7 - May 23, 2007 at 7:52 AM
  14. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Get Least Full World [Source]

    you would usually connect straight to that world.

    Example:
    First you'll need your loadworld code. lets pretend you loadyour world buy doing calling the function LoadWorld(10), 10 being the world number you wish to load.

    so to load the least full world you would do, loadworld(GetLeastFull("free"))
     
< need pcer!!! | In Need of Runecrafting Trainer (I supply) >

Users viewing this thread
1 guest


 
 
Adblock breaks this site