<RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>,...

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25128
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>,...

Post by X2-Illuminatus »

<RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>


<RetVar> = A variable where the requested information is stored.
<Var/Sector> = A sector or a variable containing it.
<Var/Number> = A non-negative integer or a variable containing it.
<Var/Race> = A race, a variable containing it or 'null'.


Returns a random sector owned by the as <Var/Race> selected race not more than <Var/Number> jumps away from the as <Var/Sector> selected sector. Entering 'null' as owner race will return a sector of a random race.

Note that the returned sector can also be the starting sector.


Example:

$sector = get sector from universe index: x=1, y=3
$random.sector = find a random sector: startsector=$sector, jumps=12, owner=Argon
write to player logbook $random.sector
return null

This gets a random Argon sector not more than 12 jumps away from Argon Prime and writes it to the logbook.


Related Commands:

<RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>, security level=<Var/Number>


Command Location:
  • »» Universe and Sector Commands
    <RetVar/IF><RefObj> find all sectors within <RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25128
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 304988

Post by X2-Illuminatus »

<RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>


<RetVar> = Eine Variable, in der die geforderte Information gespeichert wird.
<Var/Sector> = Ein Sektor oder eine Variable, die einen enthält.
<Var/Number> = Eine natürliche Zahl oder eine Variable, die diese enthält.
<Var/Race> = Ein Volk, eine Variable, die eins enthält, oder 'null'.


Gibt einen zufälligen Sektor von dem als <Var/Race> ausgewählten Volk nicht mehr als <Var/Number> Sprünge entfernt vom als <Var/Sector> ausgewählten Sektor zurück. 'null' als Eingabe für das Besitzervolk wird einen Sektor von einem zufälligen Volk auswählen.

Beachte, dass der zufällige Sektor auch der Ausgangssektor sein kann.


Beispiel:

$sector = get sector from universe index: x=1, y=3
$random.sector = find a random sector: startsector=$sector, jumps=12, owner=Argonen
write to player logbook $random.sector
return null

Dies ermittelt einen zufälligen argonischen Sektor nicht mehr als 12 Sprünge entfernt von Argon Prime und schreibt ihn ins Spielerlogbuch.


Verwandte Befehle:

<RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>, security level=<Var/Number>


Zu finden unter:
  • »» Universe and Sector Commands
    <RetVar/IF><RefObj> find all sectors within <RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>

Return to “MSCI Reference”