| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Re-release of ShipScrubber (source) https://mail.black-squirrel.com/viewtopic.php?f=15&t=21686 |
Page 1 of 1 |
| Author: | mob [ Wed Mar 18, 2009 7:19 am ] |
| Post subject: | Re-release of ShipScrubber (source) |
Due to enlightenment in another thread I thought for now on my public scripts will all be open source. I by no means think Im a master scriptor but this simple little thing might help others grasp a little start for themselves. Please as with anything if you use/edit the script just give credit or ask me. DEFINITLY if you improve it let me know maybe drop me a copy, seems fair Will be uploaded to grimy and Sing's site here in the next hour or so.. Thanks to all involved for your support and thanks EP.. -mob EDIT: Only thing I added to it was comments at top.. |
|
| Author: | ElderProphet [ Wed Mar 18, 2009 7:23 pm ] |
| Post subject: | Re: Re-release of ShipScrubber (source) |
Good work on making it .ts. I'll take a look at some point and see what constructive feedback I can give. +EP+ |
|
| Author: | mob [ Wed Mar 18, 2009 7:27 pm ] |
| Post subject: | Re: Re-release of ShipScrubber (source) |
ElderProphet wrote: Good work on making it .ts. I'll take a look at some point and see what constructive feedback I can give. +EP+ I know your busy, so thank you EP. Its actually very simple....I think there are more lines for the quickstats then for my routines. In the end I had a thought about it and there are some scripts out there I wish I could see how they did it, so why not my little thing. Anyways open source for the masses to enjoy:P |
|
| Author: | mob [ Sun Mar 22, 2009 7:34 am ] |
| Post subject: | Re: Re-release of ShipScrubber (source) |
Updated shipscrubber... -Nothing major, added a port check before even checking for ships. -Rearranged script and fixed my While/If routines (Thanks EP!). -Added more comments for those who would like to examine for their use. I know this isn't a really "elite" script, but I really encourage new scriptors to start with something that is useful and not overly complicated. I hope someone find this useful to learn from or in its actual use, as always if you have any questions post here or drop me a note on ICQ. -mob |
|
| Author: | mob [ Fri Dec 18, 2009 10:17 pm ] |
| Post subject: | Re: Re-release of ShipScrubber (source) |
UPDATE: ShipScrubberv1.8 - OPEN SOURCE - Its not a real complicated script but if anyone can learn anything from it by all means please check it out. This script basically scrubs ALL OWNED ships at any class 0 port, then xports back into starting ship. Does not check for cash flow, also will not stop you from getting popped if not fedsafe. If you can make improvements please do, and let me know so maybe I can add it to a new release. **Tip** Use m()m ">moveship [sector]" to get your ships to specific sector. Run ShipScrubber v1.8 and return your ships home. ------ I didn't realize I never updated http://www.navhaz.com with the open source/updated version of shipscrubber. Sorry, has been updated to any of you who care. -mob |
|
| Author: | Decker [ Sat Dec 19, 2009 7:09 am ] |
| Post subject: | Re: Re-release of ShipScrubber (source) |
Couple pointers: -Try starting with a call to quickstats first thing. CurrentSector isn't always accurate. -Consider starting from the Port prompt instead of Command Prompt. -Check if person is Fed Safe. -Check to see if a ship is already in Tow. -Check to make sure there's enough turns -do a check with every xport to make sure you're still in the starting sector -If not 'safe' you can a list of ships at Dock by going to 'SellShips' and then do a rapid xport-scrub -Script should check to see if the respective port exist... though porting at a blown port will technically scrub a ship. heh -Do a cash on hand check. -Related to having enough cash on hand. if you remove the right space(s) from your macro strings you can detect if a limp has actually been removed, then reconcile number of ships -vs- scrubbed. Just my $0.02 Code: gosub :quikstats if ($current_prompt <> "Command") echo "***Must Start From Command Prompt!!!***" halt end #If you don't make it past this point, please don't ever run this script again! : ) if ($CURRENT_SECTOR <> STARDOCK) AND ($CURRENT_SECTOR <> 1) AND (PORT.CLASS[$CURRENT_SECTOR] <> 0) echo "***..Maybe you should retire..***" echo "***..You MUST be at a class0 or stardock to scrub..***" HALT end setVar $count 0 ###this line isn't needed working with small dynamic arrays wont impact performance #setarray $ships SECTOR.SHIPCOUNT[$CURRENT_SECTOR] #Added an an extra w incase u still have ship in tow (OOoopps!) killalltriggers send "wwn*" waiton "----------------------------------------------" settextlinetrigger noships :noships "You do not own any other ships in this sector!" settextlinetrigger ship :ship " " & $CURRENT_SECTOR & " " settextlinetrigger done :done "Choose which ship to tow (Q=Quit)" pause #common, why run this script if you have no ships?? :noships killalltriggers echo "**No Ships...**" if ($CURRENT_SECTOR = STARDOCK) send "p s g y g q q q * *" end if (($CURRENT_SECTOR = 1) OR (PORT.CLASS[$CURRENT_SECTOR] = 0)) send "p t y q *" end halt #Adding ships to array :ship killtrigger noships getword currentline $line 1 isnumber $test $line if ($test) add $count 1 setvar $ships[$count] $line end setTextlinetrigger ship :ship " " & $CURRENT_SECTOR & " " pause #Finished processing :done killalltriggers setvar $string "" if ($CURRENT_SECTOR = STARDOCK) while ($count > 0) setvar $string ($string & "x " & $ships[$count] & "* * p s g y g q q ") subtract $count 1 end setvar $string ($string & "x " & $SHIP_NUMBER & "* * p s g y g q q ") elseif (($CURRENT_SECTOR = 1) OR (PORT.CLASS[$CURRENT_SECTOR] = 0)) while ($count > 0) setvar $string ($string & "x " & $ships[$count] & "* * p t y q ") subtract $count 1 end setvar $string ($string & "x " & $SHIP_NUMBER & "* * p t y q ") end send $string halt |
|
| Author: | mob [ Sat Dec 19, 2009 7:29 am ] |
| Post subject: | Re: Re-release of ShipScrubber (source) |
Thank you Decker for your feedback. I will take a look and see what will be worth updating! |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|