View unanswered posts | View active topics It is currently Thu Apr 23, 2026 2:28 am



Reply to topic  [ 11 posts ] 
 Find Nearest Fuel 
Author Message
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
TS format here

For those times when you're out and about and run low on fuel... you need a figged port w/ ore and you need it quickly.

Code:
#  ------------------------------------------------------------ -------
# Dnyarri (Singularity)'s nearest unfigged sector finder.
# Useful little script that takes advantage of 2.04's BFS function
# to find the nearest unfigged sector in your DB. Requires ZTM.
# Uses Quickfig's FIGSEC parameter for fig tracking so you'll need
# that too.
#
# More scripts and info at http://www.navhaz.com
#  ------------------------------------------------------------ -------
# Search from where?
:get_start
getInput $start "Sector to search from (ENTER = your TA)? "
if ($start = "")
     gosub :get_current_sector
     setVar $start $current_sector
end
isNumber $result $start
if ($result < 1)
     goto :get_start
end
if ($start < 1) OR ($start > SECTORS)
     goto :get_start
end

# Do the search
echo ANSI_13 & "**Searching...*"
getNearestWarps $stack $start
setVar $idx 1
while ($idx <= $stack)
     setVar $this_sec $stack[$idx]
     getSectorParameter $this_sec "FIGSEC" $figged
     if ($figged = TRUE) AND (PORT.EXISTS[$this_sec] = TRUE) AND (PORT.BUYFUEL[$this_sec] = FALSE) AND ($this_sec <> RYLOS) AND ($this_sec <> ALPHACENTAURI)
           echo ANSI_14 & "Nearest figged fuel port to " & ANSI_11 & $start & ANSI_14 " is " & ANSI_10 & $stack[$idx] & ".*"
           if ($start = $this_sec)
                setVar $course_idx 0
                setVar $lane[1] $this_sec
           else
                getCourse $lane $start $this_sec
           end
           setVar $course_idx 1
           while ($course_idx <= ($lane+1))
                if ($course_idx = 1)
                      echo ANSI_2 & $lane[$course_idx]
                else
                      echo ANSI_9 & $lane[$course_idx]
                end
                if ($course_idx <= $lane)
                     # Print hop seperator if we should
                      echo ANSI_11 & ">"
                end
                add $course_idx 1
           end
           echo "**"
           send #145
           halt
     end
     add $idx 1
end

echo ANSI_14 & "No figged fuel ports found!**"
send #145

#  ------------------------------------------------------------ -------
halt
#  ------------------------------------------------------------ -------
# Get current sector - I'd use CURRENTSECTOR but it's wrong a lot.
:get_current_sector
setVar $current_sector 0

:current_sector_loop
isNumber $result $current_sector
if ($result < 1)
     send "/"
     waitFor #179
     setVar $line CURRENTLINE
     replacetext $line #179 " "
     getWord $line $current_sector 2
     goto :current_sector_loop
end
if ($current_sector < 1) OR ($current_sector > SECTORS)
     send "/"
     waitFor #179
     setVar $line CURRENTLINE
     replacetext $line #179 " "
     getWord $line $current_sector 2
     goto :current_sector_loop
end
return
#  ------------------------------------------------------------ -------

_________________
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
Image


Fri Feb 09, 2007 9:15 pm
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post 
Quote:
# Get current sector - I'd use CURRENTSECTOR but it's wrong a lot.

only updates on Command or Computer Prompt if i'm not mistaken.

_________________
Coconut Telegraph (ICQ)#586137616
Team Speak3@ 220.244.125.70:9987
Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
Image
Jesus wounldn't Subspace Crawl


Fri Feb 09, 2007 9:45 pm
Profile ICQ YIM
Gameop
User avatar

Joined: Thu Aug 24, 2006 2:00 am
Posts: 1737
Location: USA
Unread post 
Please let us know if these scripts you post (thank you) are compatible with twx beta or only final.  Some of us haven't upgraded yet LOL
 

_________________
American soldiers don't fight because they hate what's in front of them...they fight because they love what's behind them.
http://www.runawayproton.com <-- Expired
telnet://runawayproton.dyndns.org:223 V2.20b Games <-- Expired
http://www.twsubspace.com <-- Expired
Teamspeak 3 50.23.212.53:4196 <-- Expired
Just a has been now.


Fri Feb 09, 2007 10:34 pm
Profile WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Yea, but if you use it a lot you'l notice it's often blank or has just a text cut... I've had a lot of scripts die on that.

_________________
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
Image


Fri Feb 09, 2007 10:35 pm
Profile ICQ WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
2.04 (latest release, not beta).

Yea, you'll want to upgrade.

_________________
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
Image


Fri Feb 09, 2007 11:02 pm
Profile ICQ WWW
Gameop
User avatar

Joined: Sun Oct 08, 2006 2:00 am
Posts: 991
Unread post 
Thanks again, this one goes on a hotkey

Cerne

_________________
"All warfare is based on deception..." - Art of War
"Time will tell all tales" - SG
Any advanced tactic in TW is indistinguishable from cheating.


Sat Feb 10, 2007 2:36 am
Profile ICQ
Lieutenant J.G.
User avatar

Joined: Sun Mar 13, 2005 3:00 am
Posts: 387
Location: USA
Unread post 
Now that a mod has retired.
Can I make a request to have this script marked as important?

It seems that Lonestars get marked important and when I make a stink about it Zarks gets marked as important to avoid the stigma of mods playing favorites.

Or how bout editing the existing scripts and remarking them as normal. Otherwise all scripts will get marked as important.

Even a script that has no other redeeming quality, like a cby script (sorry promethius yours I like)

After further reflection I want to apologize for me jumping in before parrot had a chance to "prove" himself but I was trying to avoid the situation where one scripter MIGHT have had the mods ear and want some extra ego boost by having his script marked important. I in no way say that was happening to this topic I just wanted to make absolutely sure that it didn't.

I jumped the gun I should have waited a day or so to bring my complaints up. to see if there was really a chance that my fears would happen.
The only thing I can say in my defense was that when I posted what I feared was wrong in an appropiate fourum I got flamed this only got my dander up and I probably said things that under the heat of battle I wish I had not said.

In closing
Parrot I am sorry for pointing out things that I felt that you were doing wrong and using sarcasm to get my point across.

_________________
Find out just what any people will quietly submit to and you have the exact measure of the injustice and wrong which will be imposed on them. Frederick Douglas


Wed Feb 14, 2007 12:51 am
Profile ICQ
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1838
Location: Guam USA
Unread post 
I'll pass the word to him .. as if it may help ..
but he has deleted many cookies and p/w's to site he use to frequent .. he has deleted many icq and IM's in the past days as well.

I for one think this forum directory .. scripts .. has lost a good source of knowledge for scripting.

I for one hope the rest of the forum does'nt fall into
a place for bashing and smack talk on every thread.

If this is off topix , sorry sing and others ..
Lets get to the script ... testing now ..

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Wed Feb 14, 2007 7:04 am
Profile WWW
Gameop
User avatar

Joined: Sun Oct 08, 2006 2:00 am
Posts: 991
Unread post 
Maniac wrote:
Now that a mod has retired.


Personally you can keep posts like this in the smack forum, please

_________________
"All warfare is based on deception..." - Art of War
"Time will tell all tales" - SG
Any advanced tactic in TW is indistinguishable from cheating.


Wed Feb 14, 2007 7:24 am
Profile ICQ
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Doubly agreed... opinions RE moderators don't belong here.

_________________
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
Image


Wed Feb 14, 2007 7:29 am
Profile ICQ WWW
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 331
Location: USA
Unread post 
topic is locked. open a new one please for more discussion on this issue.
earth

_________________
ATTAC TCP/IP Helper
http://www.tw-attac.com

TWXSync Server (realtime data synchronization)
http://www.tw-attac.com/twxsync.html


Wed Feb 14, 2007 6:03 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 43 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.