SRL Archive - Outdated Tutorials

[#34/35] OrderWorlds & ChooseWorldBy


Sir R. M8gic1an

2009-06-22 14:01:18


// * Procedure OrderWorlds(by: string; Descending: boolean); // by Rasta Magician
// * Function ChooseWorldBy(SettingsNames:TStringArray; SettingsDescending: TBooleanArray; Members, PVP: boolean): boolean; // by Rasta Magician

Along with WorldSwitcher.scar being moved from /misc/ to /core/ it came with two new routines!

Procedure OrderWorlds(by: string; Descending: boolean)
will sort your by "by" in order "descending"; Descending is the arrow on the left.

Function ChooseWorldBy(SettingsNames:TStringArray; SettingsDescending: TBooleanArray; Members, PVP: boolean): boolean;
Will open the world screen, and choose a world for you by settings "SettingsNames" and ordered by "SettingDescending". It will also check for Members and PVP. it Skips full worlds.
If it fails to find a world that suits you, it will call SelectWorld(RandomWorld(Members, PVP)) and return false.

here are the settings:

'world', 'players', 'location', 'activity', 'loot', 'qc' or 'quick chat', 'pvp', 'type'

Lots o' Love
SRL Development Team

cause

2009-06-23 01:46:23

Not sure if it's my script, or WorldSwitcher.scar, but it wouldn't compile:
Line 18: [Error] (20308:1): Duplicate identifier 'TWorld' in script C:\Program Files\SCAR 3.20\includes\srl/srl/core/WorldSwitcher.scar

Sir R. M8gic1an

2009-06-23 18:41:34

From: cause
Not sure if it's my script, or WorldSwitcher.scar, but it wouldn't compile:


UnInclude it from your script ;)

~RM

ShowerThoughts

2009-06-23 18:42:36

From: Rasta Magician
UnInclude it from your script ;)

~RM


It's already called in {.Include SRL/SRL.scar} since that file includes the core stuffs. ;)

Sir R. M8gic1an

2009-06-24 11:45:21

From: Hermen
It's already called in {.Include SRL/SRL.scar} since that file includes the core stuffs. ;)


were you correcting me or explaining it?

if you were correcting me maybe i should make it easier for your eyes…. UnInclude it.

~RM