mixster
2008-04-12 16:44:35
After getting annoyed with using Prisoner's random world procedure (not because of the procedure itself) returning fairly full worlds. With that in mind, I remember seeing a function previously that returned the least populated world, thus I decided to make a function that did the same thing. Now, I have had a look around (tried a search, but it came up with pretty much every script thread and quite a lot of help ones too) and couldn't find it, so it could be the exact same code or it could be completely different, either way all I know is it works :) So here it is
prefix: true to return a prefix and false for a world number (depending on if you want to use it with SmartSetup or SmartSetupEx).
Enjoy! (and if you want to criticise, I have a handy report link in my sig) :)
function EmptiestWorld(members, prefix: Boolean): string;
var
website: string;
begin
case members of
False: website := GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=0&order=MPLAW');
True: website := GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=0&order=mPLAW');
end;
Delete(website, 1, Pos('function e(w,m,s,a,dt,h,p,l) ', website) + 50);
case prefix of
False: Result := Between(' e(', ',', website);
True:
begin
Delete(website, 1, Pos('",', website) + 3);
Result := Between(',"', '",', website);
end;
end;
end;
members: true for members and false for free worldprefix: true to return a prefix and false for a world number (depending on if you want to use it with SmartSetup or SmartSetupEx).
Enjoy! (and if you want to criticise, I have a handy report link in my sig) :)