|
|
|
Online Scripting Reference
|
|
getSector
|
Purpose
|
Retrieve the details of a specific sector from the TWX Proxy Database.
|
|
Syntax
|
getSector {index} var
{index}: The number of the sector to retrieve.
var: A variable-spec to hold the details of the sector being retrieved.
|
|
Notes
|
The storageVar will be segmented into several new variables by
the use of a decimal point. These new variables will be as follows:
.INDEX
.BEACON
.EXPLORED (equal to YES, NO, DENSITY, CALC)
.CONSTELLATION
.ARMIDMINES.QUANTITY
.LIMPETMINES.QUANTITY
.ARMIDMINES.OWNER
.LIMPETMINES.OWNER
.FIGS.QUANTITY
.FIGS.OWNER
.FIGS.TYPE (equal to TOLL, OFFENSIVE, DEFENSIVE)
.UPDATED
.WARPS
.DENSITY
.ANOMOLY (equal to YES, NO)
.NAVHAZ
.WARP[1]
.WARP[2]
.WARP[3]
.WARP[4]
.WARP[5]
.WARP[6]
.PORT.NAME
.PORT.CLASS
.PORT.EXISTS (equal to 1 or 0)
.PORT.BUILDTIME
.PORT.PERC_ORE
.PORT.PERC_ORG
.PORT.PERC_EQUIP
.PORT.ORE
.PORT.ORG
.PORT.EQUIP
.PORT.UPDATED
.PORT.BUY_ORE (equal to YES, NO)
.PORT.BUY_ORG (equal to YES, NO)
.PORT.BUY_EQUIP (equal to YES, NO)
.PLANETS
.PLANET[x] (where x = a number from 1 to .PLANETS)
.TRADERS
.TRADER[x].NAME (where x = a number from 1 to .TRADERS)
.TRADER[x].SHIPNAME (where x = a number from 1 to .TRADERS)
.TRADER[x].SHIP (where x = a number from 1 to .TRADERS)
.TRADER[x].FIGS (where x = a number from 1 to .TRADERS)
.SHIPS
.SHIP[x].NAME (where x = a number from 1 to .SHIPS)
.SHIP[x].SHIP (where x = a number from 1 to .SHIPS)
.SHIP[x].OWNER (where x = a number from 1 to .SHIPS)
.SHIP[x].FIGS (where x = a number from 1 to .SHIPS)
.BACKDOORS[x]
They can be referenced by VARIABLE.VALUE, for instance:
$sector.warps
Also, this command will not work with recording disabled, as it
makes use of the sector database to obtain the information it
needs. If this information is not available, the output could be
misleading
|
|
Example
|
# write dead-end list to a file
clientMessage "Querying..."
delete deadends.txt
setVar $i 1
:next
getSector $i $i
if ($i.warp[2] = 0)
write "deadends.txt" $i
end
if ($i > SECTORS)
halt
end
add $i 1
goto :next
|
| Xide - 27 January 2004 at 4:33 AM (EST) |
Where possible, you should use the system values to retrieve details from the database. The getSector command has a MASSIVE processing overhead and will take far longer to execute, especially if you are only after one specific value. This command really only exists for backwards compatibility.
|
Return to item listing |
|
|