Kepler. Documentation · Scripts 325 functions available right now Français

Every function, in one list

Each function with its signature, what it returns and one call, then the constants. Nothing else: the why, the pitfalls and the cost in game requests are in the guide pages, which every heading links to. Your browser search finds any name here.

Output and storage

Print

Writes a line. Arguments are joined with a space.

Print(...)
// returns: nothing

Print("target", coord, "loot", loot)       // target [P:1:64:6] loot 75

print

The same, under its other name.

print(...)
// returns: nothing

Printf

Writes a formatted line, the way fmt.Printf does.

Printf(format, ...)
// returns: nothing

Printf("%d planets, %d moons", np, nm)

LogDebug

The detail that interests you alone, on a debugging day.

LogDebug(...)
// level: Info

LogDebugf

The detail that interests you alone, on a debugging day.

LogDebugf(format, ...)
// level: Info

LogInfo

The normal run: "campaign started", "twelve targets kept".

LogInfo(...)
// level: Info

LogInfo(m.SenderName, "writes:", m.Text)

LogInfof

The normal run: "campaign started", "twelve targets kept".

LogInfof(format, ...)
// level: Info

LogInfof("%d targets kept out of %d", kept, seen)

LogWarn

What deserves a look without being serious: a lost target, an unreadable page.

LogWarn(...)
// level: Warn

LogWarn("attack from", a.AttackerName, "on", a.DestinationName)

LogWarnf

What deserves a look without being serious: a lost target, an unreadable page.

LogWarnf(format, ...)
// level: Warn

LogError

What failed.

LogError(...)
// level: Error

if err != nil { LogError("reading failed:", err) }

LogErrorf

What failed.

LogErrorf(format, ...)
// level: Error

Put

Stores a value.

Put(key, value)
// returns: 1: an error

Put("last.system", 128)

Get

Reads it back. A missing key returns the empty string, without an error.

Get(key)
// returns: 2: the value and an error

sys, err = Get("last.system")         // ← TWO targets, see pitfall no. 1

Has

Says whether the key exists.

Has(key)
// returns: 1: a boolean

if Has("blacklist") {
    blacklist, err = Get("blacklist")
}

Delete

Erases.

Delete(key)
// returns: 1: a boolean

StorageKeys

Every key stored by this script.

StorageKeys()
// returns: 1: a list

for key in StorageKeys() {
    Print(key)
}

PutShared

Stores a value, readable by every bot.

PutShared(key, value)
// returns: 1: an error

PutShared("fs.target", "4:120:8")

GetShared

Reads it back. A missing key returns the empty string, without an error.

GetShared(key)
// returns: 2: the value and an error

target, err = GetShared("fs.target")    // ← TWO targets, like Get

HasShared

Says whether the key exists.

HasShared(key)
// returns: 1: a boolean

if HasShared("fs.done") {
    DeleteShared("fs.done")
}

DeleteShared

Erases.

DeleteShared(key)
// returns: 1: a boolean

DeleteShared("fs.done")

SharedKeys

Every shared key.

SharedKeys()
// returns: 1: a list

for key in SharedKeys() {
    Print(key)
}

SendDiscord

Posts to a Discord webhook.

SendDiscord(webhook, message)
// returns: 1: an error

err = SendDiscord("https://discord.com/api/webhooks/…", "debris at " + coord)

SendDiscordFile

Posts a text file as an attachment.

SendDiscordFile(webhook, name, content)
// returns: 1: an error

err = SendDiscordFile(DISCORD_WEBHOOK, "inactives.csv", rows)

SendTelegram

Writes into a Telegram conversation.

SendTelegram(chatID, message)
// returns: 1: an error

SendTelegram(0, "debris at " + coord)     // 0: the conversation from settings

Exit

Stops the script cleanly.

Exit()
// returns: nothing

Exit()

Terminate

The same.

Terminate()
// returns: nothing

IsPaused

Says whether the player has paused the script.

IsPaused()
// returns: 1: a boolean

if IsPaused() { SleepSec(30); continue }

Shuffle

Shuffles a list in place.

Shuffle(list)
// returns: nothing

Shuffle(targets)         // the order changes, the list stays the same

Bytes2Str

Converts bytes to text. Anko cannot write a []byte literal, hence this function.

Bytes2Str(bytes)
// returns: 1: a string

Notify

Writes to the account's journal, at Warn level.

Notify(title, message)
// returns: nothing

Time and waiting

Sleep

Sleep(n)
// unit: milliseconds

Sleep(500)

SleepMs

SleepMs(n)
// unit: milliseconds

SleepSec

SleepSec(n)
// unit: seconds

SleepSec(30)

SleepMin

SleepMin(n)
// unit: minutes

SleepMin(5)

SleepDur

SleepDur(d)
// unit: a duration

SleepDur(90 * time.Second)

SleepRandMs

SleepRandMs(min, max)
// unit: milliseconds

SleepRandMs(200, 800)    // ✓ you wait from 200 to 800 milliseconds

SleepRandSec

SleepRandSec(min, max)
// unit: seconds

SleepRandSec(20, 40)

SleepRandMin

SleepRandMin(min, max)
// unit: minutes

SleepRandMin(3, 8)

SleepRandHour

SleepRandHour(min, max)
// unit: hours

SleepRandHour(1, 3)

SleepUntil

SleepUntil(when)
// unit: until a given time

SleepUntil("03:30:00")           // the next time it is 3:30

Now

The present moment.

Now()
// returns: 1: a date

if end != nil && end.Sub(Now()).Minutes() < 10 {
    LogInfo("the account sleeps soon, not starting the campaign")
    return
}

GetTimestamp

The present moment in seconds since 1970.

GetTimestamp()
// returns: 1: an integer

NowTimeString

The current time, 15:04:05.

NowTimeString()
// returns: 1: a string

Clock

Clock()
// returns: 3: hour, minute, second

h, m, s = Clock()             // three targets, not one

Date

Date()
// returns: 3: year, month, day

y, mo, d = Date()

Weekday

The day of the week, Sunday being zero.

Weekday()
// returns: 1: an integer

if Weekday() == 0 { Print("Sunday") }

Unix

Rebuilds a date from a timestamp.

Unix(sec, nsec)
// returns: 1: a date

NowInTimeRange

Tells you whether the current time is in the range.

NowInTimeRange(start, end)
// returns: 1: a boolean

if NowInTimeRange("23:00:00", "07:00:00") {
    Print("it is night")            // the range crosses midnight, that is intended
}

DurationBetweenTimeStrings

The gap between two clock times.

DurationBetweenTimeStrings(a, b)
// returns: 1: a duration

MillisecondsBetweenTimeStrings

The same, in milliseconds.

MillisecondsBetweenTimeStrings(a, b)
// returns: 1: an integer

ShortDur

Writes a duration readably, 2h15m.

ShortDur(d)
// returns: 1: a string

Print(target, ShortDur(secs), "deut", fuel)

GetNextDatetimeAt

The next time it is that time of day.

GetNextDatetimeAt(h, m, s)
// returns: 2: the date and an error

when, err = GetNextDatetimeAt(3, 30, 0)    // returns TWO values

ParseNextDatetimeAt

The same, from "03:30:00".

ParseNextDatetimeAt(s)
// returns: 2: the date and an error

Scheduling

ExecIn

Calls f once, in ms milliseconds.

ExecIn(ms, f)
// returns: 1: a cancel function

cancel = ExecIn(60000, func() { Print("one minute later") })

ExecAt

Calls f once, at the stated time.

ExecAt(when, f)
// returns: 1: a cancel function

IntervalExec

Calls f every ms milliseconds, forever.

IntervalExec(ms, f)
// returns: 1: a cancel function

IntervalExec(600000, func() { Print("every ten minutes") })

CronExec

Calls f on a schedule.

CronExec(schedule, f)
// returns: 2: a number and an error

id, err = CronExec("@03h30", f)

RangeCronExec

Calls f once a day, at a time drawn at random inside the window.

RangeCronExec(start, end, label, f)
// returns: 2: a number and an error

id, err = RangeCronExec("03:00:00", "03:45:00", "night return", func() {
    Print("the fleet comes home")
})

RemoveCron

Removes a task placed by the two above.

RemoveCron(number)
// returns: 1: a boolean

if RemoveCron(id) {
    Print("unhooked")
} else {
    Print("that number no longer points at anything")
}

ExecInCh

Like ExecIn, but the channel closes after f.

ExecInCh(ms, f)
// returns: 1: a channel

<-ExecInCh(60000, func() { Print("one minute later") })

ExecAtCh

Like ExecAt, but the channel closes after f.

ExecAtCh(when, f)
// returns: 1: a channel

<-ExecAtCh(departure, func() {
    LogInfo("time to leave")
})

ExecInSync

Waits, then calls f, without handing back.

ExecInSync(ms, f)
// returns: 1: a cancel function

ExecAtSync

Waits for the stated time, then calls f.

ExecAtSync(when, f)
// returns: nothing

ExecAtSync("03:17:00", func() { BringTheFleetHome() })

WaitAttack

Waits for an attack. The boolean says whether one came.

WaitAttack(seconds)
// returns: 2: the attack and a boolean

a, seen = WaitAttack(0)

WaitAttackGone

Waits for an attack to disappear.

WaitAttackGone(seconds)
// returns: 2: the attack and a boolean

WaitChatMessage

Waits for a player to write.

WaitChatMessage(seconds)
// returns: 2: the message and a boolean

m, seen = WaitChatMessage(0)

WaitFleet

Waits for a worker to send a fleet.

WaitFleet(seconds)
// returns: 2: the fleet and a boolean

f, seen = WaitFleet(0)

WaitHunterTargetActive

Waits for a target to come back to their screen.

WaitHunterTargetActive(seconds)
// returns: 2: the change and a boolean

e, seen = WaitHunterTargetActive(0)

WaitHunterTargetIdle

Waits for a target to leave it.

WaitHunterTargetIdle(seconds)
// returns: 2: the change and a boolean

e, seen = WaitHunterTargetIdle(0)

Celestials

GetUniverseName

The universe name.

GetUniverseName()
// returns: 1: a string

Printf("%s s%d-%s", GetUniverseName(), GetServerNumber(), GetLang())

GetServerNumber

The server number: s152-en gives 152.

GetServerNumber()
// returns: 1: an integer

Printf("%s s%d-%s", GetUniverseName(), GetServerNumber(), GetLang())

GetLang

The server language code, fr, en…

GetLang()
// returns: 1: a string

Printf("%s s%d-%s", GetUniverseName(), GetServerNumber(), GetLang())

IsLoggedIn

Says whether the session is open.

IsLoggedIn()
// returns: 1: a boolean

CharacterClass

The class: NO_CLASS, COLLECTOR, GENERAL or DISCOVERER.

CharacterClass()
// returns: 1: an integer

IsCollector

Shortcut on the class.

IsCollector()
// returns: 1: a boolean

if IsCollector() {
    Print("higher cargo capacity, faster transporters")
}

IsGeneral

The same.

IsGeneral()
// returns: 1: a boolean

IsDiscoverer

The same.

IsDiscoverer()
// returns: 1: a boolean

HasCommander

Is the officer hired.

HasCommander()
// returns: 1: a boolean

HasAdmiral

The same.

HasAdmiral()
// returns: 1: a boolean

if !HasAdmiral() {
    Print("fewer fleet slots than you think")
}

HasEngineer

The same.

HasEngineer()
// returns: 1: a boolean

HasGeologist

The same.

HasGeologist()
// returns: 1: a boolean

HasTechnocrat

The same.

HasTechnocrat()
// returns: 1: a boolean

IsVacationModeEnabled

Is the account in vacation mode.

IsVacationModeEnabled()
// returns: 1: a boolean

if IsVacationModeEnabled() {
    LogWarn("vacation mode: nothing will leave, this is not a script failure")
    return
}

IsPioneers

Does the account use the "pioneers" lobby.

IsPioneers()
// returns: 1: a boolean

SetVacationMode

Freezes the account. Forty-eight hours minimum.

SetVacationMode()
// returns: 1: an error

err = SetVacationMode()

GetPlanets

All your planets.

GetPlanets()
// returns: 1: a list

planets = GetPlanets()                // ONE target: the list

GetMoons

All your moons.

GetMoons()
// returns: 1: a list

GetPlanet

One given planet.

GetPlanet(what)
// returns: 2: the planet and an error

p, err = GetPlanet("1:2:3")           // TWO targets, the doc announces the error

GetMoon

One given moon.

GetMoon(what)
// returns: 2: the moon and an error

GetCelestial

One given planet or moon, either one.

GetCelestial(what)
// returns: 2: the celestial and an error

GetCelestials

All your planets and moons together.

GetCelestials()
// returns: 2: the list and an error

c, err = GetCelestials()   // ✓ c holds the list, err holds nil

GetCachedCelestial

The celestial as the bot already knows it.

GetCachedCelestial(what)
// returns: 1: a celestial

c = GetCachedCelestial("1:2:3")

GetCachedCelestials

All your planets and moons, as the bot already knows them.

GetCachedCelestials()
// returns: 1: a list

origin = GetCachedCelestials()[0]

GetCachedPlanets

Your planets, taken from the same cache.

GetCachedPlanets()
// returns: 1: a list

c = GetCachedPlanets()[0]

GetCachedMoons

Your moons, taken from the same cache.

GetCachedMoons()
// returns: 1: a list

GetSortedCelestials

Your celestials, from nearest to farthest.

GetSortedCelestials(destination)
// returns: 1: a list

GetSortedPlanets

Your planets alone.

GetSortedPlanets(destination)
// returns: 1: a list

base = GetSortedPlanets("4:212:9")[0]     // the nearest to the target

GetSortedMoons

Your moons alone.

GetSortedMoons(destination)
// returns: 1: a list

GetResources

Metal, crystal, deuterium, energy, dark matter, population, food.

GetResources(celestial)
// returns: 2: the resources and an error

r, err = GetResources("1:2:3")

GetResourcesDetails

The same, with storage capacity and production.

GetResourcesDetails(celestial)
// returns: 2: the detail and an error

d, err = GetResourcesDetails("1:2:3")

GetAllResources

The resources of every celestial at once.

GetAllResources()
// returns: 2: a table and an error

all, err = GetAllResources()

GetEmpire

Everything about one kind of celestial: resources, mines, facilities, defences, ships.

GetEmpire(type)
// returns: 2: a list and an error

empire, err = GetEmpire(PLANET_TYPE)

GetResourcesBuildings

The nine: mines, solar plant, fusion reactor, satellites, storages.

GetResourcesBuildings(celestial)
// returns: 2: the levels and an error

bld, err = GetResourcesBuildings("1:2:3")

GetFacilities

The eleven: factories, shipyard, lab, depot, silo, terraformer, dock, lunar base, phalanx, jump gate.

GetFacilities(celestial)
// returns: 2: the levels and an error

fac, err = GetFacilities(celestial)

GetShips

What is parked there, not what is flying.

GetShips(celestial)
// returns: 2: the ships and an error

ships, err = GetShips(planet)

GetDefense

Missiles included.

GetDefense(celestial)
// returns: 2: the defences and an error

GetTechs

The whole reading at once.

GetTechs(celestial)
// returns: 6: buildings, facilities, ships, defences, researches, an error

bld, fac, shp, def, rch, err = GetTechs("1:2:3")

GetTechs2

The entire reading of a celestial.

GetTechs2(celestial)
// returns: 8: the six above, plus the lifeform buildings and researches

bld, fac, shp, def, rch, lfBld, lfRch, err = GetTechs2("1:2:3")

GetResearch

They belong to the account, not to the celestial: no argument.

GetResearch()
// returns: 1: your researches

GetProduction

Ships and defences at the shipyard.

GetProduction(celestial)
// returns: 3: the queue, the seconds left, an error

queue, left, err = GetProduction("1:2:3")

ConstructionsBeingBuilt

The building and the research under way.

ConstructionsBeingBuilt(celestial)
// returns: 4: building, seconds, research, seconds

bID, bSec, rID, rSec = ConstructionsBeingBuilt("1:2:3")

GetResourceSettings

The seven output sliders.

GetResourceSettings(planet)
// returns: 2: the settings and an error

settings, err = GetResourceSettings("1:2:3")

GetFields

GetFields(celestial)
// returns: 1: the fields, `Built` and `Total`

f = GetFields("1:2:3")

GetDiameter

The diameter, in kilometres.

GetDiameter(celestial)
// returns: 1: an integer

Print("radius:", GetDiameter("1:2:3") / 2)

Build

Building, technology, ship or defence.

Build(celestial, what, count)
// returns: 1: an error

err = Build(c.GetID(), LIGHTFIGHTER, 5)

BuildBuilding

Refuses anything that is not a building.

BuildBuilding(celestial, building)
// returns: 1: an error

BuildBuilding(c.GetID(), METALMINE)

BuildTechnology

Refuses anything that is not a technology.

BuildTechnology(celestial, technology)
// returns: 1: an error

BuildTechnology(c.GetID(), ENERGYTECHNOLOGY)

TearDown

Tears one level down.

TearDown(celestial, building)
// returns: 1: an error

TearDown(c.GetID(), SOLARPLANT)

CancelBuilding

Cancels the construction under way.

CancelBuilding(celestial)
// returns: 1: an error

CancelBuilding(c.GetID())

CancelResearch

Cancels the research under way.

CancelResearch(celestial)
// returns: 1: an error

CancelResearch(c.GetID())

GetLfBuildings

One request per call.

GetLfBuildings(celestial)
// returns: 2: the buildings and an error

b, err = GetLfBuildings(c.GetID())

GetLfResearch

One request per call.

GetLfResearch(celestial)
// returns: 2: the researches and an error

res, err = GetLfResearch(c.GetID())

GetLfBonuses

Reads the bonuses from the game.

GetLfBonuses()
// returns: 2: the bonuses and an error

fresh, err = GetLfBonuses()

GetCachedLfBonuses

What the bot already knows. No request.

GetCachedLfBonuses()
// returns: 2: the bonuses and an error

bonus, err = GetCachedLfBonuses()

GetPlanetLifeformType

One request. No error: see below.

GetPlanetLifeformType(planet)
// returns: 1: the lifeform

if GetPlanetLifeformType(p) != KAELESH {
    return                                    // this script only handles Kaelesh
}

CancelLfBuilding

Cancels the lifeform building under way.

CancelLfBuilding(celestial)
// returns: 1: an error

GetLfResearchDetails

Costs, durations and what is unlocked.

GetLfResearchDetails(celestial)
// returns: 2: the details and an error

GetChapter

Its tasks, and the state of each.

GetChapter(chapter)
// returns: 2: the chapter and an error

ChapterCollectReward

Collects the reward of one task.

ChapterCollectReward(task)
// returns: 1: an error

ChapterClaimAll

Collects everything collectable.

ChapterClaimAll(chapter)
// returns: 1: an error

err = ChapterClaimAll(4006)               // ← yours: the chapter id

SelectLfResearchSelect

Accepts the research on offer.

SelectLfResearchSelect(planet, slot)
// returns: 1: an error

SelectLfResearchRandom

Draws another one at random.

SelectLfResearchRandom(planet, slot)
// returns: 1: an error

SelectLfResearchArtifacts

Trades artifacts for it.

SelectLfResearchArtifacts(planet, slot, tech)
// returns: 1: an error

FreeResetTree

Wipes a whole tier. Free, but limited in number.

FreeResetTree(planet, tier)
// returns: 1: an error

err = FreeResetTree(p, 1)                     // tier 1, blank again

BuyResetTree

The same, paid in dark matter.

BuyResetTree(planet, tier)
// returns: 1: an error

NewResourceSettings

Composes the seven sliders.

NewResourceSettings(metal, crystal, deuterium, solar, fusion, satellite, crawler)
// returns: 1: settings

after = NewResourceSettings(before.MetalMine, before.CrystalMine, 100,
    before.SolarPlant, before.FusionReactor, before.SolarSatellite, before.Crawler)

SetResourceSettings

Applies them.

SetResourceSettings(planet, settings)
// returns: 1: an error

err = SetResourceSettings(c.GetID(), after)

TechnologyDetails

Price, duration and level, on that celestial.

TechnologyDetails(celestial, what)
// returns: 2: the details and an error

Fleets

GetFleets

Your fleets in the air, not the ones aimed at you.

GetFleets()
// returns: 2: the flights and the slots

fleets, slots = GetFleets()          // TWO targets

GetAttacks

The hostile fleets on their way to your account.

GetAttacks()
// returns: 1: a list

for a in GetAttacks() {
    Print(a.AttackerName, "arriving at", a.DestinationName, "in", a.ArriveIn, "s")
    if a.Ships == nil { Print("  composition unknown") }
}

IsUnderAttack

True if there is at least one.

IsUnderAttack()
// returns: 1: a boolean

Distance

The distance in the game's unit. No request.

Distance(origin, target)
// returns: 1: an integer

Print(Distance(origin, "1:2:4"))       // the celestial is enough, no need for .GetCoordinate()

FlightTime

One request per call.

FlightTime(origin, target, speed, fleet, mission, [holdingTime])
// returns: 2: the seconds and the deuterium

secs, fuel = FlightTime(origin, target, HUNDRED_PERCENT, fleet, TRANSPORT)

FindDebrisFieldWithMinimumTravelTime

A debris field.

FindDebrisFieldWithMinimumTravelTime(origin, fleet, minimum)
// returns: 4

dest, secs, deut, err = FindDebrisFieldWithMinimumTravelTime(p.GetCoordinate(),
    fleet, 7 * time.Hour)

FindEmptyPlanetWithMinimumTravelTime

An empty slot.

FindEmptyPlanetWithMinimumTravelTime(origin, fleet, minimum)
// returns: 4

dest, secs, deut, err = FindEmptyPlanetWithMinimumTravelTime(c.GetCoordinate(),
        fleet, HOURS * 3600)

FindInactivePlanetWithMinimumTravelTime

An inactive player.

FindInactivePlanetWithMinimumTravelTime(origin, fleet, minimum, withMoon)
// returns: 4

FindAbandonedPlanetWithMinimumTravelTime

A destroyed planet.

FindAbandonedPlanetWithMinimumTravelTime(origin, fleet, minimum, withMoon)
// returns: 4

Speed

The speed of the slowest ship, the one that dictates the flight.

Speed(fleet)
// returns: 1: an integer

Print(Speed(f), Cargo(f))

Cargo

The total cargo capacity, all resources together.

Cargo(fleet)
// returns: 1: an integer

Print(Speed(f), Cargo(f))

ShipSpeed

Its speed.

ShipSpeed(id)
// returns: 1: an integer

ShipFuel

Its reference consumption, the one that enters the fuel calculation. Never less than 1.

ShipFuel(id)
// returns: 1: an integer

ShipCargo

Its hold.

ShipCargo(id)
// returns: 1: an integer

Print(ShipCargo(LARGECARGO))     // 25000 at base, more with hyperspace

CalcCargo

Two separate solutions, not the two halves of one fleet.

CalcCargo(total)
// returns: 2: large cargos, OR small ones

lc, sc = CalcCargo(res.Total())

CalcFastCargo

The composition your ships allow.

CalcFastCargo(lcAvail, scAvail, total)
// returns: 3: large ones, small ones, and the cargo obtained

lc, sc, capacity = CalcFastCargo(10, 8, res.Total())

AttackStrength

Firepower, plus 10% of the base value per weapons level.

AttackStrength(id, researches)
// returns: 1: an integer

Print(AttackStrength(LIGHTFIGHTER, nil))               // with your researches

ShieldPower

Shield, plus 10% per shielding level.

ShieldPower(id, researches)
// returns: 1: an integer

StructuralIntegrity

Structure, plus 10% per armour level.

StructuralIntegrity(id, researches)
// returns: 1: an integer

GetPrice

n is a level for a building or a research, a number of units for a ship or a defence.

GetPrice(id, n)
// returns: 1: resources

p = GetPrice(METALMINE, 20)

ConstructionTime

Construction time, from the facilities supplied.

ConstructionTime(id, n, facilities)
// returns: 1: a duration

Print(ShortDur(ConstructionTime(LARGECARGO, 20, fac)))

TechnologyConstructionTime

Time for a research, with the lab level given plainly.

TechnologyConstructionTime(id, level, lab)
// returns: 1: a duration

Print(ShortDur(TechnologyConstructionTime(ESPIONAGETECHNOLOGY, 10, fac.ResearchLab)))

NewFleet

To be chained. nil with no session open.

NewFleet()
// returns: 1: a builder

f = NewFleet()

Phalanx

Reads what flies around a position.

Phalanx(moon, target)
// returns: 2: the flights and an error

flights, err = Phalanx(moon.GetID(), "1:2:8")

CancelFleet

Turns a flight in progress around.

CancelFleet(fleet)
// returns: 1: an error

err = CancelFleet(flight.ID)

JumpGate

Jumps ships from one moon to another.

JumpGate(origin, destination, ships)
// returns: 1: an error

err = JumpGate(moon.GetID(), destinations[0], ships)

JumpGateDestinations

What can be reached, and in how long.

JumpGateDestinations(origin)
// returns: 3: the moons, the recharge, an error

destinations, recharge, err = JumpGateDestinations(moon.GetID())

JumpGate2

The same jump, with the delay as a number.

JumpGate2(origin, destination, ships)
// returns: 3: success, the recharge, an error

sent, recharge, err = JumpGate2(moon.GetID(), destinations[0], ships)

SendDiscoveryFleet

One expedition to ONE position.

SendDiscoveryFleet(origin, destination)
// returns: 1: an error

err = SendDiscoveryFleet("1:64:8", "1:64:12")

GetDepartureTime

When to leave to arrive at the stated time.

GetDepartureTime(arrival, origin, destination, ships, speed, mission)
// returns: 1: a time

departure = GetDepartureTime("08:00:00", "1:64:8", "1:64:12", ships, TEN_PERCENT, TRANSPORT)

LowestSpeed

The cheapest speed that can still leave.

LowestSpeed(arrival, origin, destination, ships)
// returns: 4: the speed, the fuel, the departure time, an error

speed, deut, departure, err = LowestSpeed("08:00:00", "1:64:8", "1:64:12", ships)

StartPhalanxSession

Sets up the watch on a position and turns it on.

StartPhalanxSession(moon, target, interval)
// returns: 2: an id and an error

id, err = StartPhalanxSession(moon.GetID(), "1:2:8", 300)   // every 5 min

StopPhalanxSession

Turns it off.

StopPhalanxSession(id)
// returns: 1: an error

StopPhalanxSession(id)

CalcPreferredCargo

Composes a transport serving the wanted type first.

CalcPreferredCargo(preferred, probes, pathfinders, large, small, total, roundUp)
// returns: 5: probes, pathfinders, large, small, the cargo

probes, pathfinders, lc, sc, cargo = CalcPreferredCargo(LARGECARGO, 0, 0, 50, 20, 5000000, true)

CreateUnion

Opens a joint attack around a fleet.

CreateUnion(fleet, players)
// returns: 2: the union number and an error

Workers

StartBrain

Brain. Build queues and research.

StartBrain()
// returns: 1: an error

StartBrain()

StopBrain

Brain. Build queues and research.

StopBrain()
// returns: 1: an error

StopBrain()

StartScanner

The scanner. System sweeps.

StartScanner()
// returns: 1: an error

StartScanner()

StopScanner

The scanner. System sweeps.

StopScanner()
// returns: 1: an error

StopScanner()

StartHunter

The hunter. Target tracking.

StartHunter()
// returns: 1: an error

StartHunter()

StopHunter

The hunter. Target tracking.

StopHunter()
// returns: 1: an error

StopHunter()

StartSleepMode

Sleep mode. See the warning below.

StartSleepMode()
// returns: 1: an error

StopSleepMode

Sleep mode. See the warning below.

StopSleepMode()
// returns: 1: an error

StartFarmingBot

Farming. StartFarmingBot() gives the farmer a session when it has none.

StartFarmingBot()
// returns: 1: an error

StartFarmingBot()

StopFarmingBot

Farming. StartFarmingBot() gives the farmer a session when it has none.

StopFarmingBot()
// returns: 1: an error

err = StopFarmingBot()

StartFarmSession

Starts one named session, like the ▶ on its row.

StartFarmSession(session)
// returns: 1: an error

StartFarmSession(session.ID)

StartExpeditionsBot

Expeditions.

StartExpeditionsBot()
// returns: 1: an error

StartExpeditionsBot()

StopExpeditionsBot

Expeditions.

StopExpeditionsBot()
// returns: 1: an error

StopExpeditionsBot()

StartColonizerBot

The colonizer.

StartColonizerBot()
// returns: 1: an error

StartColonizerBot()

StopColonizerBot

The colonizer.

StopColonizerBot()
// returns: 1: an error

StopColonizerBot()

StartDiscoveryBot

Discovery.

StartDiscoveryBot()
// returns: 1: an error

StartDiscoveryBot()

StopDiscoveryBot

Discovery.

StopDiscoveryBot()
// returns: 1: an error

StopDiscoveryBot()

StartDefenderBot

The defender.

StartDefenderBot()
// returns: 1: an error

StartDefenderBot()

StopDefenderBot

The defender.

StopDefenderBot()
// returns: 1: an error

StopDefenderBot()

IsRunningBrainBot

True if Brain is on.

IsRunningBrainBot()
// returns: 1: a boolean

Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())

IsRunningFarmingBot

True if farming is on.

IsRunningFarmingBot()
// returns: 1: a boolean

if IsRunningFarmingBot() {
  Print("farming is running")
}

IsRunningExpeditionsBot

IsRunningExpeditionsBot()
// returns: 1: a boolean

Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())

IsRunningColonizerBot

IsRunningColonizerBot()
// returns: 1: a boolean

Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())

IsRunningDiscoveryBot

IsRunningDiscoveryBot()
// returns: 1: a boolean

Print(IsRunningDiscoveryBot(), IsRunningDefenderBot())

IsRunningDefenderBot

IsRunningDefenderBot()
// returns: 1: a boolean

Print(IsRunningDiscoveryBot(), IsRunningDefenderBot())

StartWorker

Switches the named worker on.

StartWorker(name)
// returns: 1: an error

err = StartWorker("timer")

StopWorker

Switches it off.

StopWorker(name)
// returns: 1: an error

StopWorker("spyer")

IsWorkerRunning

Says whether it is on.

IsWorkerRunning(name)
// returns: 1: a boolean

Print(name, IsWorkerRunning(name))

ListWorkers

The accepted names, in English.

ListWorkers()
// returns: 1: a list

for name in ListWorkers() {
  Print(name, IsWorkerRunning(name))
}

PauseBot

Cuts all communication with the game.

PauseBot()
// returns: 1: an error

PauseBot()

ResumeBot

Gives it back.

ResumeBot()
// returns: 1: an error

ResumeBot()

IsBotPaused

Says where things stand.

IsBotPaused()
// returns: 1: a boolean

LogOut

Alias of PauseBot, for scripts coming from Ninja.

LogOut()
// returns: 1: an error

Login

Alias of ResumeBot.

Login()
// returns: 1: an error

NewFarmSession

To chain, then BuildFarmSession().

NewFarmSession()
// returns: 1: a builder

f = NewFarmSession()

GetExpeditionsStrategynot shipped yet

Documented here, but not in the published build yet: it comes with the next bot version.

"majority", "all" or "never".

GetExpeditionsStrategy()
// returns: 1: a string

if GetExpeditionsStrategy() != "all" {
    err = SetExpeditionsStrategy("all")
    if err != nil { LogError("strategy:", err) }
}

SetExpeditionsStrategynot shipped yet

Documented here, but not in the published build yet: it comes with the next bot version.

Changes it, setting saved.

SetExpeditionsStrategy(name)
// returns: 1: an error

err = SetExpeditionsStrategy("all")

GetFleetSlotsReserved

How many slots are kept free.

GetFleetSlotsReserved()
// returns: 1: an integer

kept = GetFleetSlotsReserved()

SetFleetSlotsReserved

Changes that number, setting saved.

SetFleetSlotsReserved(n)
// returns: 1: an error

IgnorePlayer

Spares a player. Name or id.

IgnorePlayer(player)
// returns: 1: an error

IgnorePlayer("Xylo")          // by name, as on screen

IgnorePlanet

Spares a position, moon included.

IgnorePlanet(coord)
// returns: 1: an error

IgnorePlanet("1:42:8")        // the planet AND its moon

IgnoreAlliance

Spares every known member of an alliance.

IgnoreAlliance(tag)
// returns: 1: an error

IgnoreAlliance("SLD")         // every member the Scanner has seen

UnignorePlayer

Removes it from the list.

UnignorePlayer(player)
// returns: 1: an error

UnignorePlanet

UnignorePlanet(coord)
// returns: 1: an error

UnignoreAlliance

UnignoreAlliance(tag)
// returns: 1: an error

IsPlayerIgnored

Whether it is on the list.

IsPlayerIgnored(player)
// returns: 1: a boolean

if IsPlayerIgnored("Xylo") {
    Print("left alone")
}

IsPlanetIgnored

IsPlanetIgnored(coord)
// returns: 1: a boolean

IsAllianceIgnored

IsAllianceIgnored(tag)
// returns: 1: a boolean

GetIgnored

The whole list, all three kinds together.

GetIgnored()
// returns: 2: the list and an error

list, err = GetIgnored()

GetFarmBlacklist

The whole list, players and positions together.

GetFarmBlacklist()
// returns: 2: the list and an error

entries, err = GetFarmBlacklist()

AddToFarmBlacklist

A player, by name or id, or a position.

AddToFarmBlacklist(target)
// returns: 1: an error

AddToFarmBlacklist("1:42:8")      // by hand: the planet AND its moon

RemoveFromFarmBlacklist

Removing what is not there is not an error; a name nothing knows is one.

RemoveFromFarmBlacklist(target)
// returns: 1: an error

RemoveFromFarmBlacklist(e.Key)   // give back only the automatic entries

ClearFarmBlacklist

Empties it, automatic entries included.

ClearFarmBlacklist()
// returns: 1: an error

ClearFarmBlacklist()

GetHunterTargets

The players under watch.

GetHunterTargets()
// returns: 2: the list and an error

targets, err = GetHunterTargets()

AddHunterTarget

Puts a player under watch.

AddHunterTarget(player)
// returns: 1: an error

AddHunterTarget("Xylo")          // by name, as on screen

RemoveHunterTarget

Removes them, history included.

RemoveHunterTarget(player)
// returns: 1: an error

PauseHunterTarget

Suspends them without losing their history.

PauseHunterTarget(player, paused)
// returns: 1: an error

GetScripts

Every script on the account.

GetScripts()
// returns: 1: a list of names

GetRunningScripts

Those running right now.

GetRunningScripts()
// returns: 1: a list of names

IsScriptRunning

Is that one running.

IsScriptRunning(name)
// returns: 1: a boolean

if IsScriptRunning(WATCH) {
        LogInfo("the watch is already running")
        return
    }

IsPausedScript

Is that one paused.

IsPausedScript(name)
// returns: 1: a boolean

if IsPausedScript(WATCH) {
        ResumeScript(WATCH)
    }

StartScript

Starts it and returns at once.

StartScript(name)
// returns: 1: an error

StartScript("night-watch")

StopScript

Stops it.

StopScript(name)
// returns: 1: an error

StopScript("night-watch")

PauseScript

Suspends it.

PauseScript(name)
// returns: 1: an error

ResumeScript

Resumes it where it was.

ResumeScript(name)
// returns: 1: an error

ResumeScript(WATCH)

IsFarmSessionOngoing

Is a campaign working right now.

IsFarmSessionOngoing()
// returns: 1: a boolean

if IsFarmSessionOngoing() {
    PauseFarmingBot()          // giving the slots back to the Defender
    SleepMin(30)
    ResumeFarmingBot()         // and back to where we left off
}

IsPausedFarmingBot

Is a campaign paused.

IsPausedFarmingBot()
// returns: 1: a boolean

FarmingBotSessionsCount

How many campaigns are running.

FarmingBotSessionsCount()
// returns: 1: an integer

PauseFarmingBot

Suspends the running campaign.

PauseFarmingBot()
// returns: 1: an error

PauseFarmingBot()          // giving the slots back to the Defender

ResumeFarmingBot

Resumes it where it stopped.

ResumeFarmingBot()
// returns: 1: an error

ResumeFarmingBot()         // and back to where we left off

AbortAllFarmingSessions

Stops everything and removes every campaign, the running one and those from the Farmer tab included.

AbortAllFarmingSessions()
// returns: 1: an error

AbortAllFarmingSessions()   // in the evening: nothing runs, nothing from yesterday

RepatriateNow

Runs a repatriation pass without waiting.

RepatriateNow()
// returns: 1: an error

RepatriateNow()

RepatriateSetAllDestinations

That celestial receives, all the others feed it.

RepatriateSetAllDestinations(celestial)
// returns: 1: an error

RepatriateSetAllDestinations("1:64:8")

ClearAllConstructionQueues

Empties the queue of every celestial in Queue mode.

ClearAllConstructionQueues()
// returns: 1: an error

ClearAllConstructionQueues()

AddItemToQueue

Adds a line at the end of a celestial's queue.

AddItemToQueue(celestial, what, number)
// returns: 1: an error

err = AddItemToQueue(c.GetID(), METALMINE, 0)

IsStarted

Is the bot running for this account.

IsStarted()
// returns: 1: a boolean

IsActive

Will it start it again next launch.

IsActive()
// returns: 1: a boolean

GetNextSleepTime

The next time it goes to sleep.

GetNextSleepTime()
// returns: 1: a time, or `nil`

end = GetNextSleepTime()

GetNextWakeTime

The next time it wakes.

GetNextWakeTime()
// returns: 1: a time, or `nil`

SetDefenderCheckInterval

The round's interval, in seconds.

SetDefenderCheckInterval(min, max)
// returns: 1: an error

TriggerFleetSave

Sends the fleet out now, using the sleep-mode settings.

TriggerFleetSave()
// returns: 1: an error

err = TriggerFleetSave()

Galaxy

GetCachedPlayer

PlayerID, PlayerName, Points, Rank, Total, HonourPoints.

GetCachedPlayer()
// returns: 1: your own record

me = GetCachedPlayer()           // ONE target: this is a struct

GetSlots

InUse, Total, ExpInUse, ExpTotal.

GetSlots()
// returns: 1: your fleet slots

slots = GetSlots()               // ONE target as well

ServerURL

Your server's address, with no trailing slash. A Kepler addition.

ServerURL()
// returns: 2: an address and an error

addr, err = ServerURL()          // TWO targets

GalaxyInfos

The fifteen positions of a system.

GalaxyInfos(galaxy, system)
// returns: 2: the reading and an error

sys, err = GalaxyInfos(1, 224)         // TWO targets

GalaxyInfosUsing

The same, standing on a celestial.

GalaxyInfosUsing(galaxy, system, celestial)
// returns: 2: the reading and an error

sys, err = GalaxyInfosUsing(4, 116, c.GetID())

GetPlanetInfo

A single position.

GetPlanetInfo(coordinate)
// returns: 2: the position and an error

p, err = GetPlanetInfo("4:116:6")

GetPlanetInfoUsing

The same, standing on a celestial.

GetPlanetInfoUsing(coordinate, celestial)
// returns: 2: the position and an error

CoordinatesAvailableForDiscoveryFleet

The positions a lifeform expedition can be sent to, empty ones included. Empty list when there is none.

CoordinatesAvailableForDiscoveryFleet(origin, galaxy, system)
// returns: 2: the list and an error

coords, err = CoordinatesAvailableForDiscoveryFleet(origin, 1, 64)

GetSystemsInRange

In order of number.

GetSystemsInRange(origin, radius)
// returns: 1: a list of systems

Print(GetSystemsInRange(3, 2))       // [1 2 3 4 5]

GetSystemsInRangeAsc

Nearest to farthest.

GetSystemsInRangeAsc(origin, radius)
// returns: 1: a list of systems

Print(GetSystemsInRangeAsc(3, 2))    // [3 2 4 1 5]

GetSystemsInRangeDesc

Farthest to nearest.

GetSystemsInRangeDesc(origin, radius)
// returns: 1: a list of systems

Print(GetSystemsInRangeDesc(3, 2))   // [5 1 4 2 3]

PlayersData

Every player in the universe.

PlayersData()
// returns: 2: the list and an error

players, err = PlayersData()          // TWO targets

PlayerDataByID

Clean error if the ID is unknown.

PlayerDataByID(id)
// returns: 2: a player and an error

p, err = PlayerDataByID(id)

PlayerDataByName

Whole nickname, case is ignored.

PlayerDataByName(name)
// returns: 2: a player and an error

target, err = PlayerDataByName("Xylo")

HighscoreData

Through the game's API. IDs, not names.

HighscoreData(category, typ)
// returns: 2: the whole highscore and an error

ranks, err = HighscoreData(1, 0)      // players, general highscore

GetHighscore

No longer works in version 13.

GetHighscore(category, typ, page)
// returns: 2: a page and an error

PageContent

A game page, through the account's session.

PageContent(query)
// returns: 2: the text and an error

html, err = PageContent("page=ingame&component=overview")

FetchURL

Any address, through the same session.

FetchURL(url)
// returns: 2: the text and an error

body, err = FetchURL("https://example.net/api")

HttpRequest

A full request, through the same session.

HttpRequest(method, url, headers, body)
// returns: 3: the text, the code and an error

body, code, err = HttpRequest("POST", "https://example.net/api", headers, payload)

SendMessage

A private message, through the game's chat.

SendMessage(playerID, message)
// returns: 1: an error

err = SendMessage(target.ID, "Hello, I come in peace.")

GetEspionageReportMessages

The summary of each report on the first page.

GetEspionageReportMessages()
// returns: 2: the list and an error

summaries, err = GetEspionageReportMessages()

GetEspionageReportMessagesPages

The same, across several pages.

GetEspionageReportMessagesPages(pages)
// returns: 2: the list and an error

older, err = GetEspionageReportMessagesPages(3)

GetEspionageReport

The detailed report of a message.

GetEspionageReport(msgID)
// returns: 2: the report and an error

detail, err = GetEspionageReport(summaries[0].ID)

GetEspionageReportFor

The latest report on that position.

GetEspionageReportFor(coordinate)
// returns: 2: the report and an error

report, err = GetEspionageReportFor("1:2:3")

GetCombatReportSummaryFor

The latest fight at that position.

GetCombatReportSummaryFor(coordinate)
// returns: 2: the summary and an error

fight, err = GetCombatReportSummaryFor("1:2:3")

DeleteMessage

Deletes one message.

DeleteMessage(msgID)
// returns: 1: an error

DeleteMessage(summaries[0].ID)

DeleteAllMessagesFromTab

Empties a whole tab.

DeleteAllMessagesFromTab(tab)
// returns: 1: an error

DeleteAllMessagesFromTab(20)

CountColonies

What you have, what you may have.

CountColonies()
// returns: 2: the count and the maximum

count, possible = CountColonies()

Toolbox

Min

The smaller of the two.

Min(x, y)
// returns: 1: a number

Printf("%.0f", Min(3, 5))    // ✓ 3

Max

The larger of the two.

Max(x, y)
// returns: 1: a number

Abs

The absolute value.

Abs(x)
// returns: 1: a number

Ceil

The integer above.

Ceil(x)
// returns: 1: a number

Floor

The integer below.

Floor(x)
// returns: 1: a number

Floor(o["planet_id"] / 2) == 16814034   // true

Round

The nearest integer.

Round(x)
// returns: 1: a number

Itoa(Round(2.7))   // "3"

Pow

x to the power y.

Pow(x, y)
// returns: 1: a number

Print(Itoa(Pow(10, 7)))      // ✓ 10000000: go through Itoa to print

Sqrt

The square root.

Sqrt(x)
// returns: 1: a number

Random

A random integer, bounds included.

Random(min, max)
// returns: 1: an integer

Atoi

Reads an integer from text.

Atoi(text)
// returns: 1: an integer

Atoi("42")                    // 42

Itoa

Writes an integer as text.

Itoa(n)
// returns: 1: a string

Print(Itoa(Pow(10, 7)))      // ✓ 10000000: go through Itoa to print

Dotify

Formats a large number the way the game does: 1000000 gives 1.000.000.

Dotify(n)
// returns: 1: a string

Base64

Encodes.

Base64(text)
// returns: 1: a string

code = Base64("hello")

Base64Decode

Decodes.

Base64Decode(text)
// returns: 2: the text and an error

plain, err = Base64Decode(code)      // ← TWO targets

JsonDecode

Decodes JSON.

JsonDecode(data)
// returns: 2: the value and an error

o, err = JsonDecode(body)             // ← TWO targets, again

JsonEncode

Writes JSON.

JsonEncode(value)
// returns: 2: the text and an error

text, err = JsonEncode(payload)       // ← TWO targets

JsonEncodeIndent

The same, laid out.

JsonEncodeIndent(value, indent)
// returns: 2: the text and an error

MapKeys

Sorted.

MapKeys(table)
// returns: 1: the list of keys

Print(MapKeys(cache)[i], MapValues(cache)[i])

MapValues

In key order.

MapValues(table)
// returns: 1: the list of values

Print(MapKeys(cache)[i], MapValues(cache)[i])

NewShipsInfos

To be filled with .Set(id, count), then passed to FlightTime, Speed or Cargo.

NewShipsInfos()
// returns: 1: an empty fleet

fleet = NewShipsInfos()

NewResources

The three quantities in one go.

NewResources(metal, crystal, deut)
// returns: 1: resources

res = NewResources(10000, 20000, 30000)

NewCoordinate

The type is PLANET_TYPE, MOON_TYPE or DEBRIS_TYPE.

NewCoordinate(galaxy, system, position, type)
// returns: 1: a coordinate

ParseCoord

Reads "1:2:3" or "M:1:2:3".

ParseCoord(string)
// returns: 2: the coordinate and an error

coord, err = ParseCoord("M:1:2:3")     // TWO targets

ID2Str

The readable name of a ship, a defence, a building or a technology.

ID2Str(id)
// returns: 1: a string

Print(ID2Str(204))            // LightFighter

ShortShipsInfos

Sums up a fleet: LightFighter: 120, SmallCargo: 40.

ShortShipsInfos(fleet)
// returns: 1: a string

LogInfof("%s : %s", planet.Coordinate, ShortShipsInfos(ships))

VersionCompare

-1 if a is older, 0 if they are equal, 1 if a is newer.

VersionCompare(a, b)
// returns: 1: an integer

Print(VersionCompare("1.2", "1.2.0"))     // 0: absent segments count as zero

GetItems

Every item on the celestial.

GetItems(celestial)
// returns: 2: the items and an error

items, err = GetItems(c.GetID())

GetActiveItems

Only those currently in effect.

GetActiveItems(celestial)
// returns: 2: the items and an error

active, err = GetActiveItems(c.GetID())

ActivateItem

Switches on an item from the inventory.

ActivateItem(reference, celestial)
// returns: 1: an error

err = ActivateItem(o.Ref, c.GetID())

RecruitOfficer

Hires an officer. 2 commander, 3 admiral, 4 engineer, 5 geologist, 6 technocrat; 7 or 90 days.

RecruitOfficer(officer, days)
// returns: 1: an error

Print(RecruitOfficer(5, 7)) // a geologist for seven days

GetAuction

The auction under way.

GetAuction()
// returns: 2: the auction and an error

auction, err = GetAuction()

BuyOfferOfTheDay

Buys the merchant's offer.

BuyOfferOfTheDay()
// returns: 1: an error

Print(BuyOfferOfTheDay())

SendIPM

Fires missiles.

SendIPM(planet, target, count, defence)
// returns: 2: the missiles sent and an error

sent, err = SendIPM(c.GetID(), "1:1:1", 10, 0)

DestroyRockets

Destroys missiles in your silo.

DestroyRockets(planet, abm, ipm)
// returns: 1: an error

ShipsAttackStrength

The firepower of a whole fleet.

ShipsAttackStrength(ships, researches)
// returns: 1: an integer

ShipsAttackStrengthUsingOwnResearches

The same, with your own researches.

ShipsAttackStrengthUsingOwnResearches(ships)
// returns: 1: an integer

Print("firepower:", ShipsAttackStrengthUsingOwnResearches(ships))

NewTemperature

Both bounds, as the game shows them.

NewTemperature(min, max)
// returns: 1: a temperature

temp = NewTemperature(-12, 40)

SolarSatelliteProduction

The energy satellites produce.

SolarSatelliteProduction(temperature, count)
// returns: 1: an integer

Print("energy:", SolarSatelliteProduction(temp, 123))

GetRequirements

The direct requirements of a build.

GetRequirements(id)
// returns: 1: a map

Print(GetRequirements(LIGHTLASER))   // shipyard 2, laser technology 3

ConvertIntoCoordinate

Normalises anything naming a position.

ConvertIntoCoordinate(what)
// returns: 2: the coordinate and an error

GetPlayerCoordinates

The scanned positions of a player.

GetPlayerCoordinates(player)
// returns: 1: a list of coordinates

SetHomeWorld

Remembers your base.

SetHomeWorld(celestial)
// returns: 1: an error

GetHomeWorld

Reads it back.

GetHomeWorld()
// returns: 1: a celestial, or nothing

Constants and values

Reacting to an event

OnAttackCha channel of attacks
OnAttackGoneCha channel of attacks
OnStateChangeCha channel of states
OnChatMessageReceivedCha channel of messages
OnFleetCha channel of fleets
OnHunterTargetActiveCha channel of changes
OnHunterTargetIdleCha channel of changes

The four id arrays

ShipsArr16 ids
DefencesArr10 ids
TechnologiesArr16 ids
BuildingsArr23 ids

The id names

SMALLCARGO
LARGECARGO
LIGHTFIGHTER
HEAVYFIGHTER
CRUISER
BATTLESHIP
COLONYSHIP
RECYCLER
ESPIONAGEPROBE
BOMBER
DESTROYER
DEATHSTAR
BATTLECRUISER
CRAWLER
REAPER
PATHFINDER
ROCKETLAUNCHER
LIGHTLASER
HEAVYLASER
GAUSSCANNON
IONCANNON
PLASMATURRET
SMALLSHIELDDOME
LARGESHIELDDOME
ANTIBALLISTICMISSILES
INTERPLANETARYMISSILES
ESPIONAGETECHNOLOGY
COMPUTERTECHNOLOGY
WEAPONSTECHNOLOGY
SHIELDINGTECHNOLOGY
ARMOURTECHNOLOGY
ENERGYTECHNOLOGY
HYPERSPACETECHNOLOGY
COMBUSTIONDRIVE
IMPULSEDRIVE
HYPERSPACEDRIVE
LASERTECHNOLOGY
IONTECHNOLOGY
PLASMATECHNOLOGY
INTERGALACTICRESEARCHNETWORK
ASTROPHYSICS
GRAVITONTECHNOLOGY
METALMINE
CRYSTALMINE
DEUTERIUMSYNTHESIZER
SOLARPLANT
FUSIONREACTOR
SOLARSATELLITE
METALSTORAGE
CRYSTALSTORAGE
DEUTERIUMTANK
SHIELDEDMETALDEN
UNDERGROUNDCRYSTALDEN
SEABEDDEUTERIUMDEN
ALLIANCEDEPOT
ROBOTICSFACTORY
SHIPYARD
RESEARCHLAB
MISSILESILO
NANITEFACTORY
TERRAFORMER
SPACEDOCK
LUNARBASE
SENSORPHALANX
JUMPGATE

Missions

ATTACK1
GROUPEDATTACK2
TRANSPORT3
PARK4
PARKINTHATALLY5
SPY6
COLONIZE7
RECYCLEDEBRISFIELD8
DESTROY9
MISSILEATTACK10
EXPEDITION15
SEARCHFORLIFEFORMS18

Speeds

TEN_PERCENT
TWENTY_PERCENT
THIRTY_PERCENT
FORTY_PERCENT
FIFTY_PERCENT
SIXTY_PERCENT
SEVENTY_PERCENT
EIGHTY_PERCENT
NINETY_PERCENT
HUNDRED_PERCENT
FIVE_PERCENT
FIFTEEN_PERCENT
TWENTY_FIVE_PERCENT
THIRTY_FIVE_PERCENT
FORTY_FIVE_PERCENT
FIFTY_FIVE_PERCENT
SIXTY_FIVE_PERCENT
SEVENTY_FIVE_PERCENT
EIGHTY_FIVE_PERCENT
NINETY_FIVE_PERCENT

Celestial types, lifeforms, classes

PLANET_TYPE1
DEBRIS_TYPE2
MOON_TYPE3
NONE_LF_TYPE0 to 4
HUMANS0 to 4
ROCKTAL0 to 4
MECHAS0 to 4
KAELESH0 to 4
NO_CLASS0 to 3
COLLECTOR0 to 3
GENERAL0 to 3
DISCOVERER0 to 3
NO_ALLIANCE_CLASS0 to 3
WARRIOR0 to 3
TRADER0 to 3
RESEARCHER0 to 3

The dimensions of the universe

GALAXIESan integer
SYSTEMSan integer

The file, the server, the version

FILEa string
__FILE__a string
OGAME_SERVERa record
VERSIONa string
__VERSION__a string

The stub values

LICENSE_UUIDthe empty string
__LICENSE_UUID__the empty string
LICENSE_USERNAMEthe empty string
__LICENSE_USERNAME__the empty string
LICENSE_EMAILthe empty string
__LICENSE_EMAIL__the empty string
LICENSE_BOTS_ALLOWED0
__LICENSE_BOTS_ALLOWED__0
IS_CLOUDfalse
__IS_CLOUD__false
IS_SELF_HOSTtrue
__IS_SELF_HOST__true
CookieDomainthe empty string
DISCORD_WEBHOOKthe Discord webhook from the Notifications page
TELEGRAM_CHAT_IDthe Telegram chat from the Notifications page