This can be used in a multitude of ways.
The primary use it so open a random world in SMART. Simply put it in the SetupSMARTEx and run the script.
ANOTHER way to use it is when you are running SRL's World Switcher. Include it the same way as the smart and it works 
Here is the code, short simple, and to the point
.
SCAR Code:
(*=====================================================================)
| function RandomWorld(Free: Boolean): Integer; |
| By: Nava2 |
| Instructions: Set 'Free' parameter to which ever type of world |
| that you would like. Simple! |
(=====================================================================*)
function RandomWorld(Free: Boolean): integer;
var
s, w: string;
i: integer;
begin
i := Random(163) + 1;
if Free then
w := 'Free'
else
w := 'Members';
repeat
Inc(i);
if i = 164 then
i := 1;
until (ReadINI('World' + IntToStr(i), 'Type', AppPath + 'Includes\SRL\SCSS\Worlds.INI') = w);
s := GetNumbers(ReadINI('World' + IntToStr(i), 'Prefix', AppPath + 'Includes\SRL\SCSS\Worlds.INI'));
Result := StrToInt(s);
Writeln('Your Randomly chosen ' + w + ' world is ' + s + '.');
end;
Also here are the examples I was talking about.
SMART:
SCAR Code:
procedure SetupSmart;
begin
if not UseSMART then EXIT;
Writeln('Setting up SMART');
SmartSetupEx(RandomWorld(False), true, True, false);
wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
end;
In a world changing procedure:
SCAR Code:
procedure ChangeWorld;
begin
LogOut;
Wait(10000+random(5000));
SelectWorld(RandomWorld(True));
Wait(5000+random(2500));
LoginPlayer;
end;
Rate, Hate, Masturbate?
Post comments and suggestions please!
If you are using CREDIT! 
~Nava2