|
|
Register •
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 7 posts ] |
|
| Author |
Message |
|
Thunder
Gunnery Sergeant
Joined: Tue Apr 15, 2008 8:57 am Posts: 29
|
 Distance Calculation
Is there a way to easily query TWX or SWATH for a listing of sectors that are X hops away from sector Y?
Thanks, Thunder
|
| Wed Sep 17, 2008 8:26 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: Distance Calculation
Swath has the ability in the sector finder. TWXproxy can do it with the GetNearestWarps command, but that takes more work.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Wed Sep 17, 2008 9:19 pm |
|
 |
|
Thunder
Gunnery Sergeant
Joined: Tue Apr 15, 2008 8:57 am Posts: 29
|
 Re: Distance Calculation
Singularity wrote: Swath has the ability in the sector finder. TWXproxy can do it with the GetNearestWarps command, but that takes more work. I don't see anything in the sector finder relating to distance. Am I missing something?
|
| Wed Sep 17, 2008 9:40 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: Distance Calculation
Hrm, thought it did... guess not. Seems that's the port finder. Guess TWXproxy is the only way.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Wed Sep 17, 2008 11:50 pm |
|
 |
|
Scrat
Chief Warrant Officer
Joined: Sun Jan 20, 2008 5:15 am Posts: 142
|
 Re: Distance Calculation
There is an indirect way to get the info you want from Swath using the Sector Finder. Run a query that will return all the sectors in the universe for example, all sectors with 1 or more warps. Then you can click on the column header for distance to sort the list by distance. Be forewarned - this will take a while to run and sort.
|
| Thu Sep 18, 2008 8:43 am |
|
 |
|
Thunder
Gunnery Sergeant
Joined: Tue Apr 15, 2008 8:57 am Posts: 29
|
 Re: Distance Calculation
Scrat wrote: There is an indirect way to get the info you want from Swath using the Sector Finder. Run a query that will return all the sectors in the universe for example, all sectors with 1 or more warps. Then you can click on the column header for distance to sort the list by distance. Be forewarned - this will take a while to run and sort. Ahh, good idea!
|
| Thu Sep 18, 2008 8:49 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: Distance Calculation
Here is the trivial way in TWX: Code: setVar $starting STARDOCK setVar $distance 5 setVar $i 1 while ($i <= SECTORS) getDistance $thisDistance $starting $i if ($thisDistance = $distance) echo "*" $i end add $i 1 end And the more astute way: Code: echo "*What is the starting sector?" getConsoleInput $starting echo "*What is the desired distance?" getConsoleInput $distance getNearestWarps $array $starting setVar $lastDistance 0 setVar $i 1 while ($i <= $array) and ($lastDistance <= $distance) getDistance $lastDistance $starting $array[$i] if ($lastDistance = $distance) echo "*" $array[$i] end add $i 1 end echo "*Complete.*" Scripts are your friend. +EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Fri Sep 19, 2008 11:03 pm |
|
 |
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 17 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
|
|