I have some time off work at the minute so I decided to try my hand at this Lavishscript malarky.
The result is MiniFreighter.iss.
I know there are already several variations on this theme but they don't seem to do what I need them to do so I decided to give it a try myself.
It's very basic right now there are a few features I'm keen to add to it tomorrow. It will transport items given an item list filter from the station you're in, to a destination station in as many trips as are necessary.
I'll be adding a feature to allow you to select a station other than the one you're in as the source station as well as a switch to allow you to specify a station to go to once the freight run is completed.
Basic usage is:
run MiniFreighter <-dest destination> [-bmname sourcename] <-items itemlist>
destination - Name of the destination bookmark
bmname - Name of the temporary bookmark to mark the source station, this is optional but I would recommend supplying so people aren't using the same bookmark names
itemlist - List of items to transport passed as a token separated string. It also includes *very* basic pattern matching.
The syntax of the itemlist is "pyerite|civilian shield booster i|etc.|*veld|*scord|^laser" This will match pyerite, civilian shield booster i's, anything with veld or scord in the name and (rather redundantly) anything that doesn't have laser in the name.
The item list can also specify all to move everything.
Examples:
This will transport anything with veldspar, scordite, pyroxeres or omber anywhere in the name as well as expanded cargohold ii's. They will be taken to the station referred to by myorestash taking as many trips as required in the current ship
This will transfer all of the items from the current station to the station at mystash
This will transfer everything except items that contain hardener anywhere in their name to the station at mystash
NOTE
This is my first stab at writing in Lavishscript, so I was learning the syntax as I was writing the script. Constructive criticism is more than welcome, in fact I'd appreciate it very much if some of the more seasoned guys gave it a very quick once over to see if there are things that I'm doing that are a big no-no in Lavishscript.
I've tried to keep it neat and fairly modular without delving into the class objects just yet; My aim was to keep the amount I had to learn down to a minimum in the interest of getting this script finished, since it was completed in one evening I think I've achieved that goal.
DISCLAIMER
It's working for me, but I don't have many assets to test it with at the minute. If something goes wrong I wouldn't be surprised at all, in fact I'd be more surprised if it didn't go wrong. This is an exercise I did purely for myself and I've posted it in case anyone else finds it or any of the code contained within it useful.
The result is MiniFreighter.iss.
I know there are already several variations on this theme but they don't seem to do what I need them to do so I decided to give it a try myself.
It's very basic right now there are a few features I'm keen to add to it tomorrow. It will transport items given an item list filter from the station you're in, to a destination station in as many trips as are necessary.
I'll be adding a feature to allow you to select a station other than the one you're in as the source station as well as a switch to allow you to specify a station to go to once the freight run is completed.
Basic usage is:
run MiniFreighter <-dest destination> [-bmname sourcename] <-items itemlist>
destination - Name of the destination bookmark
bmname - Name of the temporary bookmark to mark the source station, this is optional but I would recommend supplying so people aren't using the same bookmark names
itemlist - List of items to transport passed as a token separated string. It also includes *very* basic pattern matching.
The syntax of the itemlist is "pyerite|civilian shield booster i|etc.|*veld|*scord|^laser" This will match pyerite, civilian shield booster i's, anything with veld or scord in the name and (rather redundantly) anything that doesn't have laser in the name.
The item list can also specify all to move everything.
Examples:
This will transport anything with veldspar, scordite, pyroxeres or omber anywhere in the name as well as expanded cargohold ii's. They will be taken to the station referred to by myorestash taking as many trips as required in the current ship
Code:
run minifreighter -dest myorestash -bmname depot -items "*veldspar|*scordite|*pyroxeres|*omber|expanded cargohold ii"
Code:
run minifreighter -dest mystash -items all
Code:
run minifreighter -dest mystash -items "^hardener"
NOTE
This is my first stab at writing in Lavishscript, so I was learning the syntax as I was writing the script. Constructive criticism is more than welcome, in fact I'd appreciate it very much if some of the more seasoned guys gave it a very quick once over to see if there are things that I'm doing that are a big no-no in Lavishscript.
I've tried to keep it neat and fairly modular without delving into the class objects just yet; My aim was to keep the amount I had to learn down to a minimum in the interest of getting this script finished, since it was completed in one evening I think I've achieved that goal.
DISCLAIMER
It's working for me, but I don't have many assets to test it with at the minute. If something goes wrong I wouldn't be surprised at all, in fact I'd be more surprised if it didn't go wrong. This is an exercise I did purely for myself and I've posted it in case anyone else finds it or any of the code contained within it useful.
Attachments
-
4.3 KB Views: 267