<RetVar> = A variable where the requested information is stored.
This command returns the maximum number of sectors in the x direction.
The sectors on the universe map are arranged in a coordinate system. The point of origin is Kingdom End with the coordinates x = 0, y = 0, short form: (0|0). Starting from Kingdom End the x-coordinates go rightwards and the y-coordinates downwards. So each sector has own coordinates.
Note that this command returns the maximum number of sectors and not the maximum x-coordinate. The return value of this command is '24'. Based on the fact that '0' is a valid coordinate the maximum x-coordinate is '23'.
$max.x = get max sectors in x direction
$max.y = get max sectors in y direction
$x = 0
while $x < $max.x
|$y = 0
|while $y < $max.y
||$sector = get sector from universe index: x=$x, y=$y
||if $sector -> exists
|||$ship = create ship: type=Advanced Satellite owner=Player addto=$sector x=0 y=20000 z=0
||inc $y =
inc $x =
This is an easy way to iterate through all existing sectors of the universe. That way you can do or check something in every sector. In this case a player owned Advanced satellite is built in each sector.
<RetVar> = get max sectors in y direction
- »» Universe and Sector Commands
<RetVar> = get max sectors in x direction