| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Find Nearest Fuel https://mail.black-squirrel.com/viewtopic.php?f=15&t=18703 |
Page 1 of 1 |
| Author: | Singularity [ Fri Feb 09, 2007 9:15 pm ] |
| Post subject: | |
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 # ------------------------------------------------------------ ------- |
|
| Author: | Parrothead [ Fri Feb 09, 2007 9:45 pm ] |
| Post subject: | |
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. |
|
| Author: | Runaway Proton [ Fri Feb 09, 2007 10:34 pm ] |
| Post subject: | |
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 |
|
| Author: | Singularity [ Fri Feb 09, 2007 10:35 pm ] |
| Post subject: | |
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. |
|
| Author: | Singularity [ Fri Feb 09, 2007 11:02 pm ] |
| Post subject: | |
2.04 (latest release, not beta). Yea, you'll want to upgrade. |
|
| Author: | Cerne [ Sat Feb 10, 2007 2:36 am ] |
| Post subject: | |
Thanks again, this one goes on a hotkey Cerne |
|
| Author: | Maniac [ Wed Feb 14, 2007 12:51 am ] |
| Post subject: | |
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. |
|
| Author: | Vid Kid [ Wed Feb 14, 2007 7:04 am ] |
| Post subject: | |
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 .. |
|
| Author: | Cerne [ Wed Feb 14, 2007 7:24 am ] |
| Post subject: | |
Maniac wrote: Now that a mod has retired. Personally you can keep posts like this in the smack forum, please |
|
| Author: | Singularity [ Wed Feb 14, 2007 7:29 am ] |
| Post subject: | |
Doubly agreed... opinions RE moderators don't belong here. |
|
| Author: | earth [ Wed Feb 14, 2007 6:03 pm ] |
| Post subject: | |
topic is locked. open a new one please for more discussion on this issue. earth |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|