WorldSwitcher¶
WorldSwitcher is resposible for changing worlds with the logged in world switcher in the Logout gametab.
TRSWorld type¶
Helper record for TRSworldSwitcher.
TRSWorldArray type¶
Helper type for TRSworldSwitcher.
TRSWorldSwitcher type¶
Main record that interacts with the WorldSwitcher.
TRSWorldSwitcher.Setup¶
procedure TRSWorldSwitcher.Setup();
Interal method used to setup the TRSWorldSwitcher cooldown.
This is automatically called for you on the WorldSwitcher variable.
TRSWorldSwitcher.SetupGameTab¶
procedure TRSWorldSwitcher.SetupGameTab();
Interal method used to setup the TRSWorldSwitcher coordinates.
This is automatically called for you on the WorldSwitcher variable.
WorldSwitcher.IsOpen¶
function TRSWorldSwitcher.IsOpen(): Boolean;
Returns true if the world switcher is open.
Example:
WriteLn WorldSwitcher.IsOpen();
WorldSwitcher.IsLoading¶
function TRSWorldSwitcher.IsLoading(): Boolean;
Returns true if the world switcher is loading. The world switcher takes a few milliseconds to load.
Example:
WriteLn WorldSwitcher.IsLoading();
WorldSwitcher.WaitLoading¶
function TRSWorldSwitcher.WaitLoading(time: Integer = 600; interval: Integer = -1): Boolean;
Waits for the world switcher to finish loading. For more information on loading read WorldSwitcher.IsLoading.
Example:
WriteLn WorldSwitcher.WaitLoading();
WorldSwitcher.Open¶
function TRSWorldSwitcher.Open(waitLoad: Boolean = True): Boolean;
Attempts to open the world switcher.
This method is overriden after Logout, for more information check WorldSwitcher.Open override.
Example:
WriteLn WorldSwitcher.Open();
Logout.CloseWorldSwitcher¶
function TRSLogout.CloseWorldSwitcher(): Boolean;
Closes the world switcher.
Example:
Logout.CloseWorldSwitcher();
WorldSwitcher.Logout¶
function TRSWorldSwitcher.Logout(attempts: UInt32 = 5; time: UInt32 = 20000): Boolean;
Clicks the logout button. Returns true if we succesfully logout of the game.
Example:
WriteLn WorldSwitcher.Logout();
WorldSwitcher.GetWorlds¶
function TRSWorldSwitcher.GetWorlds(): TRSWorldArray;
Returns the currently visible TRSWorldArray.
Example:
ShowOnTarget(WorldSwitcher.GetWorlds());
WorldSwitcher.FindWorld¶
function TRSWorldSwitcher.FindWorld(number: Integer; out world: TRSWorld): Boolean;
Returns true if the specified world number is found.
The world data is returned through the world variable.
Example:
if WorldSwitcher.FindWorld(311, world) then
ShowOnTarget([world]);
WorldSwitcher.IsSorted¶
function TRSWorldSwitcher.IsSorted(): Boolean;
Checks if the worlds in the world switcher are sorted.
Example:
WriteLn WorldSwitcher.IsSorted();
WorldSwitcher.Sort¶
function TRSWorldSwitcher.Sort(): Boolean;
Sorts the worlds from lower to higher numbers.
Example:
WriteLn WorldSwitcher.Sort();
WorldSwitcher.World property¶
property TRSWorldSwitcher.World: Integer;
property TRSWorldSwitcher.World(next: Integer): Boolean;
Returns or sets the current world we are on.
Setting a new world will only happen if TRSWorldSwitcher.Cooldown is finished,
which is a cooldown that starts everytime you change worlds.
Example:
WriteLn WorldSwitcher.World;
WorldSwitcher.World := 311;
WriteLn WorldSwitcher.World;
WorldSwitcher.Next¶
function TRSWorldSwitcher.Next(): Boolean;
Hops to the world that follows our current world according to the contents of
Profiles[ProfileIndex].Worlds.
Example:
WriteLn WorldSwitcher.World;
WorldSwitcher.Next();
WriteLn WorldSwitcher.World;
WorldSwitcher.Previous¶
function TRSWorldSwitcher.Previous(): Boolean;
Hops to the world that comes before our current world according to the contents
of Profiles[ProfileIndex].Worlds.
Example:
WriteLn WorldSwitcher.World;
WorldSwitcher.Previous();
WriteLn WorldSwitcher.World;
WorldSwitcher.Random¶
function TRSWorldSwitcher.Random(): Boolean;
Hops to a random world that’s in Profiles[ProfileIndex].Worlds and is not our
current world.
Example:
WriteLn WorldSwitcher.World;
WorldSwitcher.Random();
WriteLn WorldSwitcher.World;
WorldSwitcher.WaitSwitch¶
function TRSWorldSwitcher.WaitSwitch(world: Integer; failCooldown: Boolean = True): Boolean;
Exits false if “Please wait” not found, presumably due to combat.
Returns true if we find “Please wait” and finish world hopping successfully to
the specified world
WorldSwitcher variable¶
Global TRSWorldSwitcher variable.