Code: Select all
* need to pass sector to get from
if $sector == null
$sector = [PLAYERSHIP] -> get sector
end
append "blank entry" to array $dataarray
append "blank entry" to array $textarray
$found = [FALSE]
$flyingwarearray = find flying ware: sector= $sector maintype= null subtype= null flags= [Find.Multiple] refobj= null maxdist= null maxnum= 2147483647 , refpos= null
$ntype = 8
while $ntype < 17
$total = get number of subtypes of maintype $ntype
$nship = 0
while $nship < $total
$obj = get ware from maintype $ntype and subtype $nship
$worked = [THIS] -> call script "a.a.a.a.iftsos.anoyingcommands" : whatamidoing="index", BPid=$obj, array=$flyingwarearray, offset=0,
if $worked != -1
$obj = $flyingwarearray [ $worked ]
append $obj to array $dataarray
remove element from array $flyingwarearray at index $worked
$txt = sprintf: pageid= 8117 textid= 310 , $obj , null , null , null , null
$txt2 = sprintf: pageid= 8117 textid= 310 , $worked , null , null , null , null
$txt = $txt + ": " + $txt2
append $txt to array $textarray
$found = [TRUE]
end
if $found == [TRUE]
$found = [FALSE]
else
$found = [FALSE]
inc $nship =
end
end
inc $ntype =
append "" to array $dataarray
append "" to array $textarray
end