From: Narcle
Thats my old formula, and I know its completely flawed in every way. I have a completely different one in my private script that is a lot better. I saw the formula you sent. If I do redo my script it'll be with that formula. ;)
Also I already have a function that will get the population from the RS web page (if it hasn't been changed to much). So it doesn't have to click anything it just loads it from a completely different source by reading the web page. That was key to it.
i have the code to get the inforformation about the world in AS3 just gotto figure out how to simulate the split functon in as and ill have a working SCAR version worthy of being added to SRL.
here is the AS3 code.
[PHP]
public function getData(worldnum:Number):Array {
/*
gets the data and then formats it, after it takes and converts the returned array into an Object
*/
rawarray = loader.data.slice(loader.data.indexOf("e("+worldnum+",")+2,
loader.data.indexOf(";",loader.data.indexOf("e("+worldnum+","))-1).split(",");
/*worldinfo.worldnum = rawarray[0];
worldinfo.membersbool = rawarray[1];
worldinfo.statusnum = rawarray[2];
worldinfo.activitystr = rawarray[3];
worldinfo.activitybol = rawarray[4];
worldinfo.worldprefix = rawarray[5];
worldinfo.population = rawarray[6];
worldinfo.worldlocation = rawarray[7];*/
return rawarray;
}[/PHP]
and after 1:27 this is the equivalent
[PHP]
function WorldInfo(worldnum:Integer):Array of String;
var
winfo: array [0..7] of String; dataloader,raw,tempstr:String; i:Integer;
begin
dataloader:= GetPage('
http://www.runescape.com/slj.ws?hires.x=36&hires.y=223&plugin=0')
raw:= Between('e('+inttostr(worldnum)+',',');',dataloader);
writeln(raw);
i:=0;
winfo
:=inttostr(worldnum);
repeat
i:=i+1;
tempstr:=raw;
delete(tempstr, pos(',',raw), 50);
winfo:=tempstr;
delete(raw, pos(',',raw)-Length(tempstr), 1+Length(tempstr));
until (i>=7);
Result:= winfo;
end;[/PHP]