<RetVar> = A variable where the requested information is stored in an array.
<Var/Ware> = A ware that is used as product.
<Var/Boolean> = A TRUE or FALSE value or its representing number 1 or 0.
This command returns an array of all stations (excluding Equipment Docks and Trading Stations) that produce the as <Var/Ware> selected ware. Setting the "include empty"-value to TRUE will return all stations producing that ware, even if they haven't it currently in stock.
Example:
$stock=0
$ware=Ore
$station.arr= get station array: product=$ware include empty=[FALSE]
$size= size of array $station.arr
while $size
|dec $size=
|$station=$station.arr[$size]
|$amount=$station -> get amount of ware $ware in cargo bay
|if $amount > $stock
||$stock=$amount
||$return.station=$station
|end
end
skip if $stock == 0
|write to player logbook $return.station
return null
This gets all stations, which produce Ore, finds out the station with the biggest amount of that ware in stock and writes it to the player logbook.
Related Commands:
<RetVar> = get station array: resource=<Var/Ware> include empty=<Var/Boolean>
<RetVar> = get station array: of race <Var/Race> class/type=<Value>
Command Location:
- »» Universe and Sector Commands
<RetVar> = get station array: product=<Var/Ware> include empty=<Var/Boolean>