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.
How to call the Least Full Members World:
How to call the Least Full Members World:
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
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
Enjoy



