SRL Archive - SRL Archives

My Worldlist functions!


Pentti

2007-03-23 16:03:20

I made these for Runescapes new world switching thing in login screen. I have tested them and all of the functions worked for me. Please tell me what do yuo like about them and if these works for you. :D And thanks for Boreas, he helped me with tpoint and tboxes.

Function WorldListScreen:Boolean; //Returns true if in World list screen.
Function GetWorldScreen:Boolean; //Opens up World list screen.
Function FixWorldList:Boolean; //Sorts worlds by world number.
Function CloseWorldScreen:Boolean; //Closes World select screen.
Function SortWorldsBy(Which: String):Boolean; //Sorts worlds by given value (Number, Players, Location, Type).
Function SelectWorld(Order: Integer):Boolean; //Selects world by worldlist order.
Function ChooseWorldNumber(WorldNumber:Integer):Boolean; //Selects world by world number.
Function SelectLeast:Boolean; //Selects world with least people.
Function SelectMost:Boolean; //Selects world with most people.

Secet

2007-03-23 16:23:16

You and your scripts suck! It took WAY TOO long! –rep for you!

Nah, just kidding. Awesome job, really really cool.
I think you could make function called SelectLeast
It would simply do something like this:

function SelectLeast(Free:Boolean): Boolean;
begin
if WorldListScreen then
begin
if Free then
begin
SortWorldsBy('Players');
SortWorldsBy('Type');
SelectWorld(0);
WriteLn('Selected least full free world');
Result := True;
end;
if not Free then
begin
SortWorldsBy('Players');
SelectWorld(0);
WriteLn('Select least full free world');
Result := True;
end;
end else
WriteLn('Error. Didn''t find world selecting screen');
Result := False;
end;

Something like that, you got the idea.
(Sorry for bad script outlook, made it at forums = no TAB :P)
And could do the same thing for SelectMost.

Another idea, if it is possible you could also edit SelectWorldsBy function to work like this,
SelectWorldsBy(Which: string, Down: Boolean); so you could also sort out worlds upwards.
Sorry if I sound like flaming you or something, but I really don't think so. It's just so cool job and I'm excited about it. :)

Jatka samaan malliin ;)

Pentti

2007-03-23 16:47:56

From: Secet
You and your scripts suck! It took WAY TOO long! –rep for you!

Nah, just kidding. Awesome job, really really cool.
I think you could make function called SelectLeast
It would simply do something like this:

function SelectLeast: Boolean;
begin
if WorldListScreen then
begin
SortWorldsBy('Players');
SelectWorld(1);
WriteLn('Selected least full world');
Result := True;
end else
WriteLn('Error. Didn't find world selecting screen');
Result := False;
end;

Something like that, you got the idea.
(Sorry for bad script outlook, made it at forums = no TAB :P)

Thanks! :D
Check out updated version now. :D
btw, I have to change coordinates in Function SelectWorld(Order: Integer):Boolean; maybe tomorrow if I have time, because theres something wrong with them.

Boreas

2007-03-23 17:45:56

Try these coords
 x1:=59+(((WhichWorld-1)/20)*93); 
x2:=x1+87;
y1:=35+(((WhichWorld+19)mod 20)*23);
y2:=y1+18;
Mouse(x1+random(x2-x1),y1+random(y2-y1),0,0,true);

TOB

2007-03-24 01:18:24

Try combining a few of them so they use booleans such as

SelectBy(Most: Boolean);

etc.