New TLE Community website using Eleventy. tlecommunity.com
site content wiki sample-script-commands.md
9.1 kB
Markdown
at main


title: 'Sample Script Commands' #

Sample Script Commands #

**Sample Script Commands ♦ GLC Library ♦ Lacuna Automation Library **


Introduction

This WIKI will continually expand as new 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 for you which are handy so you can setup an icon on your desktop to run your scripts when you need them or you can have it load from your desktop and remain up by putting 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 you can type the following

and most all 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 FOR GLC LIBRARY


**Assemble Halls - assemble_halls.pl **

  • assemble_halls.pl --planet “Planet” --max N --use-last --dry-run

Build Space Station Plans - ss_lab.pl

  • ss_lab.pl --planet "Planet" --level N --type Module

Module names are: art, command, food, ibs, opera, parliament, policestation, warehouse.


**Build Report - build_report.pl **

  • build_report.pl

Gives you a listing of buildings being built and time to completion on all colonies.


Building Ships - build_ships.pl

Using This Script requires you to have setup a shipyards.js file in order for it to work. Use the following script command first to setup your shipyards.js file:

Then the command below is to build excavators, but the types are easy as stating freighter, smuggler, colony, fighter, sweeper, excavator, probe, etc.. You get what I mean.

  • build_ships.pl --config ../lacuna.yml --yards shipyards.js --type excavator --number 30 --noreserve --time 300 --planet "Planet"

**Docked Ship Count - docked_ships.pl **

Gives you a listing of docked ships on all colonies.


**Eliminate Waste - send_ships.pl **

  • send_ships.pl --max N --type Ship Type --from "Planet" --own-star

Ship types could be: scow, scow_large, scow_fast, scow_mega


Equalize Waste Chain - waste_chain.pl

  • Waste_chain.pl --planet “Planet” --equalize

Fissure Report - fissure_report.pl

This program will list all fissures 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 Glyphs - push_glyphs.pl

  • push_glyphs.pl ../lacuna.yml --from "Planet" --to "Planet" --ship "Ship Type"

Pushing Plans - push_plans.pl

  • push_plans.pl --from "Planet" --to "Planet" --max 200 --ship "Ship Type"

**Repair Buildings - repair_all.pl **

  • repair_all.pl --planet “Planet” --city --platforms --station --sleep

**Pushes plans & glyphs between your own planets - sift.pl **

Examples:

Send all 1+4 glyph plans:

sift.pl --to Planet --from Planet --p_glyph --max_base 1 --min_plus 4

Send 10 gold & bauxite glyphs:

sift.pl --to Planet --from Planet --glyph_match gold --glyph bauxite --g_num 10

Send all plans & glyphs:

sift.pl --to Planet --from Planet --p_all --g_all

Send all 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 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 - 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 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

--glyph - Upgrade Glyph 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 --upgrade_buildings.pl

  • upgrade_buildings.pl --verbose --config ../lacuna.yml --number 30 --planet "Planet" --wait 0

ALPHABETICAL LISTING OF 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