--- title: 'Sample Script Commands' --- # Sample Script Commands **Sample Script Commands ♦ GLC Library **♦** Lacuna Automation Library ** --- **Introduction** This WIKI will continually expand as new [scripts](/wiki/scripts/) are introduced to the library. Anyone with knowledge of scripting that had a script command that is not listed, please feel free to edit and add sample script commands. Below the introduction will be how to setup a batch file to run your [scripts](/wiki/scripts/) for you which are handy so you can setup an icon on your desktop to run your [scripts](/wiki/scripts/) when you need them or you can have it load from your desktop and remain up by putting [scripts](/wiki/scripts/) to sleep and repeat as indicated below: **Perl Sleep Command for Batch Files** You can use this sleep command in your batch files in your LE\\GLC or MYPERL/TSEE directories to tell a script to go to sleep and run the next command or next set of commands later on. - perl -e "sleep X" - X being the number of seconds to sleep for, this can be as high as you want it to be, even days.. **Perl Batch File Auto Repeating With Sleep Command** In order to tell a script to auto repeat with sleep command's inside you would set up a batch file with the following in it: (Batch file will indicate to run every hour as shown below but you can change it to however many seconds you would like it to wait for before running again) - :BEGIN - Scriptname.pl --config ../lacuna.yml --verbose --argument --argument - perl -e "sleep 3600" - GOTO BEGIN \*\* --argument means any additional commands you may want to add for a script. To access the commands for most [scripts](/wiki/scripts/) you can type the following - scriptname.pl --help and most all [scripts](/wiki/scripts/) will indicate either command line help or a list of arguments you may add for more precise scripting. The GLC Library is listed first, the Lacuna Automation Script Library will follow below that in alphabetical order. --- _**ALPHABETICAL LISTING OF [SCRIPTS](/wiki/scripts/) FOR GLC LIBRARY**_ --- **Assemble Halls - assemble\_halls.pl ** - assemble\_halls.pl --planet “Planet” --max N --use-last --dry-run --- **Build [Space Station](/wiki/space-station/) [Plans](/wiki/plans/) - ss\_lab.pl** - ss\_lab.pl --planet "Planet" --level N --type Module Module names are: art, command, food, ibs, opera, [parliament](/wiki/parliament/), policestation, [warehouse](/wiki/warehouse/). --- **Build Report - build\_report.pl ** - build\_report.pl Gives you a listing of [buildings](/wiki/buildings/) being built and time to completion on all colonies. --- **Building [Ships](/wiki/ships/) - build\_[ships](/wiki/ships/).pl** Using This Script requires you to have setup a [shipyard](/wiki/shipyard/)s.js file in order for it to work. Use the following script command first to setup your [shipyard](/wiki/shipyard/)s.js file: - get\_[buildings](/wiki/buildings/).pl --config ../lacuna.yml --[shipyard](/wiki/shipyard/) --shipfile [shipyard](/wiki/shipyard/)s--[shipyard](/wiki/shipyard/)s.js Then the command below is to build [excavator](/wiki/excavator/)s, but the types are easy as stating [freighter](/wiki/freighter/), smuggler, colony, [fighter](/wiki/fighter/), [sweeper](/wiki/sweeper/), [excavator](/wiki/excavator/), [probe](/wiki/probe/), etc.. You get what I mean. - build\_[ships](/wiki/ships/).pl --config ../lacuna.yml --yards [shipyard](/wiki/shipyard/)s.js --type [excavator](/wiki/excavator/) --number 30 --noreserve --time 300 --planet "Planet" --- **Docked Ship Count - docked\_[ships](/wiki/ships/).pl ** - docked\_[ships](/wiki/ships/).pl Gives you a listing of docked [ships](/wiki/ships/) on all colonies. --- **Eliminate [Waste](/wiki/waste/) - send\_[ships](/wiki/ships/).pl ** - send\_[ships](/wiki/ships/).pl --max N --type Ship Type --from "Planet" --own-star Ship types could be: [scow](/wiki/scow/), [scow](/wiki/scow/)\_large, [scow](/wiki/scow/)\_fast, [scow](/wiki/scow/)\_mega --- **Equalize [Waste Chain](/wiki/waste-chain/) - [waste](/wiki/waste/)\_chain.pl** - [Waste](/wiki/waste/)\_chain.pl --planet “Planet” --equalize --- **[Fissure](/wiki/fissure/) Report - [fissure](/wiki/fissure/)\_report.pl** - **[fissure](/wiki/fissure/)\_report.pl** This program will list all [fissure](/wiki/fissure/)s that are in systems probed by your alliance. Options: --help - This info. --verbose - Print out more information --config - Specify a GLC config file, normally lacuna.yml. --zone - Specify a zone to look at. Default is all. --dumpfile - data dump for all info --- **Pushing [Glyph](/wiki/glyph/)s - push\_[glyph](/wiki/glyph/)s.pl** - push\_[glyph](/wiki/glyph/)s.pl ../lacuna.yml --from "Planet" --to "Planet" --ship "Ship Type" --- **Pushing [Plans](/wiki/plans/) - push\_[plans](/wiki/plans/).pl** - push\_[plans](/wiki/plans/).pl --from "Planet" --to "Planet" --max 200 --ship "Ship Type" --- **Repair [Buildings](/wiki/buildings/) - repair\_all.pl ** - repair\_all.pl --planet “Planet” --city --platforms --station --sleep --- **Pushes [plans](/wiki/plans/) & [glyph](/wiki/glyph/)s between your own planets - sift.pl ** - **sift.pl** Examples: Send all 1+4 [glyph](/wiki/glyph/) [plans](/wiki/plans/): sift.pl --to Planet --from Planet --p\_[glyph](/wiki/glyph/) --max\_base 1 --min\_plus 4 Send 10 gold & bauxite [glyph](/wiki/glyph/)s: sift.pl --to Planet --from Planet --[glyph](/wiki/glyph/)\_match gold --[glyph](/wiki/glyph/) bauxite --g\_num 10 Send all [plans](/wiki/plans/) & [glyph](/wiki/glyph/)s: sift.pl --to Planet --from Planet --p\_all --g\_all Send all [plans](/wiki/plans/), but Beaches: sift --to Planet --from Planet --p\_all --plan\_exclude Beach --- **Spy run - spy\_run.pl ** - spy\_run.pl: revised 12/10/13 for update 3.0896. Replaces train\_spy.pl. Captcha added. Options: \--config FILE default: lacuna.yml \--from PLANET \--target PLANET \--tid BODY\_ID (Use either tid or target, not both) \--task MISSION \--name Match name of spy, partial allowed \--min\_def Minimum Defense Rating \--min\_off Minimum Offense Rating \--max\_def Maximum Defense Rating \--max\_off Maximum Offense Rating \--number Max Number of Agents to use \--fail\_break Number of fails before giving up \--dumpfile FILE json dumpfile \--busy Use any available agents, otherwise will only use Idle \--sleep RPC sleep interval \--dryrun Do not actually run missions \--help This message CONFIG\_FILE defaults to 'lacuna.yml' \--from is the planet that your spy is from. \--target is the planet that your spy is assigned to. \--tid is the planet body id that your spy is assigned to. Usefull if target is a bunch of UTF8 chars. \--task must match one of the missions listed in the API docs: http://us1.lacunaexpanse.com/api/Intelligence.html It only needs to be long enough to uniquely match a single available mission, e.g. "gather op" will successfully match "Gather Operative Intelligence" So for example, to train [spies](/wiki/spies/) on a planet: spy\_run.pl --from "Planet X" --target "Planet X" --task "Politics Training" --- **Storage Inventory - storage\_inventory.pl** - **storage\_inventory.pl** This script will show the inventory of each planet in the user's Empire. Valid options: --food Show only Food Reservers --ore Show only Ore Storage --planet="PLANET NAME" Show information for specified planet --config FILE default: lacuna.yml --- **Train [Spies](/wiki/spies/) - train\_spy.pl ** - **train\_spy.pl was retired as of 3.0896 (12/10/13). Now using spy\_run.pl ** --- **Upgrade everything - upgrade\_all.pl ** - **upgrade\_all.pl** Options: --help - This info. --verbose - Print out more information --config FILE - Specify a GLC config file, normally lacuna.yml --planet NAME - Specify planet --dumpfile FILE - data dump for all the info we don't print --maxlevel INT - do not upgrade if this level has been achieved --maxnum INT - Use this if lower than dev ministry level --maxadd INT - Add at most INT [buildings](/wiki/buildings/) to the queue per pass --wait INT - Max number of seconds to wait to repeat loop --sleep INT - Pause between RPC calls. Default 1 --junk - Upgrade Junk [Buildings](/wiki/buildings/) --[glyph](/wiki/glyph/) - Upgrade [Glyph](/wiki/glyph/) [Buildings](/wiki/buildings/) --space - Upgrade spaceports --city - Upgrade LCOT --lab - Upgrade labs --match STRING - Only upgrade matching building names --skip STRING - Skip building names (multiple allowed) --extra STRING - Add matching names to usual list to upgrade --dry - Do not actually upgrade --- **Upgrade [Buildings](/wiki/buildings/) --upgrade\_[buildings](/wiki/buildings/).pl** - upgrade\_[buildings](/wiki/buildings/).pl --verbose --config ../lacuna.yml --number 30 --planet "Planet" --wait 0 --- _**ALPHABETICAL LISTING OF [SCRIPTS](/wiki/scripts/) FOR LACUNA AUTOMATION LIBRARY**_ Coming Soon! --- (Last Updated 11/4/14 - RedOrion) ## Community notes > **Ashmister Upson:** Hi. Where are these scripts based? I am looking to implement them on my > account. Thanks, Ash