
Re: Can I Request a Script?
Exactly how do you want it to work? Output two selectable pairs, ie. BSB and BBS? Or do you want it to output Evil and/or Good pairs? Do you want the output to show quantity of product, percentage of product or both? Do you want to limit the output by quantity on hand or percentage? Finally if you use sector parameters for your fighter list to you want the output limited to figged sectors?
An old two selectable pair script is listed below. It will detect a port based on the selection (either 1st or 2nd selection) and then check the surrounding ports.
Code:
delete "PortPairList.txt"
echo ANSI_13 "*Enter the first port class (1-BBS, 2-BSB, 3-SBB, 4-SSB, 5-SBS, 6-BSS)*"
getConsoleInput $firstPortClass singlekey
echo ANSI_13 "*Enter the second port class (1-BBS, 2-BSB, 3-SBB, 4-SSB, 5-SBS, 6-BSS, 8-BBB)*"
getConsoleInput $SecondPortClass singlekey
setVar $i 2
while ($i <= SECTORS)
setVar $port2 0
setVar $ppt ""
if (port.exists[$i])
if (port.class[$i] = $firstPortClass)
setVar $class $firstPortClass
gosub :getPortType
setVar $ppt $i & "(" & $type & ") [" & port.fuel[$i]
setVar $ppt $ppt & " - " & port.Org[$i] & "-" & port.equip[$i] & "]"
setVar $nextPort $secondPortClass
elseif (port.class[$i] = $SecondPortClass)
setVar $class $secondPortClass
gosub :getPortType
setVar $ppt $i & "(" & $type & ") [" & port.fuel[$i]
setVar $ppt $ppt & "-" & port.Org[$i] & "-" & port.equip[$i] & "]"
setVar $nextPort $firstPortClass
end
end
if ($nextPort > 0)
setVar $tmpWarps 1
while ($tmpwarps <= sector.warpcount[$i])
if (port.exists[SECTOR.WARPS[$i][$tmpWarps]])
if (port.class[SECTOR.WARPS[$i][$tmpWarps]] = $nextPort)
echo ANSI_12 "+"
setVar $class $nextPort
gosub :getPortType
setVar $ppt $ppt & " - " & SECTOR.WARPS[$i][$tmpWarps] & "(" & $type & ")"
setVar $ppt $ppt & "[" & port.fuel[SECTOR.WARPS[$i][$tmpWarps]]
setVar $ppt $ppt & "-" & port.Org[SECTOR.WARPS[$i][$tmpWarps]] & "-" & port.equip[SECTOR.WARPS[$i][$tmpWarps]] & "]"
setVar $writeIt 1
end
end
add $tmpWarps 1
end
end
if ($writeIt = 1)
write "PortPairList.txt" $ppt
setVar $writeIt 0
end
add $i 1
setVar $nextPort 0
end
halt
# goSubs
:getPortType
setVar $type ""
if ($class = 1)
setVar $type "BBS"
elseif ($class = 2)
setVar $type "BSB"
elseif ($class = 3)
setVar $type "SBB"
elseif ($class = 4)
setVar $type "SSB"
elseif ($class = 5)
setVar $type "SBS"
elseif ($class = 6)
setVar $type "BSS"
elseif ($class = 7)
setVar $type "SSS"
elseif ($class = 8)
setVar $type "BBB"
end
return
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."