SRL Archive - SRL Archives

GetLowestRSWorld (SMART)


Naum

2008-12-01 12:45:43

I stumbled across the world page and had a look at its HTML source. And most of the worlds have a pattern of the URL. So I made this function:

Function GetLowestRSWorld(Free : Boolean) : Integer;
Var Ty : String;
Begin
If Free = True Then Ty := 'M' Else Ty := 'm';

Result := StrToInt(GetNumbers(Between('<a href="http://world', '.runescape',
GetPage('http://runescape.com/slu.ws?order='+Ty+'PLWA'))));
end;

This will get the lowest free or member world depending on the Boolean 'Free'

Usage :

SmartSetupEx(GetLowestRSWorld(True), false, true, false);
:)

Floor66

2008-12-01 13:13:09

Nice :p
But isn't smart bugged atm that it doesn't start up with the world you filled in?
Or is it me that I forgot to d/l some fix :P

Nava2

2008-12-01 14:02:20

Good idea, this would be useful, but not as you have it.

Remember, SMART loads the server you place in there. Now, I have no idea if the loaded world is dependant on the server you put in. AFAIK, there is no correlation.

This WOULD be useful for things like after SMART is loaded, and you select your world. Its useful to any script in that respect.

Great work :)

P.S. SRL won't include any function that accesses the RS website. Just so you are aware.

Naum

2008-12-01 16:20:44

Ok thanks for that, what I meant was to put it in misc. As SMART.scar also accesses the RS Website. And im sure it works, Ive tested it.

Ogre

2009-04-05 20:46:16

Great script, I've put it in all the scripts I've used. :)
Just a tiny problem, one time the lowest world was a PvP world and when it was logging me in the notification popped up that it was a PvP world and the script couldn't get past it. So maybe you could change it so it gets the lowest non-PvP world?

Nava2

2009-04-05 22:12:51

This is a gravedig, please watch the last time it was posted.

Good suggestion, but be careful.

Closed, as this will not be added as it relies on a web source for its code.

Nauman, PM me if you'd like it opened. :)