View unanswered posts | View active topics It is currently Mon Apr 20, 2026 3:38 pm



Reply to topic  [ 2 posts ] 
 Can I Request a Script? 
Author Message
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 1432
Location: USA
Unread post Can I Request a Script?
I'm looking for a script to Dump my Cim and Sector information and output's a Port Pair list . As everyone knows i am NOT a Scripter but a Terminal END USER so i was wondering if any of you Script Guys could give it a whirl....TWX Proxy format only please.


Tue Oct 06, 2009 6:55 pm
Profile
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 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."


Tue Oct 06, 2009 11:22 pm
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.