{
  "reference": "https://keplerbot.net/en/scripts",
  "language": "en",
  "count": 325,
  "functions": [
    {
      "name": "AbortAllFarmingSessions",
      "signature": "AbortAllFarmingSessions()",
      "returns": 1,
      "category": "Workers",
      "section": "Knowing what the farm is doing",
      "summary": "Stops everything and removes every campaign, the running one and those from the Farmer tab included.",
      "anchor": "workers--knowing-what-the-farm-is-doing",
      "url": "https://keplerbot.net/en/scripts/workers#workers--knowing-what-the-farm-is-doing",
      "examples": [
        "AbortAllFarmingSessions()   // in the evening: nothing runs, nothing from yesterday"
      ]
    },
    {
      "name": "Abs",
      "signature": "Abs(x)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The absolute value.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": []
    },
    {
      "name": "ActivateItem",
      "signature": "ActivateItem(reference, celestial)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "Switches on an item from the inventory.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "err = ActivateItem(o.Ref, c.GetID())"
      ]
    },
    {
      "name": "AddHunterTarget",
      "signature": "AddHunterTarget(player)",
      "returns": 1,
      "category": "Workers",
      "section": "Composing a watch list",
      "summary": "Puts a player under watch.",
      "anchor": "workers--composing-a-watch-list",
      "url": "https://keplerbot.net/en/scripts/workers#workers--composing-a-watch-list",
      "examples": [
        "AddHunterTarget(\"Xylo\")          // by name, as on screen",
        "AddHunterTarget(4242)            // or by id",
        "err = AddHunterTarget(999999)"
      ]
    },
    {
      "name": "AddItemToQueue",
      "signature": "AddItemToQueue(celestial, what, number)",
      "returns": 1,
      "since": "1.82.323",
      "category": "Workers",
      "section": "The Brain queue",
      "summary": "Adds a line at the end of a celestial's queue.",
      "anchor": "workers--the-brain-queue",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-brain-queue",
      "examples": [
        "err = AddItemToQueue(c.GetID(), METALMINE, 0)",
        "AddItemToQueue(c.GetID(), METALMINE, 0)  // one more level again",
        "AddItemToQueue(c.GetID(), BOMBER, 5)"
      ]
    },
    {
      "name": "AddToFarmBlacklist",
      "signature": "AddToFarmBlacklist(target)",
      "returns": 1,
      "since": "1.82.309",
      "category": "Workers",
      "section": "The farmer's blacklist",
      "summary": "A player, by name or id, or a position.",
      "anchor": "workers--the-farmers-blacklist",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-farmers-blacklist",
      "examples": [
        "AddToFarmBlacklist(\"1:42:8\")      // by hand: the planet AND its moon",
        "AddToFarmBlacklist(\"Xylo\")        // a player, by name",
        "AddToFarmBlacklist(4242)          // or by id"
      ]
    },
    {
      "name": "Atoi",
      "signature": "Atoi(text)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Converting between a number and a string",
      "summary": "Reads an integer from text.",
      "anchor": "outils--converting-between-a-number-and-a-string",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--converting-between-a-number-and-a-string",
      "examples": [
        "Atoi(\"42\")                    // 42",
        "Atoi(\"  42  \")                // 42, the surrounding spaces are ignored",
        "Atoi(\"+42\")                   // 42"
      ]
    },
    {
      "name": "AttackStrength",
      "signature": "AttackStrength(id, researches)",
      "returns": 1,
      "category": "Fleets",
      "section": "Combat strength",
      "summary": "Firepower, plus 10% of the base value per weapons level.",
      "anchor": "flottes--combat-strength",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--combat-strength",
      "examples": [
        "Print(AttackStrength(LIGHTFIGHTER, nil))               // with your researches",
        "Print(AttackStrength(LIGHTFIGHTER, targetResearches))  // with theirs"
      ]
    },
    {
      "name": "Base64",
      "signature": "Base64(text)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Encoding in base64",
      "summary": "Encodes.",
      "anchor": "outils--encoding-in-base64",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--encoding-in-base64",
      "examples": [
        "code = Base64(\"hello\")"
      ]
    },
    {
      "name": "Base64Decode",
      "signature": "Base64Decode(text)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Encoding in base64",
      "summary": "Decodes.",
      "anchor": "outils--encoding-in-base64",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--encoding-in-base64",
      "examples": [
        "plain, err = Base64Decode(code)      // ← TWO targets"
      ]
    },
    {
      "name": "Build",
      "signature": "Build(celestial, what, count)",
      "returns": 1,
      "category": "Celestials",
      "section": "Starting and cancelling construction",
      "summary": "Building, technology, ship or defence.",
      "anchor": "celestes--starting-and-cancelling-construction",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--starting-and-cancelling-construction",
      "examples": [
        "err = Build(c.GetID(), LIGHTFIGHTER, 5)",
        "Build(c.GetID(), LIGHTLASER, 5)"
      ]
    },
    {
      "name": "BuildBuilding",
      "signature": "BuildBuilding(celestial, building)",
      "returns": 1,
      "category": "Celestials",
      "section": "Starting and cancelling construction",
      "summary": "Refuses anything that is not a building.",
      "anchor": "celestes--starting-and-cancelling-construction",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--starting-and-cancelling-construction",
      "examples": [
        "BuildBuilding(c.GetID(), METALMINE)"
      ]
    },
    {
      "name": "BuildTechnology",
      "signature": "BuildTechnology(celestial, technology)",
      "returns": 1,
      "category": "Celestials",
      "section": "Starting and cancelling construction",
      "summary": "Refuses anything that is not a technology.",
      "anchor": "celestes--starting-and-cancelling-construction",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--starting-and-cancelling-construction",
      "examples": [
        "BuildTechnology(c.GetID(), ENERGYTECHNOLOGY)"
      ]
    },
    {
      "name": "BuyOfferOfTheDay",
      "signature": "BuyOfferOfTheDay()",
      "returns": 1,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "Buys the merchant's offer.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "Print(BuyOfferOfTheDay())"
      ]
    },
    {
      "name": "BuyResetTree",
      "signature": "BuyResetTree(planet, tier)",
      "returns": 1,
      "since": "1.82.240",
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "The same, paid in dark matter.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": []
    },
    {
      "name": "Bytes2Str",
      "signature": "Bytes2Str(bytes)",
      "returns": 1,
      "category": "Output and storage",
      "section": "A few conveniences",
      "summary": "Converts bytes to text. Anko cannot write a []byte literal, hence this function.",
      "anchor": "base--a-few-conveniences",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--a-few-conveniences",
      "examples": []
    },
    {
      "name": "CalcCargo",
      "signature": "CalcCargo(total)",
      "returns": 2,
      "category": "Fleets",
      "section": "Putting a transport together",
      "summary": "Two separate solutions, not the two halves of one fleet.",
      "anchor": "flottes--putting-a-transport-together",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--putting-a-transport-together",
      "examples": [
        "lc, sc = CalcCargo(res.Total())"
      ]
    },
    {
      "name": "CalcFastCargo",
      "signature": "CalcFastCargo(lcAvail, scAvail, total)",
      "returns": 3,
      "category": "Fleets",
      "section": "Putting a transport together",
      "summary": "The composition your ships allow.",
      "anchor": "flottes--putting-a-transport-together",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--putting-a-transport-together",
      "examples": [
        "lc, sc, capacity = CalcFastCargo(10, 8, res.Total())",
        "lc, sc, capacity = CalcFastCargo(lcAvail, scAvail, total)"
      ]
    },
    {
      "name": "CalcPreferredCargo",
      "signature": "CalcPreferredCargo(preferred, probes, pathfinders, large, small, total, roundUp)",
      "returns": 5,
      "category": "Fleets",
      "section": "Cargo, favouring one type",
      "summary": "Composes a transport serving the wanted type first.",
      "anchor": "flottes--cargo-favouring-one-type",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--cargo-favouring-one-type",
      "examples": [
        "probes, pathfinders, lc, sc, cargo = CalcPreferredCargo(LARGECARGO, 0, 0, 50, 20, 5000000, true)"
      ]
    },
    {
      "name": "CancelBuilding",
      "signature": "CancelBuilding(celestial)",
      "returns": 1,
      "category": "Celestials",
      "section": "Starting and cancelling construction",
      "summary": "Cancels the construction under way.",
      "anchor": "celestes--starting-and-cancelling-construction",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--starting-and-cancelling-construction",
      "examples": [
        "CancelBuilding(c.GetID())"
      ]
    },
    {
      "name": "CancelFleet",
      "signature": "CancelFleet(fleet)",
      "returns": 1,
      "category": "Fleets",
      "section": "Recalling a fleet",
      "summary": "Turns a flight in progress around.",
      "anchor": "flottes--recalling-a-fleet",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--recalling-a-fleet",
      "examples": [
        "err = CancelFleet(flight.ID)"
      ]
    },
    {
      "name": "CancelLfBuilding",
      "signature": "CancelLfBuilding(celestial)",
      "returns": 1,
      "category": "Celestials",
      "section": "Lifeforms, beyond the levels",
      "summary": "Cancels the lifeform building under way.",
      "anchor": "celestes--lifeforms-beyond-the-levels",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms-beyond-the-levels",
      "examples": []
    },
    {
      "name": "CancelResearch",
      "signature": "CancelResearch(celestial)",
      "returns": 1,
      "category": "Celestials",
      "section": "Starting and cancelling construction",
      "summary": "Cancels the research under way.",
      "anchor": "celestes--starting-and-cancelling-construction",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--starting-and-cancelling-construction",
      "examples": [
        "CancelResearch(c.GetID())"
      ]
    },
    {
      "name": "Cargo",
      "signature": "Cargo(fleet)",
      "returns": 1,
      "category": "Fleets",
      "section": "What a fleet carries, and how fast",
      "summary": "The total cargo capacity, all resources together.",
      "anchor": "flottes--what-a-fleet-carries-and-how-fast",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--what-a-fleet-carries-and-how-fast",
      "examples": [
        "Print(Speed(f), Cargo(f))"
      ]
    },
    {
      "name": "Ceil",
      "signature": "Ceil(x)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The integer above.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": []
    },
    {
      "name": "ChapterClaimAll",
      "signature": "ChapterClaimAll(chapter)",
      "returns": 1,
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Collects everything collectable.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": [
        "err = ChapterClaimAll(4006)               // ← yours: the chapter id",
        "err = ChapterClaimAll(CHAPTER)"
      ]
    },
    {
      "name": "ChapterCollectReward",
      "signature": "ChapterCollectReward(task)",
      "returns": 1,
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Collects the reward of one task.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": []
    },
    {
      "name": "CharacterClass",
      "signature": "CharacterClass()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The class: NO_CLASS, COLLECTOR, GENERAL or DISCOVERER.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "ClearAllConstructionQueues",
      "signature": "ClearAllConstructionQueues()",
      "returns": 1,
      "since": "1.82.323",
      "category": "Workers",
      "section": "The Brain queue",
      "summary": "Empties the queue of every celestial in Queue mode.",
      "anchor": "workers--the-brain-queue",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-brain-queue",
      "examples": [
        "ClearAllConstructionQueues()"
      ]
    },
    {
      "name": "ClearFarmBlacklist",
      "signature": "ClearFarmBlacklist()",
      "returns": 1,
      "since": "1.82.309",
      "category": "Workers",
      "section": "The farmer's blacklist",
      "summary": "Empties it, automatic entries included.",
      "anchor": "workers--the-farmers-blacklist",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-farmers-blacklist",
      "examples": [
        "ClearFarmBlacklist()"
      ]
    },
    {
      "name": "Clock",
      "signature": "Clock()",
      "returns": 3,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": [
        "h, m, s = Clock()             // three targets, not one"
      ]
    },
    {
      "name": "ConstructionsBeingBuilt",
      "signature": "ConstructionsBeingBuilt(celestial)",
      "returns": 4,
      "category": "Celestials",
      "section": "Construction under way",
      "summary": "The building and the research under way.",
      "anchor": "celestes--construction-under-way",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--construction-under-way",
      "examples": [
        "bID, bSec, rID, rSec = ConstructionsBeingBuilt(\"1:2:3\")"
      ]
    },
    {
      "name": "ConstructionTime",
      "signature": "ConstructionTime(id, n, facilities)",
      "returns": 1,
      "category": "Fleets",
      "section": "Prices and construction times",
      "summary": "Construction time, from the facilities supplied.",
      "anchor": "flottes--prices-and-construction-times",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--prices-and-construction-times",
      "examples": [
        "Print(ShortDur(ConstructionTime(LARGECARGO, 20, fac)))"
      ]
    },
    {
      "name": "ConvertIntoCoordinate",
      "signature": "ConvertIntoCoordinate(what)",
      "returns": 2,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "Normalises anything naming a position.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": []
    },
    {
      "name": "CoordinatesAvailableForDiscoveryFleet",
      "signature": "CoordinatesAvailableForDiscoveryFleet(origin, galaxy, system)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a system",
      "summary": "The positions a lifeform expedition can be sent to, empty ones included. Empty list when there is none.",
      "anchor": "galaxie--reading-a-system",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-system",
      "examples": [
        "coords, err = CoordinatesAvailableForDiscoveryFleet(origin, 1, 64)"
      ]
    },
    {
      "name": "CountColonies",
      "signature": "CountColonies()",
      "returns": 2,
      "category": "Galaxy",
      "section": "Counting your colonies",
      "summary": "What you have, what you may have.",
      "anchor": "galaxie--counting-your-colonies",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--counting-your-colonies",
      "examples": [
        "count, possible = CountColonies()",
        "colonies, possible = CountColonies()"
      ]
    },
    {
      "name": "CreateUnion",
      "signature": "CreateUnion(fleet, players)",
      "returns": 2,
      "category": "Fleets",
      "section": "The joint attack",
      "summary": "Opens a joint attack around a fleet.",
      "anchor": "flottes--the-joint-attack",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-joint-attack",
      "examples": []
    },
    {
      "name": "CronExec",
      "signature": "CronExec(schedule, f)",
      "returns": 2,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Calls f on a schedule.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "id, err = CronExec(\"@03h30\", f)",
        "CronExec(\"@04h00\", func() { Print(\"every night\") })",
        "id, err = CronExec(\"@03h30\", func() {\n    Print(\"night report\")\n})"
      ]
    },
    {
      "name": "Date",
      "signature": "Date()",
      "returns": 3,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": [
        "y, mo, d = Date()",
        "year, month, day = Date()"
      ]
    },
    {
      "name": "Delete",
      "signature": "Delete(key)",
      "returns": 1,
      "category": "Output and storage",
      "section": "Remembering between two passes",
      "summary": "Erases.",
      "anchor": "base--remembering-between-two-passes",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--remembering-between-two-passes",
      "examples": []
    },
    {
      "name": "DeleteAllMessagesFromTab",
      "signature": "DeleteAllMessagesFromTab(tab)",
      "returns": 1,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "Empties a whole tab.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "DeleteAllMessagesFromTab(20)"
      ]
    },
    {
      "name": "DeleteMessage",
      "signature": "DeleteMessage(msgID)",
      "returns": 1,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "Deletes one message.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "DeleteMessage(summaries[0].ID)"
      ]
    },
    {
      "name": "DeleteShared",
      "signature": "DeleteShared(key)",
      "returns": 1,
      "since": "1.82.374",
      "category": "Output and storage",
      "section": "Sharing between bots",
      "summary": "Erases.",
      "anchor": "base--sharing-between-bots",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--sharing-between-bots",
      "examples": [
        "DeleteShared(\"fs.done\")"
      ]
    },
    {
      "name": "DestroyRockets",
      "signature": "DestroyRockets(planet, abm, ipm)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Destroying missiles",
      "summary": "Destroys missiles in your silo.",
      "anchor": "outils--destroying-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--destroying-missiles",
      "examples": []
    },
    {
      "name": "Distance",
      "signature": "Distance(origin, target)",
      "returns": 1,
      "category": "Fleets",
      "section": "Distance and flight time",
      "summary": "The distance in the game's unit. No request.",
      "anchor": "flottes--distance-and-flight-time",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--distance-and-flight-time",
      "examples": [
        "Print(Distance(origin, \"1:2:4\"))       // the celestial is enough, no need for .GetCoordinate()",
        "if Distance(origin, target) > 5000 {\n        continue                      // free, no request\n    }"
      ]
    },
    {
      "name": "Dotify",
      "signature": "Dotify(n)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Converting between a number and a string",
      "summary": "Formats a large number the way the game does: 1000000 gives 1.000.000.",
      "anchor": "outils--converting-between-a-number-and-a-string",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--converting-between-a-number-and-a-string",
      "examples": []
    },
    {
      "name": "DurationBetweenTimeStrings",
      "signature": "DurationBetweenTimeStrings(a, b)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Comparing and measuring",
      "summary": "The gap between two clock times.",
      "anchor": "temps--comparing-and-measuring",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--comparing-and-measuring",
      "examples": []
    },
    {
      "name": "ExecAt",
      "signature": "ExecAt(when, f)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Calls f once, at the stated time.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": []
    },
    {
      "name": "ExecAtCh",
      "signature": "ExecAtCh(when, f)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Like ExecAt, but the channel closes after f.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "<-ExecAtCh(departure, func() {\n    LogInfo(\"time to leave\")\n})"
      ]
    },
    {
      "name": "ExecAtSync",
      "signature": "ExecAtSync(when, f)",
      "returns": 0,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Waits for the stated time, then calls f.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "ExecAtSync(\"03:17:00\", func() { BringTheFleetHome() })"
      ]
    },
    {
      "name": "ExecIn",
      "signature": "ExecIn(ms, f)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Calls f once, in ms milliseconds.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "cancel = ExecIn(60000, func() { Print(\"one minute later\") })"
      ]
    },
    {
      "name": "ExecInCh",
      "signature": "ExecInCh(ms, f)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Like ExecIn, but the channel closes after f.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "<-ExecInCh(60000, func() { Print(\"one minute later\") })"
      ]
    },
    {
      "name": "ExecInSync",
      "signature": "ExecInSync(ms, f)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Waits, then calls f, without handing back.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": []
    },
    {
      "name": "Exit",
      "signature": "Exit()",
      "returns": 0,
      "category": "Output and storage",
      "section": "Steering your own script",
      "summary": "Stops the script cleanly.",
      "anchor": "base--steering-your-own-script",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--steering-your-own-script",
      "examples": [
        "Exit()"
      ]
    },
    {
      "name": "FarmingBotSessionsCount",
      "signature": "FarmingBotSessionsCount()",
      "returns": 1,
      "category": "Workers",
      "section": "Knowing what the farm is doing",
      "summary": "How many campaigns are running.",
      "anchor": "workers--knowing-what-the-farm-is-doing",
      "url": "https://keplerbot.net/en/scripts/workers#workers--knowing-what-the-farm-is-doing",
      "examples": []
    },
    {
      "name": "FetchURL",
      "signature": "FetchURL(url)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a game page as it comes",
      "summary": "Any address, through the same session.",
      "anchor": "galaxie--reading-a-game-page-as-it-comes",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-game-page-as-it-comes",
      "examples": [
        "body, err = FetchURL(\"https://example.net/api\")"
      ]
    },
    {
      "name": "FindAbandonedPlanetWithMinimumTravelTime",
      "signature": "FindAbandonedPlanetWithMinimumTravelTime(origin, fleet, minimum, withMoon)",
      "returns": 4,
      "category": "Fleets",
      "section": "Finding where to send, to come home after a given hour",
      "summary": "A destroyed planet.",
      "anchor": "flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "examples": []
    },
    {
      "name": "FindDebrisFieldWithMinimumTravelTime",
      "signature": "FindDebrisFieldWithMinimumTravelTime(origin, fleet, minimum)",
      "returns": 4,
      "category": "Fleets",
      "section": "Finding where to send, to come home after a given hour",
      "summary": "A debris field.",
      "anchor": "flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "examples": [
        "dest, secs, deut, err = FindDebrisFieldWithMinimumTravelTime(p.GetCoordinate(),\n    fleet, 7 * time.Hour)",
        "FindDebrisFieldWithMinimumTravelTime(o, f, 7 * time.Hour)   // ✓",
        "FindDebrisFieldWithMinimumTravelTime(o, f, 25200)           // ✓ the same"
      ]
    },
    {
      "name": "FindEmptyPlanetWithMinimumTravelTime",
      "signature": "FindEmptyPlanetWithMinimumTravelTime(origin, fleet, minimum)",
      "returns": 4,
      "category": "Fleets",
      "section": "Finding where to send, to come home after a given hour",
      "summary": "An empty slot.",
      "anchor": "flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "examples": [
        "dest, secs, deut, err = FindEmptyPlanetWithMinimumTravelTime(c.GetCoordinate(),\n        fleet, HOURS * 3600)"
      ]
    },
    {
      "name": "FindInactivePlanetWithMinimumTravelTime",
      "signature": "FindInactivePlanetWithMinimumTravelTime(origin, fleet, minimum, withMoon)",
      "returns": 4,
      "category": "Fleets",
      "section": "Finding where to send, to come home after a given hour",
      "summary": "An inactive player.",
      "anchor": "flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--finding-where-to-send-to-come-home-after-a-given-hour",
      "examples": []
    },
    {
      "name": "FlightTime",
      "signature": "FlightTime(origin, target, speed, fleet, mission, [holdingTime])",
      "returns": 2,
      "category": "Fleets",
      "section": "Distance and flight time",
      "summary": "One request per call.",
      "anchor": "flottes--distance-and-flight-time",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--distance-and-flight-time",
      "examples": [
        "secs, fuel = FlightTime(origin, target, HUNDRED_PERCENT, fleet, TRANSPORT)",
        "secs, fuel = FlightTime(origin, \"1:2:4\", HUNDRED_PERCENT, fleet, EXPEDITION, 2)",
        "secs, fuel = FlightTime(origin,\n    target, HUNDRED_PERCENT, fleet, ATTACK)     // ✓"
      ]
    },
    {
      "name": "Floor",
      "signature": "Floor(x)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The integer below.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": [
        "Floor(o[\"planet_id\"] / 2) == 16814034   // true"
      ]
    },
    {
      "name": "FreeResetTree",
      "signature": "FreeResetTree(planet, tier)",
      "returns": 1,
      "since": "1.82.240",
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Wipes a whole tier. Free, but limited in number.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": [
        "err = FreeResetTree(p, 1)                     // tier 1, blank again"
      ]
    },
    {
      "name": "GalaxyInfos",
      "signature": "GalaxyInfos(galaxy, system)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a system",
      "summary": "The fifteen positions of a system.",
      "anchor": "galaxie--reading-a-system",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-system",
      "examples": [
        "sys, err = GalaxyInfos(1, 224)         // TWO targets",
        "sys, err = GalaxyInfos(1, s)",
        "sys, err = GalaxyInfos(3, 193)"
      ]
    },
    {
      "name": "GalaxyInfosUsing",
      "signature": "GalaxyInfosUsing(galaxy, system, celestial)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a system",
      "summary": "The same, standing on a celestial.",
      "anchor": "galaxie--reading-a-system",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-system",
      "examples": [
        "sys, err = GalaxyInfosUsing(4, 116, c.GetID())"
      ]
    },
    {
      "name": "Get",
      "signature": "Get(key)",
      "returns": 2,
      "category": "Output and storage",
      "section": "Remembering between two passes",
      "summary": "Reads it back. A missing key returns the empty string, without an error.",
      "anchor": "base--remembering-between-two-passes",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--remembering-between-two-passes",
      "examples": [
        "sys, err = Get(\"last.system\")         // ← TWO targets, see pitfall no. 1",
        "blacklist, err = Get(\"blacklist\")"
      ]
    },
    {
      "name": "GetActiveItems",
      "signature": "GetActiveItems(celestial)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "Only those currently in effect.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "active, err = GetActiveItems(c.GetID())"
      ]
    },
    {
      "name": "GetAllResources",
      "signature": "GetAllResources()",
      "returns": 2,
      "category": "Celestials",
      "section": "Resources",
      "summary": "The resources of every celestial at once.",
      "anchor": "celestes--resources",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--resources",
      "examples": [
        "all, err = GetAllResources()"
      ]
    },
    {
      "name": "GetAttacks",
      "signature": "GetAttacks()",
      "returns": 1,
      "category": "Fleets",
      "section": "What is flying, and what is incoming",
      "summary": "The hostile fleets on their way to your account.",
      "anchor": "flottes--what-is-flying-and-what-is-incoming",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--what-is-flying-and-what-is-incoming",
      "examples": [
        "for a in GetAttacks() {\n    Print(a.AttackerName, \"arriving at\", a.DestinationName, \"in\", a.ArriveIn, \"s\")\n    if a.Ships == nil { Print(\"  composition unknown\") }\n}"
      ]
    },
    {
      "name": "GetAuction",
      "signature": "GetAuction()",
      "returns": 2,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "The auction under way.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "auction, err = GetAuction()"
      ]
    },
    {
      "name": "GetCachedCelestial",
      "signature": "GetCachedCelestial(what)",
      "returns": 1,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "The celestial as the bot already knows it.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": [
        "c = GetCachedCelestial(\"1:2:3\")",
        "p = GetCachedCelestial(\"1:2:3\").GetID()",
        "moon = GetCachedCelestial(\"M:1:2:3\")"
      ]
    },
    {
      "name": "GetCachedCelestials",
      "signature": "GetCachedCelestials()",
      "returns": 1,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "All your planets and moons, as the bot already knows them.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": [
        "origin = GetCachedCelestials()[0]",
        "ships, err = GetShips(GetCachedCelestials()[0].GetID())",
        "c = GetCachedCelestials()"
      ]
    },
    {
      "name": "GetCachedLfBonuses",
      "signature": "GetCachedLfBonuses()",
      "returns": 2,
      "category": "Celestials",
      "section": "Lifeforms",
      "summary": "What the bot already knows. No request.",
      "anchor": "celestes--lifeforms",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms",
      "examples": [
        "bonus, err = GetCachedLfBonuses()"
      ]
    },
    {
      "name": "GetCachedMoons",
      "signature": "GetCachedMoons()",
      "returns": 1,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "Your moons, taken from the same cache.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": []
    },
    {
      "name": "GetCachedPlanets",
      "signature": "GetCachedPlanets()",
      "returns": 1,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "Your planets, taken from the same cache.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": [
        "c = GetCachedPlanets()[0]",
        "p = GetCachedPlanets()[0]",
        "origin = GetCachedPlanets()[0]"
      ]
    },
    {
      "name": "GetCachedPlayer",
      "signature": "GetCachedPlayer()",
      "returns": 1,
      "category": "Galaxy",
      "section": "The account",
      "summary": "PlayerID, PlayerName, Points, Rank, Total, HonourPoints.",
      "anchor": "galaxie--the-account",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-account",
      "examples": [
        "me = GetCachedPlayer()           // ONE target: this is a struct"
      ]
    },
    {
      "name": "GetCelestial",
      "signature": "GetCelestial(what)",
      "returns": 2,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "One given planet or moon, either one.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": []
    },
    {
      "name": "GetCelestials",
      "signature": "GetCelestials()",
      "returns": 2,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "All your planets and moons together.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": [
        "c, err = GetCelestials()   // ✓ c holds the list, err holds nil"
      ]
    },
    {
      "name": "GetChapter",
      "signature": "GetChapter(chapter)",
      "returns": 2,
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Its tasks, and the state of each.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": []
    },
    {
      "name": "GetCombatReportSummaryFor",
      "signature": "GetCombatReportSummaryFor(coordinate)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "The latest fight at that position.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "fight, err = GetCombatReportSummaryFor(\"1:2:3\")"
      ]
    },
    {
      "name": "GetDefense",
      "signature": "GetDefense(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "Missiles included.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": []
    },
    {
      "name": "GetDepartureTime",
      "signature": "GetDepartureTime(arrival, origin, destination, ships, speed, mission)",
      "returns": 1,
      "category": "Fleets",
      "section": "The flight backwards: starting from the arrival time",
      "summary": "When to leave to arrive at the stated time.",
      "anchor": "flottes--the-flight-backwards-starting-from-the-arrival-time",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-flight-backwards-starting-from-the-arrival-time",
      "examples": [
        "departure = GetDepartureTime(\"08:00:00\", \"1:64:8\", \"1:64:12\", ships, TEN_PERCENT, TRANSPORT)"
      ]
    },
    {
      "name": "GetDiameter",
      "signature": "GetDiameter(celestial)",
      "returns": 1,
      "category": "Celestials",
      "section": "A celestial's record",
      "summary": "The diameter, in kilometres.",
      "anchor": "celestes--a-celestials-record",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--a-celestials-record",
      "examples": [
        "Print(\"radius:\", GetDiameter(\"1:2:3\") / 2)"
      ]
    },
    {
      "name": "GetEmpire",
      "signature": "GetEmpire(type)",
      "returns": 2,
      "category": "Celestials",
      "section": "The empire in one request",
      "summary": "Everything about one kind of celestial: resources, mines, facilities, defences, ships.",
      "anchor": "celestes--the-empire-in-one-request",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--the-empire-in-one-request",
      "examples": [
        "empire, err = GetEmpire(PLANET_TYPE)"
      ]
    },
    {
      "name": "GetEspionageReport",
      "signature": "GetEspionageReport(msgID)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "The detailed report of a message.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "detail, err = GetEspionageReport(summaries[0].ID)"
      ]
    },
    {
      "name": "GetEspionageReportFor",
      "signature": "GetEspionageReportFor(coordinate)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "The latest report on that position.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "report, err = GetEspionageReportFor(\"1:2:3\")"
      ]
    },
    {
      "name": "GetEspionageReportMessages",
      "signature": "GetEspionageReportMessages()",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "The summary of each report on the first page.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "summaries, err = GetEspionageReportMessages()",
        "reports, err = GetEspionageReportMessages()"
      ]
    },
    {
      "name": "GetEspionageReportMessagesPages",
      "signature": "GetEspionageReportMessagesPages(pages)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reports and the message box",
      "summary": "The same, across several pages.",
      "anchor": "galaxie--reports-and-the-message-box",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reports-and-the-message-box",
      "examples": [
        "older, err = GetEspionageReportMessagesPages(3)"
      ]
    },
    {
      "name": "GetExpeditionsStrategy",
      "signature": "GetExpeditionsStrategy()",
      "returns": 1,
      "since": "",
      "category": "Workers",
      "section": "The expeditions strategy",
      "summary": "\"majority\", \"all\" or \"never\".",
      "anchor": "workers--the-expeditions-strategy",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-expeditions-strategy",
      "examples": [
        "if GetExpeditionsStrategy() != \"all\" {\n    err = SetExpeditionsStrategy(\"all\")\n    if err != nil { LogError(\"strategy:\", err) }\n}"
      ]
    },
    {
      "name": "GetFacilities",
      "signature": "GetFacilities(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "The eleven: factories, shipyard, lab, depot, silo, terraformer, dock, lunar base, phalanx, jump gate.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": [
        "fac, err = GetFacilities(celestial)"
      ]
    },
    {
      "name": "GetFarmBlacklist",
      "signature": "GetFarmBlacklist()",
      "returns": 2,
      "since": "1.82.309",
      "category": "Workers",
      "section": "The farmer's blacklist",
      "summary": "The whole list, players and positions together.",
      "anchor": "workers--the-farmers-blacklist",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-farmers-blacklist",
      "examples": [
        "entries, err = GetFarmBlacklist()"
      ]
    },
    {
      "name": "GetFields",
      "signature": "GetFields(celestial)",
      "returns": 1,
      "category": "Celestials",
      "section": "A celestial's record",
      "summary": "",
      "anchor": "celestes--a-celestials-record",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--a-celestials-record",
      "examples": [
        "f = GetFields(\"1:2:3\")"
      ]
    },
    {
      "name": "GetFleets",
      "signature": "GetFleets()",
      "returns": 2,
      "category": "Fleets",
      "section": "What is flying, and what is incoming",
      "summary": "Your fleets in the air, not the ones aimed at you.",
      "anchor": "flottes--what-is-flying-and-what-is-incoming",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--what-is-flying-and-what-is-incoming",
      "examples": [
        "fleets, slots = GetFleets()          // TWO targets",
        "flights, slots = GetFleets()"
      ]
    },
    {
      "name": "GetFleetSlotsReserved",
      "signature": "GetFleetSlotsReserved()",
      "returns": 1,
      "category": "Workers",
      "section": "The fleet slot reserve",
      "summary": "How many slots are kept free.",
      "anchor": "workers--the-fleet-slot-reserve",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-fleet-slot-reserve",
      "examples": [
        "kept = GetFleetSlotsReserved()",
        "if slots.Total - slots.InUse <= GetFleetSlotsReserved() {\n    return                          // leaving room for the Defender\n}",
        "if slots.Total - slots.InUse <= GetFleetSlotsReserved() {\n        LogWarn(\"no room left, leaving the Defender some air\")\n        return\n    }"
      ]
    },
    {
      "name": "GetHighscore",
      "signature": "GetHighscore(category, typ, page)",
      "returns": 2,
      "category": "Galaxy",
      "section": "The highscore",
      "summary": "No longer works in version 13.",
      "anchor": "galaxie--the-highscore",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-highscore",
      "examples": []
    },
    {
      "name": "GetHomeWorld",
      "signature": "GetHomeWorld()",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "Reads it back.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": []
    },
    {
      "name": "GetHunterTargets",
      "signature": "GetHunterTargets()",
      "returns": 2,
      "category": "Workers",
      "section": "Composing a watch list",
      "summary": "The players under watch.",
      "anchor": "workers--composing-a-watch-list",
      "url": "https://keplerbot.net/en/scripts/workers#workers--composing-a-watch-list",
      "examples": [
        "targets, err = GetHunterTargets()"
      ]
    },
    {
      "name": "GetIgnored",
      "signature": "GetIgnored()",
      "returns": 2,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "The whole list, all three kinds together.",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": [
        "list, err = GetIgnored()"
      ]
    },
    {
      "name": "GetItems",
      "signature": "GetItems(celestial)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "Every item on the celestial.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "items, err = GetItems(c.GetID())"
      ]
    },
    {
      "name": "GetLang",
      "signature": "GetLang()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing where you are",
      "summary": "The server language code, fr, en…",
      "anchor": "celestes--knowing-where-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-where-you-are",
      "examples": [
        "Printf(\"%s s%d-%s\", GetUniverseName(), GetServerNumber(), GetLang())"
      ]
    },
    {
      "name": "GetLfBonuses",
      "signature": "GetLfBonuses()",
      "returns": 2,
      "category": "Celestials",
      "section": "Lifeforms",
      "summary": "Reads the bonuses from the game.",
      "anchor": "celestes--lifeforms",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms",
      "examples": [
        "fresh, err = GetLfBonuses()"
      ]
    },
    {
      "name": "GetLfBuildings",
      "signature": "GetLfBuildings(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "Lifeforms",
      "summary": "One request per call.",
      "anchor": "celestes--lifeforms",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms",
      "examples": [
        "b, err = GetLfBuildings(c.GetID())"
      ]
    },
    {
      "name": "GetLfResearch",
      "signature": "GetLfResearch(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "Lifeforms",
      "summary": "One request per call.",
      "anchor": "celestes--lifeforms",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms",
      "examples": [
        "res, err = GetLfResearch(c.GetID())"
      ]
    },
    {
      "name": "GetLfResearchDetails",
      "signature": "GetLfResearchDetails(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "Lifeforms, beyond the levels",
      "summary": "Costs, durations and what is unlocked.",
      "anchor": "celestes--lifeforms-beyond-the-levels",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms-beyond-the-levels",
      "examples": []
    },
    {
      "name": "GetMoon",
      "signature": "GetMoon(what)",
      "returns": 2,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "One given moon.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": []
    },
    {
      "name": "GetMoons",
      "signature": "GetMoons()",
      "returns": 1,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "All your moons.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": []
    },
    {
      "name": "GetNextDatetimeAt",
      "signature": "GetNextDatetimeAt(h, m, s)",
      "returns": 2,
      "category": "Time and waiting",
      "section": "Comparing and measuring",
      "summary": "The next time it is that time of day.",
      "anchor": "temps--comparing-and-measuring",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--comparing-and-measuring",
      "examples": [
        "when, err = GetNextDatetimeAt(3, 30, 0)    // returns TWO values"
      ]
    },
    {
      "name": "GetNextSleepTime",
      "signature": "GetNextSleepTime()",
      "returns": 1,
      "category": "Workers",
      "section": "Sleep, and the Defender's interval",
      "summary": "The next time it goes to sleep.",
      "anchor": "workers--sleep-and-the-defenders-interval",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sleep-and-the-defenders-interval",
      "examples": [
        "end = GetNextSleepTime()"
      ]
    },
    {
      "name": "GetNextWakeTime",
      "signature": "GetNextWakeTime()",
      "returns": 1,
      "category": "Workers",
      "section": "Sleep, and the Defender's interval",
      "summary": "The next time it wakes.",
      "anchor": "workers--sleep-and-the-defenders-interval",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sleep-and-the-defenders-interval",
      "examples": []
    },
    {
      "name": "GetPlanet",
      "signature": "GetPlanet(what)",
      "returns": 2,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "One given planet.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": [
        "p, err = GetPlanet(\"1:2:3\")           // TWO targets, the doc announces the error"
      ]
    },
    {
      "name": "GetPlanetInfo",
      "signature": "GetPlanetInfo(coordinate)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a system",
      "summary": "A single position.",
      "anchor": "galaxie--reading-a-system",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-system",
      "examples": [
        "p, err = GetPlanetInfo(\"4:116:6\")"
      ]
    },
    {
      "name": "GetPlanetInfoUsing",
      "signature": "GetPlanetInfoUsing(coordinate, celestial)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a system",
      "summary": "The same, standing on a celestial.",
      "anchor": "galaxie--reading-a-system",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-system",
      "examples": []
    },
    {
      "name": "GetPlanetLifeformType",
      "signature": "GetPlanetLifeformType(planet)",
      "returns": 1,
      "since": "1.82.240",
      "category": "Celestials",
      "section": "Lifeforms",
      "summary": "One request. No error: see below.",
      "anchor": "celestes--lifeforms",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--lifeforms",
      "examples": [
        "if GetPlanetLifeformType(p) != KAELESH {\n    return                                    // this script only handles Kaelesh\n}"
      ]
    },
    {
      "name": "GetPlanets",
      "signature": "GetPlanets()",
      "returns": 1,
      "category": "Celestials",
      "section": "Planets and moons",
      "summary": "All your planets.",
      "anchor": "celestes--planets-and-moons",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--planets-and-moons",
      "examples": [
        "planets = GetPlanets()                // ONE target: the list",
        "for p in GetPlanets() {\n        Print(p.GetName(), all[p.GetID()].Metal)\n    }"
      ]
    },
    {
      "name": "GetPlayerCoordinates",
      "signature": "GetPlayerCoordinates(player)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "The scanned positions of a player.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": []
    },
    {
      "name": "GetPrice",
      "signature": "GetPrice(id, n)",
      "returns": 1,
      "category": "Fleets",
      "section": "Prices and construction times",
      "summary": "n is a level for a building or a research, a number of units for a ship or a defence.",
      "anchor": "flottes--prices-and-construction-times",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--prices-and-construction-times",
      "examples": [
        "p = GetPrice(METALMINE, 20)"
      ]
    },
    {
      "name": "GetProduction",
      "signature": "GetProduction(celestial)",
      "returns": 3,
      "category": "Celestials",
      "section": "Construction under way",
      "summary": "Ships and defences at the shipyard.",
      "anchor": "celestes--construction-under-way",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--construction-under-way",
      "examples": [
        "queue, left, err = GetProduction(\"1:2:3\")"
      ]
    },
    {
      "name": "GetRequirements",
      "signature": "GetRequirements(id)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "The direct requirements of a build.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": [
        "Print(GetRequirements(LIGHTLASER))   // shipyard 2, laser technology 3"
      ]
    },
    {
      "name": "GetResearch",
      "signature": "GetResearch()",
      "returns": 1,
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "They belong to the account, not to the celestial: no argument.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": []
    },
    {
      "name": "GetResources",
      "signature": "GetResources(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "Resources",
      "summary": "Metal, crystal, deuterium, energy, dark matter, population, food.",
      "anchor": "celestes--resources",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--resources",
      "examples": [
        "r, err = GetResources(\"1:2:3\")",
        "res, err = GetResources(c.GetID())   // ✓ the same reading",
        "res, err = GetResources(c[i].GetID())"
      ]
    },
    {
      "name": "GetResourcesBuildings",
      "signature": "GetResourcesBuildings(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "The nine: mines, solar plant, fusion reactor, satellites, storages.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": [
        "bld, err = GetResourcesBuildings(\"1:2:3\")"
      ]
    },
    {
      "name": "GetResourcesDetails",
      "signature": "GetResourcesDetails(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "Resources",
      "summary": "The same, with storage capacity and production.",
      "anchor": "celestes--resources",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--resources",
      "examples": [
        "d, err = GetResourcesDetails(\"1:2:3\")"
      ]
    },
    {
      "name": "GetResourceSettings",
      "signature": "GetResourceSettings(planet)",
      "returns": 2,
      "category": "Celestials",
      "section": "The production sliders",
      "summary": "The seven output sliders.",
      "anchor": "celestes--the-production-sliders",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--the-production-sliders",
      "examples": [
        "settings, err = GetResourceSettings(\"1:2:3\")",
        "before, err = GetResourceSettings(c.GetID())"
      ]
    },
    {
      "name": "GetRunningScripts",
      "signature": "GetRunningScripts()",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Those running right now.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": []
    },
    {
      "name": "GetScripts",
      "signature": "GetScripts()",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Every script on the account.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": []
    },
    {
      "name": "GetServerNumber",
      "signature": "GetServerNumber()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing where you are",
      "summary": "The server number: s152-en gives 152.",
      "anchor": "celestes--knowing-where-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-where-you-are",
      "examples": [
        "Printf(\"%s s%d-%s\", GetUniverseName(), GetServerNumber(), GetLang())"
      ]
    },
    {
      "name": "GetShared",
      "signature": "GetShared(key)",
      "returns": 2,
      "since": "1.82.374",
      "category": "Output and storage",
      "section": "Sharing between bots",
      "summary": "Reads it back. A missing key returns the empty string, without an error.",
      "anchor": "base--sharing-between-bots",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--sharing-between-bots",
      "examples": [
        "target, err = GetShared(\"fs.target\")    // ← TWO targets, like Get"
      ]
    },
    {
      "name": "GetShips",
      "signature": "GetShips(celestial)",
      "returns": 2,
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "What is parked there, not what is flying.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": [
        "ships, err = GetShips(planet)",
        "ships, err = GetShips(GetCachedCelestials()[0].GetID())",
        "fleet, err = GetShips(c.GetID())"
      ]
    },
    {
      "name": "GetSlots",
      "signature": "GetSlots()",
      "returns": 1,
      "category": "Galaxy",
      "section": "The account",
      "summary": "InUse, Total, ExpInUse, ExpTotal.",
      "anchor": "galaxie--the-account",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-account",
      "examples": [
        "slots = GetSlots()               // ONE target as well",
        "slots = GetSlots()"
      ]
    },
    {
      "name": "GetSortedCelestials",
      "signature": "GetSortedCelestials(destination)",
      "returns": 1,
      "category": "Celestials",
      "section": "Picking the nearest base",
      "summary": "Your celestials, from nearest to farthest.",
      "anchor": "celestes--picking-the-nearest-base",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--picking-the-nearest-base",
      "examples": []
    },
    {
      "name": "GetSortedMoons",
      "signature": "GetSortedMoons(destination)",
      "returns": 1,
      "category": "Celestials",
      "section": "Picking the nearest base",
      "summary": "Your moons alone.",
      "anchor": "celestes--picking-the-nearest-base",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--picking-the-nearest-base",
      "examples": []
    },
    {
      "name": "GetSortedPlanets",
      "signature": "GetSortedPlanets(destination)",
      "returns": 1,
      "category": "Celestials",
      "section": "Picking the nearest base",
      "summary": "Your planets alone.",
      "anchor": "celestes--picking-the-nearest-base",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--picking-the-nearest-base",
      "examples": [
        "base = GetSortedPlanets(\"4:212:9\")[0]     // the nearest to the target"
      ]
    },
    {
      "name": "GetSystemsInRange",
      "signature": "GetSystemsInRange(origin, radius)",
      "returns": 1,
      "category": "Galaxy",
      "section": "Going through several systems",
      "summary": "In order of number.",
      "anchor": "galaxie--going-through-several-systems",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--going-through-several-systems",
      "examples": [
        "Print(GetSystemsInRange(3, 2))       // [1 2 3 4 5]"
      ]
    },
    {
      "name": "GetSystemsInRangeAsc",
      "signature": "GetSystemsInRangeAsc(origin, radius)",
      "returns": 1,
      "category": "Galaxy",
      "section": "Going through several systems",
      "summary": "Nearest to farthest.",
      "anchor": "galaxie--going-through-several-systems",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--going-through-several-systems",
      "examples": [
        "Print(GetSystemsInRangeAsc(3, 2))    // [3 2 4 1 5]",
        "for s in GetSystemsInRangeAsc(224, 15) {\n    sys, err = GalaxyInfos(1, s)\n    if err != nil { LogWarn(s, err); continue }\n    SleepRandMs(500, 1200)           // space them out, nothing will do it for you\n}"
      ]
    },
    {
      "name": "GetSystemsInRangeDesc",
      "signature": "GetSystemsInRangeDesc(origin, radius)",
      "returns": 1,
      "category": "Galaxy",
      "section": "Going through several systems",
      "summary": "Farthest to nearest.",
      "anchor": "galaxie--going-through-several-systems",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--going-through-several-systems",
      "examples": [
        "Print(GetSystemsInRangeDesc(3, 2))   // [5 1 4 2 3]"
      ]
    },
    {
      "name": "GetTechs",
      "signature": "GetTechs(celestial)",
      "returns": 6,
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "The whole reading at once.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": [
        "bld, fac, shp, def, rch, err = GetTechs(\"1:2:3\")"
      ]
    },
    {
      "name": "GetTechs2",
      "signature": "GetTechs2(celestial)",
      "returns": 8,
      "since": "1.82.240",
      "category": "Celestials",
      "section": "What sits on a celestial",
      "summary": "The entire reading of a celestial.",
      "anchor": "celestes--what-sits-on-a-celestial",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--what-sits-on-a-celestial",
      "examples": [
        "bld, fac, shp, def, rch, lfBld, lfRch, err = GetTechs2(\"1:2:3\")"
      ]
    },
    {
      "name": "GetTimestamp",
      "signature": "GetTimestamp()",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "The present moment in seconds since 1970.",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": []
    },
    {
      "name": "GetUniverseName",
      "signature": "GetUniverseName()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing where you are",
      "summary": "The universe name.",
      "anchor": "celestes--knowing-where-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-where-you-are",
      "examples": [
        "Printf(\"%s s%d-%s\", GetUniverseName(), GetServerNumber(), GetLang())"
      ]
    },
    {
      "name": "Has",
      "signature": "Has(key)",
      "returns": 1,
      "category": "Output and storage",
      "section": "Remembering between two passes",
      "summary": "Says whether the key exists.",
      "anchor": "base--remembering-between-two-passes",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--remembering-between-two-passes",
      "examples": [
        "if Has(\"blacklist\") {\n    blacklist, err = Get(\"blacklist\")\n}"
      ]
    },
    {
      "name": "HasAdmiral",
      "signature": "HasAdmiral()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The same.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": [
        "if !HasAdmiral() {\n    Print(\"fewer fleet slots than you think\")\n}"
      ]
    },
    {
      "name": "HasCommander",
      "signature": "HasCommander()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "Is the officer hired.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "HasEngineer",
      "signature": "HasEngineer()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The same.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "HasGeologist",
      "signature": "HasGeologist()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The same.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "HasShared",
      "signature": "HasShared(key)",
      "returns": 1,
      "since": "1.82.374",
      "category": "Output and storage",
      "section": "Sharing between bots",
      "summary": "Says whether the key exists.",
      "anchor": "base--sharing-between-bots",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--sharing-between-bots",
      "examples": [
        "if HasShared(\"fs.done\") {\n    DeleteShared(\"fs.done\")\n}"
      ]
    },
    {
      "name": "HasTechnocrat",
      "signature": "HasTechnocrat()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The same.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "HighscoreData",
      "signature": "HighscoreData(category, typ)",
      "returns": 2,
      "category": "Galaxy",
      "section": "The highscore",
      "summary": "Through the game's API. IDs, not names.",
      "anchor": "galaxie--the-highscore",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-highscore",
      "examples": [
        "ranks, err = HighscoreData(1, 0)      // players, general highscore"
      ]
    },
    {
      "name": "HttpRequest",
      "signature": "HttpRequest(method, url, headers, body)",
      "returns": 3,
      "category": "Galaxy",
      "section": "Reading a game page as it comes",
      "summary": "A full request, through the same session.",
      "anchor": "galaxie--reading-a-game-page-as-it-comes",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-game-page-as-it-comes",
      "examples": [
        "body, code, err = HttpRequest(\"POST\", \"https://example.net/api\", headers, payload)"
      ]
    },
    {
      "name": "ID2Str",
      "signature": "ID2Str(id)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Naming a game id",
      "summary": "The readable name of a ship, a defence, a building or a technology.",
      "anchor": "outils--naming-a-game-id",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--naming-a-game-id",
      "examples": [
        "Print(ID2Str(204))            // LightFighter",
        "Print(ID2Str(LIGHTFIGHTER))   // LightFighter, the number and the constant both work",
        "Print(ID2Str(METALMINE))      // MetalMine"
      ]
    },
    {
      "name": "IgnoreAlliance",
      "signature": "IgnoreAlliance(tag)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "Spares every known member of an alliance.",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": [
        "IgnoreAlliance(\"SLD\")         // every member the Scanner has seen"
      ]
    },
    {
      "name": "IgnorePlanet",
      "signature": "IgnorePlanet(coord)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "Spares a position, moon included.",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": [
        "IgnorePlanet(\"1:42:8\")        // the planet AND its moon"
      ]
    },
    {
      "name": "IgnorePlayer",
      "signature": "IgnorePlayer(player)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "Spares a player. Name or id.",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": [
        "IgnorePlayer(\"Xylo\")          // by name, as on screen",
        "IgnorePlayer(4242)            // or by id"
      ]
    },
    {
      "name": "IntervalExec",
      "signature": "IntervalExec(ms, f)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Calls f every ms milliseconds, forever.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "IntervalExec(600000, func() { Print(\"every ten minutes\") })"
      ]
    },
    {
      "name": "IsActive",
      "signature": "IsActive()",
      "returns": 1,
      "category": "Workers",
      "section": "What the bot is doing with this account",
      "summary": "Will it start it again next launch.",
      "anchor": "workers--what-the-bot-is-doing-with-this-account",
      "url": "https://keplerbot.net/en/scripts/workers#workers--what-the-bot-is-doing-with-this-account",
      "examples": []
    },
    {
      "name": "IsAllianceIgnored",
      "signature": "IsAllianceIgnored(tag)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": []
    },
    {
      "name": "IsBotPaused",
      "signature": "IsBotPaused()",
      "returns": 1,
      "category": "Workers",
      "section": "The emergency stop",
      "summary": "Says where things stand.",
      "anchor": "workers--the-emergency-stop",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-emergency-stop",
      "examples": []
    },
    {
      "name": "IsCollector",
      "signature": "IsCollector()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "Shortcut on the class.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": [
        "if IsCollector() {\n    Print(\"higher cargo capacity, faster transporters\")\n}"
      ]
    },
    {
      "name": "IsDiscoverer",
      "signature": "IsDiscoverer()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The same.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "IsFarmSessionOngoing",
      "signature": "IsFarmSessionOngoing()",
      "returns": 1,
      "category": "Workers",
      "section": "Knowing what the farm is doing",
      "summary": "Is a campaign working right now.",
      "anchor": "workers--knowing-what-the-farm-is-doing",
      "url": "https://keplerbot.net/en/scripts/workers#workers--knowing-what-the-farm-is-doing",
      "examples": [
        "if IsFarmSessionOngoing() {\n    PauseFarmingBot()          // giving the slots back to the Defender\n    SleepMin(30)\n    ResumeFarmingBot()         // and back to where we left off\n}"
      ]
    },
    {
      "name": "IsGeneral",
      "signature": "IsGeneral()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "The same.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "IsLoggedIn",
      "signature": "IsLoggedIn()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing where you are",
      "summary": "Says whether the session is open.",
      "anchor": "celestes--knowing-where-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-where-you-are",
      "examples": []
    },
    {
      "name": "IsPaused",
      "signature": "IsPaused()",
      "returns": 1,
      "category": "Output and storage",
      "section": "Steering your own script",
      "summary": "Says whether the player has paused the script.",
      "anchor": "base--steering-your-own-script",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--steering-your-own-script",
      "examples": [
        "if IsPaused() { SleepSec(30); continue }"
      ]
    },
    {
      "name": "IsPausedFarmingBot",
      "signature": "IsPausedFarmingBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Knowing what the farm is doing",
      "summary": "Is a campaign paused.",
      "anchor": "workers--knowing-what-the-farm-is-doing",
      "url": "https://keplerbot.net/en/scripts/workers#workers--knowing-what-the-farm-is-doing",
      "examples": []
    },
    {
      "name": "IsPausedScript",
      "signature": "IsPausedScript(name)",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Is that one paused.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": [
        "if IsPausedScript(WATCH) {\n        ResumeScript(WATCH)\n    }"
      ]
    },
    {
      "name": "IsPioneers",
      "signature": "IsPioneers()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "Does the account use the \"pioneers\" lobby.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": []
    },
    {
      "name": "IsPlanetIgnored",
      "signature": "IsPlanetIgnored(coord)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": []
    },
    {
      "name": "IsPlayerIgnored",
      "signature": "IsPlayerIgnored(player)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "Whether it is on the list.",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": [
        "if IsPlayerIgnored(\"Xylo\") {\n    Print(\"left alone\")\n}"
      ]
    },
    {
      "name": "IsRunningBrainBot",
      "signature": "IsRunningBrainBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Asking which one runs",
      "summary": "True if Brain is on.",
      "anchor": "workers--asking-which-one-runs",
      "url": "https://keplerbot.net/en/scripts/workers#workers--asking-which-one-runs",
      "examples": [
        "Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())"
      ]
    },
    {
      "name": "IsRunningColonizerBot",
      "signature": "IsRunningColonizerBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Asking which one runs",
      "summary": "",
      "anchor": "workers--asking-which-one-runs",
      "url": "https://keplerbot.net/en/scripts/workers#workers--asking-which-one-runs",
      "examples": [
        "Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())"
      ]
    },
    {
      "name": "IsRunningDefenderBot",
      "signature": "IsRunningDefenderBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Asking which one runs",
      "summary": "",
      "anchor": "workers--asking-which-one-runs",
      "url": "https://keplerbot.net/en/scripts/workers#workers--asking-which-one-runs",
      "examples": [
        "Print(IsRunningDiscoveryBot(), IsRunningDefenderBot())"
      ]
    },
    {
      "name": "IsRunningDiscoveryBot",
      "signature": "IsRunningDiscoveryBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Asking which one runs",
      "summary": "",
      "anchor": "workers--asking-which-one-runs",
      "url": "https://keplerbot.net/en/scripts/workers#workers--asking-which-one-runs",
      "examples": [
        "Print(IsRunningDiscoveryBot(), IsRunningDefenderBot())"
      ]
    },
    {
      "name": "IsRunningExpeditionsBot",
      "signature": "IsRunningExpeditionsBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Asking which one runs",
      "summary": "",
      "anchor": "workers--asking-which-one-runs",
      "url": "https://keplerbot.net/en/scripts/workers#workers--asking-which-one-runs",
      "examples": [
        "Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())"
      ]
    },
    {
      "name": "IsRunningFarmingBot",
      "signature": "IsRunningFarmingBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Asking which one runs",
      "summary": "True if farming is on.",
      "anchor": "workers--asking-which-one-runs",
      "url": "https://keplerbot.net/en/scripts/workers#workers--asking-which-one-runs",
      "examples": [
        "if IsRunningFarmingBot() {\n  Print(\"farming is running\")\n}"
      ]
    },
    {
      "name": "IsScriptRunning",
      "signature": "IsScriptRunning(name)",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Is that one running.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": [
        "if IsScriptRunning(WATCH) {\n        LogInfo(\"the watch is already running\")\n        return\n    }"
      ]
    },
    {
      "name": "IsStarted",
      "signature": "IsStarted()",
      "returns": 1,
      "category": "Workers",
      "section": "What the bot is doing with this account",
      "summary": "Is the bot running for this account.",
      "anchor": "workers--what-the-bot-is-doing-with-this-account",
      "url": "https://keplerbot.net/en/scripts/workers#workers--what-the-bot-is-doing-with-this-account",
      "examples": []
    },
    {
      "name": "IsUnderAttack",
      "signature": "IsUnderAttack()",
      "returns": 1,
      "category": "Fleets",
      "section": "What is flying, and what is incoming",
      "summary": "True if there is at least one.",
      "anchor": "flottes--what-is-flying-and-what-is-incoming",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--what-is-flying-and-what-is-incoming",
      "examples": []
    },
    {
      "name": "IsVacationModeEnabled",
      "signature": "IsVacationModeEnabled()",
      "returns": 1,
      "category": "Celestials",
      "section": "Knowing who you are",
      "summary": "Is the account in vacation mode.",
      "anchor": "celestes--knowing-who-you-are",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--knowing-who-you-are",
      "examples": [
        "if IsVacationModeEnabled() {\n    LogWarn(\"vacation mode: nothing will leave, this is not a script failure\")\n    return\n}"
      ]
    },
    {
      "name": "IsWorkerRunning",
      "signature": "IsWorkerRunning(name)",
      "returns": 1,
      "category": "Workers",
      "section": "The general form",
      "summary": "Says whether it is on.",
      "anchor": "workers--the-general-form",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-general-form",
      "examples": [
        "Print(name, IsWorkerRunning(name))"
      ]
    },
    {
      "name": "Itoa",
      "signature": "Itoa(n)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Converting between a number and a string",
      "summary": "Writes an integer as text.",
      "anchor": "outils--converting-between-a-number-and-a-string",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--converting-between-a-number-and-a-string",
      "examples": [
        "Print(Itoa(Pow(10, 7)))      // ✓ 10000000: go through Itoa to print",
        "Itoa(2.7)          // \"2\"",
        "Itoa(-2.7)         // \"-2\", truncation goes towards zero on both sides"
      ]
    },
    {
      "name": "JsonDecode",
      "signature": "JsonDecode(data)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Reading JSON",
      "summary": "Decodes JSON.",
      "anchor": "outils--reading-json",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--reading-json",
      "examples": [
        "o, err = JsonDecode(body)             // ← TWO targets, again",
        "o, err = JsonDecode(body)",
        "o, err = JsonDecode(\"{\\\"a\\\": 1}\") // ✓ go through text"
      ]
    },
    {
      "name": "JsonEncode",
      "signature": "JsonEncode(value)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Writing JSON",
      "summary": "Writes JSON.",
      "anchor": "outils--writing-json",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--writing-json",
      "examples": [
        "text, err = JsonEncode(payload)       // ← TWO targets",
        "payload, err = JsonEncode({\"celestial\": 33628068})"
      ]
    },
    {
      "name": "JsonEncodeIndent",
      "signature": "JsonEncodeIndent(value, indent)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Writing JSON",
      "summary": "The same, laid out.",
      "anchor": "outils--writing-json",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--writing-json",
      "examples": []
    },
    {
      "name": "JumpGate",
      "signature": "JumpGate(origin, destination, ships)",
      "returns": 1,
      "category": "Fleets",
      "section": "The jump gate",
      "summary": "Jumps ships from one moon to another.",
      "anchor": "flottes--the-jump-gate",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-jump-gate",
      "examples": [
        "err = JumpGate(moon.GetID(), destinations[0], ships)"
      ]
    },
    {
      "name": "JumpGate2",
      "signature": "JumpGate2(origin, destination, ships)",
      "returns": 3,
      "category": "Fleets",
      "section": "The jump gate",
      "summary": "The same jump, with the delay as a number.",
      "anchor": "flottes--the-jump-gate",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-jump-gate",
      "examples": [
        "sent, recharge, err = JumpGate2(moon.GetID(), destinations[0], ships)"
      ]
    },
    {
      "name": "JumpGateDestinations",
      "signature": "JumpGateDestinations(origin)",
      "returns": 3,
      "category": "Fleets",
      "section": "The jump gate",
      "summary": "What can be reached, and in how long.",
      "anchor": "flottes--the-jump-gate",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-jump-gate",
      "examples": [
        "destinations, recharge, err = JumpGateDestinations(moon.GetID())"
      ]
    },
    {
      "name": "ListWorkers",
      "signature": "ListWorkers()",
      "returns": 1,
      "category": "Workers",
      "section": "The general form",
      "summary": "The accepted names, in English.",
      "anchor": "workers--the-general-form",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-general-form",
      "examples": [
        "for name in ListWorkers() {\n  Print(name, IsWorkerRunning(name))\n}"
      ]
    },
    {
      "name": "LogDebug",
      "signature": "LogDebug(...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "The detail that interests you alone, on a debugging day.",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": []
    },
    {
      "name": "LogDebugf",
      "signature": "LogDebugf(format, ...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "The detail that interests you alone, on a debugging day.",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": []
    },
    {
      "name": "LogError",
      "signature": "LogError(...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "What failed.",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": [
        "if err != nil { LogError(\"reading failed:\", err) }",
        "if err != nil { LogError(err) }",
        "if err != nil { LogError(\"Discord:\", err) }"
      ]
    },
    {
      "name": "LogErrorf",
      "signature": "LogErrorf(format, ...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "What failed.",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": []
    },
    {
      "name": "Login",
      "signature": "Login()",
      "returns": 1,
      "category": "Workers",
      "section": "The emergency stop",
      "summary": "Alias of ResumeBot.",
      "anchor": "workers--the-emergency-stop",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-emergency-stop",
      "examples": []
    },
    {
      "name": "LogInfo",
      "signature": "LogInfo(...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "The normal run: \"campaign started\", \"twelve targets kept\".",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": [
        "LogInfo(m.SenderName, \"writes:\", m.Text)",
        "LogInfo(\"gate busy, coming back in\", ShortDur(recharge * 1000000000))",
        "LogInfo(\"time to leave\")"
      ]
    },
    {
      "name": "LogInfof",
      "signature": "LogInfof(format, ...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "The normal run: \"campaign started\", \"twelve targets kept\".",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": [
        "LogInfof(\"%d targets kept out of %d\", kept, seen)",
        "LogInfof(\"%s : %s\", planet.Coordinate, ShortShipsInfos(ships))"
      ]
    },
    {
      "name": "LogOut",
      "signature": "LogOut()",
      "returns": 1,
      "category": "Workers",
      "section": "The emergency stop",
      "summary": "Alias of PauseBot, for scripts coming from Ninja.",
      "anchor": "workers--the-emergency-stop",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-emergency-stop",
      "examples": []
    },
    {
      "name": "LogWarn",
      "signature": "LogWarn(...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "What deserves a look without being serious: a lost target, an unreadable page.",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": [
        "LogWarn(\"attack from\", a.AttackerName, \"on\", a.DestinationName)",
        "LogWarn(\"vacation mode: nothing will leave, this is not a script failure\")",
        "LogWarn(\"vacation refused: \" + err.Error())"
      ]
    },
    {
      "name": "LogWarnf",
      "signature": "LogWarnf(format, ...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Logging by level",
      "summary": "What deserves a look without being serious: a lost target, an unreadable page.",
      "anchor": "base--logging-by-level",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--logging-by-level",
      "examples": []
    },
    {
      "name": "LowestSpeed",
      "signature": "LowestSpeed(arrival, origin, destination, ships)",
      "returns": 4,
      "category": "Fleets",
      "section": "The flight backwards: starting from the arrival time",
      "summary": "The cheapest speed that can still leave.",
      "anchor": "flottes--the-flight-backwards-starting-from-the-arrival-time",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-flight-backwards-starting-from-the-arrival-time",
      "examples": [
        "speed, deut, departure, err = LowestSpeed(\"08:00:00\", \"1:64:8\", \"1:64:12\", ships)",
        "speed, deut, when, err = LowestSpeed(BACK, ORIGIN, SHELTER, ships)"
      ]
    },
    {
      "name": "MapKeys",
      "signature": "MapKeys(table)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Walking a table",
      "summary": "Sorted.",
      "anchor": "outils--walking-a-table",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--walking-a-table",
      "examples": [
        "Print(MapKeys(cache)[i], MapValues(cache)[i])",
        "for i = 0; i < len(MapKeys(cache)); i++ {\n    Print(MapKeys(cache)[i], MapValues(cache)[i])\n}"
      ]
    },
    {
      "name": "MapValues",
      "signature": "MapValues(table)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Walking a table",
      "summary": "In key order.",
      "anchor": "outils--walking-a-table",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--walking-a-table",
      "examples": [
        "Print(MapKeys(cache)[i], MapValues(cache)[i])"
      ]
    },
    {
      "name": "Max",
      "signature": "Max(x, y)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The larger of the two.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": []
    },
    {
      "name": "MillisecondsBetweenTimeStrings",
      "signature": "MillisecondsBetweenTimeStrings(a, b)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Comparing and measuring",
      "summary": "The same, in milliseconds.",
      "anchor": "temps--comparing-and-measuring",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--comparing-and-measuring",
      "examples": []
    },
    {
      "name": "Min",
      "signature": "Min(x, y)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The smaller of the two.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": [
        "Printf(\"%.0f\", Min(3, 5))    // ✓ 3"
      ]
    },
    {
      "name": "NewCoordinate",
      "signature": "NewCoordinate(galaxy, system, position, type)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Building a value to pass",
      "summary": "The type is PLANET_TYPE, MOON_TYPE or DEBRIS_TYPE.",
      "anchor": "outils--building-a-value-to-pass",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--building-a-value-to-pass",
      "examples": []
    },
    {
      "name": "NewFarmSession",
      "signature": "NewFarmSession()",
      "returns": 1,
      "category": "Workers",
      "section": "Composing a farm session",
      "summary": "To chain, then BuildFarmSession().",
      "anchor": "workers--composing-a-farm-session",
      "url": "https://keplerbot.net/en/scripts/workers#workers--composing-a-farm-session",
      "examples": [
        "f = NewFarmSession()"
      ]
    },
    {
      "name": "NewFleet",
      "signature": "NewFleet()",
      "returns": 1,
      "category": "Fleets",
      "section": "And to actually send",
      "summary": "To be chained. nil with no session open.",
      "anchor": "flottes--and-to-actually-send",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--and-to-actually-send",
      "examples": [
        "f = NewFleet()"
      ]
    },
    {
      "name": "NewResources",
      "signature": "NewResources(metal, crystal, deut)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Building a value to pass",
      "summary": "The three quantities in one go.",
      "anchor": "outils--building-a-value-to-pass",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--building-a-value-to-pass",
      "examples": [
        "res = NewResources(10000, 20000, 30000)"
      ]
    },
    {
      "name": "NewResourceSettings",
      "signature": "NewResourceSettings(metal, crystal, deuterium, solar, fusion, satellite, crawler)",
      "returns": 1,
      "category": "Celestials",
      "section": "Production sliders, and the price on the spot",
      "summary": "Composes the seven sliders.",
      "anchor": "celestes--production-sliders-and-the-price-on-the-spot",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--production-sliders-and-the-price-on-the-spot",
      "examples": [
        "after = NewResourceSettings(before.MetalMine, before.CrystalMine, 100,\n    before.SolarPlant, before.FusionReactor, before.SolarSatellite, before.Crawler)"
      ]
    },
    {
      "name": "NewShipsInfos",
      "signature": "NewShipsInfos()",
      "returns": 1,
      "category": "Toolbox",
      "section": "Building a value to pass",
      "summary": "To be filled with .Set(id, count), then passed to FlightTime, Speed or Cargo.",
      "anchor": "outils--building-a-value-to-pass",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--building-a-value-to-pass",
      "examples": [
        "fleet = NewShipsInfos()",
        "f = NewShipsInfos()",
        "ships = NewShipsInfos()"
      ]
    },
    {
      "name": "NewTemperature",
      "signature": "NewTemperature(min, max)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "Both bounds, as the game shows them.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": [
        "temp = NewTemperature(-12, 40)"
      ]
    },
    {
      "name": "Notify",
      "signature": "Notify(title, message)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Raising an alert",
      "summary": "Writes to the account's journal, at Warn level.",
      "anchor": "base--raising-an-alert",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--raising-an-alert",
      "examples": []
    },
    {
      "name": "Now",
      "signature": "Now()",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "The present moment.",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": [
        "if end != nil && end.Sub(Now()).Minutes() < 10 {\n    LogInfo(\"the account sleeps soon, not starting the campaign\")\n    return\n}"
      ]
    },
    {
      "name": "NowInTimeRange",
      "signature": "NowInTimeRange(start, end)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Comparing and measuring",
      "summary": "Tells you whether the current time is in the range.",
      "anchor": "temps--comparing-and-measuring",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--comparing-and-measuring",
      "examples": [
        "if NowInTimeRange(\"23:00:00\", \"07:00:00\") {\n    Print(\"it is night\")            // the range crosses midnight, that is intended\n}"
      ]
    },
    {
      "name": "NowTimeString",
      "signature": "NowTimeString()",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "The current time, 15:04:05.",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": []
    },
    {
      "name": "PageContent",
      "signature": "PageContent(query)",
      "returns": 2,
      "category": "Galaxy",
      "section": "Reading a game page as it comes",
      "summary": "A game page, through the account's session.",
      "anchor": "galaxie--reading-a-game-page-as-it-comes",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--reading-a-game-page-as-it-comes",
      "examples": [
        "html, err = PageContent(\"page=ingame&component=overview\")"
      ]
    },
    {
      "name": "ParseCoord",
      "signature": "ParseCoord(string)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Building a value to pass",
      "summary": "Reads \"1:2:3\" or \"M:1:2:3\".",
      "anchor": "outils--building-a-value-to-pass",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--building-a-value-to-pass",
      "examples": [
        "coord, err = ParseCoord(\"M:1:2:3\")     // TWO targets"
      ]
    },
    {
      "name": "ParseNextDatetimeAt",
      "signature": "ParseNextDatetimeAt(s)",
      "returns": 2,
      "category": "Time and waiting",
      "section": "Comparing and measuring",
      "summary": "The same, from \"03:30:00\".",
      "anchor": "temps--comparing-and-measuring",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--comparing-and-measuring",
      "examples": []
    },
    {
      "name": "PauseBot",
      "signature": "PauseBot()",
      "returns": 1,
      "category": "Workers",
      "section": "The emergency stop",
      "summary": "Cuts all communication with the game.",
      "anchor": "workers--the-emergency-stop",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-emergency-stop",
      "examples": [
        "PauseBot()"
      ]
    },
    {
      "name": "PauseFarmingBot",
      "signature": "PauseFarmingBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Knowing what the farm is doing",
      "summary": "Suspends the running campaign.",
      "anchor": "workers--knowing-what-the-farm-is-doing",
      "url": "https://keplerbot.net/en/scripts/workers#workers--knowing-what-the-farm-is-doing",
      "examples": [
        "PauseFarmingBot()          // giving the slots back to the Defender"
      ]
    },
    {
      "name": "PauseHunterTarget",
      "signature": "PauseHunterTarget(player, paused)",
      "returns": 1,
      "category": "Workers",
      "section": "Composing a watch list",
      "summary": "Suspends them without losing their history.",
      "anchor": "workers--composing-a-watch-list",
      "url": "https://keplerbot.net/en/scripts/workers#workers--composing-a-watch-list",
      "examples": []
    },
    {
      "name": "PauseScript",
      "signature": "PauseScript(name)",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Suspends it.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": []
    },
    {
      "name": "Phalanx",
      "signature": "Phalanx(moon, target)",
      "returns": 2,
      "category": "Fleets",
      "section": "The phalanx",
      "summary": "Reads what flies around a position.",
      "anchor": "flottes--the-phalanx",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-phalanx",
      "examples": [
        "flights, err = Phalanx(moon.GetID(), \"1:2:8\")",
        "flights, err = Phalanx(moon.GetID(), p.Coordinate)"
      ]
    },
    {
      "name": "PlayerDataByID",
      "signature": "PlayerDataByID(id)",
      "returns": 2,
      "category": "Galaxy",
      "section": "The players",
      "summary": "Clean error if the ID is unknown.",
      "anchor": "galaxie--the-players",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-players",
      "examples": [
        "p, err = PlayerDataByID(id)"
      ]
    },
    {
      "name": "PlayerDataByName",
      "signature": "PlayerDataByName(name)",
      "returns": 2,
      "category": "Galaxy",
      "section": "The players",
      "summary": "Whole nickname, case is ignored.",
      "anchor": "galaxie--the-players",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-players",
      "examples": [
        "target, err = PlayerDataByName(\"Xylo\")"
      ]
    },
    {
      "name": "PlayersData",
      "signature": "PlayersData()",
      "returns": 2,
      "category": "Galaxy",
      "section": "The players",
      "summary": "Every player in the universe.",
      "anchor": "galaxie--the-players",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-players",
      "examples": [
        "players, err = PlayersData()          // TWO targets",
        "players, err = PlayersData()"
      ]
    },
    {
      "name": "Pow",
      "signature": "Pow(x, y)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "x to the power y.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": [
        "Print(Itoa(Pow(10, 7)))      // ✓ 10000000: go through Itoa to print"
      ]
    },
    {
      "name": "print",
      "signature": "print(...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Writing to the console",
      "summary": "The same, under its other name.",
      "anchor": "base--writing-to-the-console",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--writing-to-the-console",
      "examples": []
    },
    {
      "name": "Print",
      "signature": "Print(...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Writing to the console",
      "summary": "Writes a line. Arguments are joined with a space.",
      "anchor": "base--writing-to-the-console",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--writing-to-the-console",
      "examples": [
        "Print(\"target\", coord, \"loot\", loot)       // target [P:1:64:6] loot 75",
        "Print(key)",
        "Print(\"pass \" + i)"
      ]
    },
    {
      "name": "Printf",
      "signature": "Printf(format, ...)",
      "returns": 0,
      "category": "Output and storage",
      "section": "Writing to the console",
      "summary": "Writes a formatted line, the way fmt.Printf does.",
      "anchor": "base--writing-to-the-console",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--writing-to-the-console",
      "examples": [
        "Printf(\"%d planets, %d moons\", np, nm)",
        "Printf(\"%s s%d-%s\", GetUniverseName(), GetServerNumber(), GetLang())",
        "Printf(\"%v, %.1f h of flight, %d deuterium\", dest, secs / 3600, deut)"
      ]
    },
    {
      "name": "Put",
      "signature": "Put(key, value)",
      "returns": 1,
      "category": "Output and storage",
      "section": "Remembering between two passes",
      "summary": "Stores a value.",
      "anchor": "base--remembering-between-two-passes",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--remembering-between-two-passes",
      "examples": [
        "Put(\"last.system\", 128)"
      ]
    },
    {
      "name": "PutShared",
      "signature": "PutShared(key, value)",
      "returns": 1,
      "since": "1.82.374",
      "category": "Output and storage",
      "section": "Sharing between bots",
      "summary": "Stores a value, readable by every bot.",
      "anchor": "base--sharing-between-bots",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--sharing-between-bots",
      "examples": [
        "PutShared(\"fs.target\", \"4:120:8\")"
      ]
    },
    {
      "name": "Random",
      "signature": "Random(min, max)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "A random integer, bounds included.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": []
    },
    {
      "name": "RangeCronExec",
      "signature": "RangeCronExec(start, end, label, f)",
      "returns": 2,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Calls f once a day, at a time drawn at random inside the window.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "id, err = RangeCronExec(\"03:00:00\", \"03:45:00\", \"night return\", func() {\n    Print(\"the fleet comes home\")\n})"
      ]
    },
    {
      "name": "RecruitOfficer",
      "signature": "RecruitOfficer(officer, days)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "Hires an officer. 2 commander, 3 admiral, 4 engineer, 5 geologist, 6 technocrat; 7 or 90 days.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "Print(RecruitOfficer(5, 7)) // a geologist for seven days"
      ]
    },
    {
      "name": "RemoveCron",
      "signature": "RemoveCron(number)",
      "returns": 1,
      "category": "Scheduling",
      "section": "The ten",
      "summary": "Removes a task placed by the two above.",
      "anchor": "ordo--the-ten",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--the-ten",
      "examples": [
        "if RemoveCron(id) {\n    Print(\"unhooked\")\n} else {\n    Print(\"that number no longer points at anything\")\n}"
      ]
    },
    {
      "name": "RemoveFromFarmBlacklist",
      "signature": "RemoveFromFarmBlacklist(target)",
      "returns": 1,
      "since": "1.82.309",
      "category": "Workers",
      "section": "The farmer's blacklist",
      "summary": "Removing what is not there is not an error; a name nothing knows is one.",
      "anchor": "workers--the-farmers-blacklist",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-farmers-blacklist",
      "examples": [
        "RemoveFromFarmBlacklist(e.Key)   // give back only the automatic entries"
      ]
    },
    {
      "name": "RemoveHunterTarget",
      "signature": "RemoveHunterTarget(player)",
      "returns": 1,
      "category": "Workers",
      "section": "Composing a watch list",
      "summary": "Removes them, history included.",
      "anchor": "workers--composing-a-watch-list",
      "url": "https://keplerbot.net/en/scripts/workers#workers--composing-a-watch-list",
      "examples": []
    },
    {
      "name": "RepatriateNow",
      "signature": "RepatriateNow()",
      "returns": 1,
      "category": "Workers",
      "section": "Repatriating right now",
      "summary": "Runs a repatriation pass without waiting.",
      "anchor": "workers--repatriating-right-now",
      "url": "https://keplerbot.net/en/scripts/workers#workers--repatriating-right-now",
      "examples": [
        "RepatriateNow()",
        "err = RepatriateNow()"
      ]
    },
    {
      "name": "RepatriateSetAllDestinations",
      "signature": "RepatriateSetAllDestinations(celestial)",
      "returns": 1,
      "category": "Workers",
      "section": "Gathering everything in one place",
      "summary": "That celestial receives, all the others feed it.",
      "anchor": "workers--gathering-everything-in-one-place",
      "url": "https://keplerbot.net/en/scripts/workers#workers--gathering-everything-in-one-place",
      "examples": [
        "RepatriateSetAllDestinations(\"1:64:8\")",
        "err = RepatriateSetAllDestinations(BASE)"
      ]
    },
    {
      "name": "ResumeBot",
      "signature": "ResumeBot()",
      "returns": 1,
      "category": "Workers",
      "section": "The emergency stop",
      "summary": "Gives it back.",
      "anchor": "workers--the-emergency-stop",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-emergency-stop",
      "examples": [
        "ResumeBot()"
      ]
    },
    {
      "name": "ResumeFarmingBot",
      "signature": "ResumeFarmingBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Knowing what the farm is doing",
      "summary": "Resumes it where it stopped.",
      "anchor": "workers--knowing-what-the-farm-is-doing",
      "url": "https://keplerbot.net/en/scripts/workers#workers--knowing-what-the-farm-is-doing",
      "examples": [
        "ResumeFarmingBot()         // and back to where we left off"
      ]
    },
    {
      "name": "ResumeScript",
      "signature": "ResumeScript(name)",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Resumes it where it was.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": [
        "ResumeScript(WATCH)"
      ]
    },
    {
      "name": "Round",
      "signature": "Round(x)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The nearest integer.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": [
        "Itoa(Round(2.7))   // \"3\""
      ]
    },
    {
      "name": "SelectLfResearchArtifacts",
      "signature": "SelectLfResearchArtifacts(planet, slot, tech)",
      "returns": 1,
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Trades artifacts for it.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": []
    },
    {
      "name": "SelectLfResearchRandom",
      "signature": "SelectLfResearchRandom(planet, slot)",
      "returns": 1,
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Draws another one at random.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": []
    },
    {
      "name": "SelectLfResearchSelect",
      "signature": "SelectLfResearchSelect(planet, slot)",
      "returns": 1,
      "category": "Celestials",
      "section": "Chapters, and choosing a lifeform research",
      "summary": "Accepts the research on offer.",
      "anchor": "celestes--chapters-and-choosing-a-lifeform-research",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--chapters-and-choosing-a-lifeform-research",
      "examples": []
    },
    {
      "name": "SendDiscord",
      "signature": "SendDiscord(webhook, message)",
      "returns": 1,
      "category": "Output and storage",
      "section": "Alerting the outside world",
      "summary": "Posts to a Discord webhook.",
      "anchor": "base--alerting-the-outside-world",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--alerting-the-outside-world",
      "examples": [
        "err = SendDiscord(\"https://discord.com/api/webhooks/…\", \"debris at \" + coord)",
        "SendDiscord(DISCORD_WEBHOOK, \"debris at \" + coord)",
        "SendDiscord(MY_WEBHOOK, FILE + \": debris at \" + coord)"
      ]
    },
    {
      "name": "SendDiscordFile",
      "signature": "SendDiscordFile(webhook, name, content)",
      "returns": 1,
      "since": "1.82.240",
      "category": "Output and storage",
      "section": "Alerting the outside world",
      "summary": "Posts a text file as an attachment.",
      "anchor": "base--alerting-the-outside-world",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--alerting-the-outside-world",
      "examples": [
        "err = SendDiscordFile(DISCORD_WEBHOOK, \"inactives.csv\", rows)"
      ]
    },
    {
      "name": "SendDiscoveryFleet",
      "signature": "SendDiscoveryFleet(origin, destination)",
      "returns": 1,
      "category": "Fleets",
      "section": "The Lifeform Expedition, one position at a time",
      "summary": "One expedition to ONE position.",
      "anchor": "flottes--the-lifeform-expedition-one-position-at-a-time",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--the-lifeform-expedition-one-position-at-a-time",
      "examples": [
        "err = SendDiscoveryFleet(\"1:64:8\", \"1:64:12\")",
        "Print(SendDiscoveryFleet(origin, el))   // <nil>: sent"
      ]
    },
    {
      "name": "SendIPM",
      "signature": "SendIPM(planet, target, count, defence)",
      "returns": 2,
      "category": "Toolbox",
      "section": "Items, dark matter, auction and missiles",
      "summary": "Fires missiles.",
      "anchor": "outils--items-dark-matter-auction-and-missiles",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--items-dark-matter-auction-and-missiles",
      "examples": [
        "sent, err = SendIPM(c.GetID(), \"1:1:1\", 10, 0)"
      ]
    },
    {
      "name": "SendMessage",
      "signature": "SendMessage(playerID, message)",
      "returns": 1,
      "category": "Galaxy",
      "section": "Writing to a player",
      "summary": "A private message, through the game's chat.",
      "anchor": "galaxie--writing-to-a-player",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--writing-to-a-player",
      "examples": [
        "err = SendMessage(target.ID, \"Hello, I come in peace.\")",
        "SendMessage(m.SenderID, \"busy right now, write later\")",
        "SendMessage(m.SenderID, \"gg to you too\")"
      ]
    },
    {
      "name": "SendTelegram",
      "signature": "SendTelegram(chatID, message)",
      "returns": 1,
      "category": "Output and storage",
      "section": "Alerting the outside world",
      "summary": "Writes into a Telegram conversation.",
      "anchor": "base--alerting-the-outside-world",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--alerting-the-outside-world",
      "examples": [
        "SendTelegram(0, \"debris at \" + coord)     // 0: the conversation from settings",
        "SendTelegram(0, \"URGENT: \" + text)"
      ]
    },
    {
      "name": "ServerURL",
      "signature": "ServerURL()",
      "returns": 2,
      "category": "Galaxy",
      "section": "The account",
      "summary": "Your server's address, with no trailing slash. A Kepler addition.",
      "anchor": "galaxie--the-account",
      "url": "https://keplerbot.net/en/scripts/galaxy#galaxie--the-account",
      "examples": [
        "addr, err = ServerURL()          // TWO targets"
      ]
    },
    {
      "name": "SetDefenderCheckInterval",
      "signature": "SetDefenderCheckInterval(min, max)",
      "returns": 1,
      "category": "Workers",
      "section": "Sleep, and the Defender's interval",
      "summary": "The round's interval, in seconds.",
      "anchor": "workers--sleep-and-the-defenders-interval",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sleep-and-the-defenders-interval",
      "examples": []
    },
    {
      "name": "SetExpeditionsStrategy",
      "signature": "SetExpeditionsStrategy(name)",
      "returns": 1,
      "since": "",
      "category": "Workers",
      "section": "The expeditions strategy",
      "summary": "Changes it, setting saved.",
      "anchor": "workers--the-expeditions-strategy",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-expeditions-strategy",
      "examples": [
        "err = SetExpeditionsStrategy(\"all\")"
      ]
    },
    {
      "name": "SetFleetSlotsReserved",
      "signature": "SetFleetSlotsReserved(n)",
      "returns": 1,
      "category": "Workers",
      "section": "The fleet slot reserve",
      "summary": "Changes that number, setting saved.",
      "anchor": "workers--the-fleet-slot-reserve",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-fleet-slot-reserve",
      "examples": []
    },
    {
      "name": "SetHomeWorld",
      "signature": "SetHomeWorld(celestial)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "Remembers your base.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": []
    },
    {
      "name": "SetResourceSettings",
      "signature": "SetResourceSettings(planet, settings)",
      "returns": 1,
      "category": "Celestials",
      "section": "Production sliders, and the price on the spot",
      "summary": "Applies them.",
      "anchor": "celestes--production-sliders-and-the-price-on-the-spot",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--production-sliders-and-the-price-on-the-spot",
      "examples": [
        "err = SetResourceSettings(c.GetID(), after)"
      ]
    },
    {
      "name": "SetVacationMode",
      "signature": "SetVacationMode()",
      "returns": 1,
      "category": "Celestials",
      "section": "Putting the account into vacation mode",
      "summary": "Freezes the account. Forty-eight hours minimum.",
      "anchor": "celestes--putting-the-account-into-vacation-mode",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--putting-the-account-into-vacation-mode",
      "examples": [
        "err = SetVacationMode()"
      ]
    },
    {
      "name": "SharedKeys",
      "signature": "SharedKeys()",
      "returns": 1,
      "since": "1.82.374",
      "category": "Output and storage",
      "section": "Sharing between bots",
      "summary": "Every shared key.",
      "anchor": "base--sharing-between-bots",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--sharing-between-bots",
      "examples": [
        "for key in SharedKeys() {\n    Print(key)\n}"
      ]
    },
    {
      "name": "ShieldPower",
      "signature": "ShieldPower(id, researches)",
      "returns": 1,
      "category": "Fleets",
      "section": "Combat strength",
      "summary": "Shield, plus 10% per shielding level.",
      "anchor": "flottes--combat-strength",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--combat-strength",
      "examples": []
    },
    {
      "name": "ShipCargo",
      "signature": "ShipCargo(id)",
      "returns": 1,
      "category": "Fleets",
      "section": "A single ship",
      "summary": "Its hold.",
      "anchor": "flottes--a-single-ship",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--a-single-ship",
      "examples": [
        "Print(ShipCargo(LARGECARGO))     // 25000 at base, more with hyperspace"
      ]
    },
    {
      "name": "ShipFuel",
      "signature": "ShipFuel(id)",
      "returns": 1,
      "category": "Fleets",
      "section": "A single ship",
      "summary": "Its reference consumption, the one that enters the fuel calculation. Never less than 1.",
      "anchor": "flottes--a-single-ship",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--a-single-ship",
      "examples": []
    },
    {
      "name": "ShipsAttackStrength",
      "signature": "ShipsAttackStrength(ships, researches)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "The firepower of a whole fleet.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": []
    },
    {
      "name": "ShipsAttackStrengthUsingOwnResearches",
      "signature": "ShipsAttackStrengthUsingOwnResearches(ships)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "The same, with your own researches.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": [
        "Print(\"firepower:\", ShipsAttackStrengthUsingOwnResearches(ships))"
      ]
    },
    {
      "name": "ShipSpeed",
      "signature": "ShipSpeed(id)",
      "returns": 1,
      "category": "Fleets",
      "section": "A single ship",
      "summary": "Its speed.",
      "anchor": "flottes--a-single-ship",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--a-single-ship",
      "examples": []
    },
    {
      "name": "ShortDur",
      "signature": "ShortDur(d)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Comparing and measuring",
      "summary": "Writes a duration readably, 2h15m.",
      "anchor": "temps--comparing-and-measuring",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--comparing-and-measuring",
      "examples": [
        "Print(target, ShortDur(secs), \"deut\", fuel)",
        "Print(ShortDur(secs), fuel)          // ShortDur reads seconds",
        "Print(ShortDur(ConstructionTime(LARGECARGO, 20, fac)))"
      ]
    },
    {
      "name": "ShortShipsInfos",
      "signature": "ShortShipsInfos(fleet)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Describing a fleet in one line",
      "summary": "Sums up a fleet: LightFighter: 120, SmallCargo: 40.",
      "anchor": "outils--describing-a-fleet-in-one-line",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--describing-a-fleet-in-one-line",
      "examples": [
        "LogInfof(\"%s : %s\", planet.Coordinate, ShortShipsInfos(ships))"
      ]
    },
    {
      "name": "Shuffle",
      "signature": "Shuffle(list)",
      "returns": 0,
      "category": "Output and storage",
      "section": "A few conveniences",
      "summary": "Shuffles a list in place.",
      "anchor": "base--a-few-conveniences",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--a-few-conveniences",
      "examples": [
        "Shuffle(targets)         // the order changes, the list stays the same"
      ]
    },
    {
      "name": "Sleep",
      "signature": "Sleep(n)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "Sleep(500)",
        "Sleep(60)                                 // too fast: we will retry",
        "Sleep(500)                  // do not chain reads back to back"
      ]
    },
    {
      "name": "SleepDur",
      "signature": "SleepDur(d)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepDur(90 * time.Second)"
      ]
    },
    {
      "name": "SleepMin",
      "signature": "SleepMin(n)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepMin(5)",
        "SleepMin(60)",
        "SleepMin(30)"
      ]
    },
    {
      "name": "SleepMs",
      "signature": "SleepMs(n)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": []
    },
    {
      "name": "SleepRandHour",
      "signature": "SleepRandHour(min, max)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepRandHour(1, 3)"
      ]
    },
    {
      "name": "SleepRandMin",
      "signature": "SleepRandMin(min, max)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepRandMin(3, 8)"
      ]
    },
    {
      "name": "SleepRandMs",
      "signature": "SleepRandMs(min, max)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepRandMs(200, 800)    // ✓ you wait from 200 to 800 milliseconds",
        "SleepRandMs(500, 1200)           // space them out, nothing will do it for you",
        "SleepRandMs(400, 900)"
      ]
    },
    {
      "name": "SleepRandSec",
      "signature": "SleepRandSec(min, max)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepRandSec(20, 40)",
        "SleepRandSec(20, 40)       // prefer randomness: a regular interval is easy to spot",
        "SleepRandSec(20, 60)"
      ]
    },
    {
      "name": "SleepSec",
      "signature": "SleepSec(n)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepSec(30)",
        "SleepSec(2)",
        "if IsPaused() { SleepSec(30); continue }"
      ]
    },
    {
      "name": "SleepUntil",
      "signature": "SleepUntil(when)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Waiting",
      "summary": "",
      "anchor": "temps--waiting",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--waiting",
      "examples": [
        "SleepUntil(\"03:30:00\")           // the next time it is 3:30",
        "if err == nil { SleepUntil(when) }         // never nest it inside SleepUntil(...)"
      ]
    },
    {
      "name": "SolarSatelliteProduction",
      "signature": "SolarSatelliteProduction(temperature, count)",
      "returns": 1,
      "category": "Toolbox",
      "section": "What computes without asking the game",
      "summary": "The energy satellites produce.",
      "anchor": "outils--what-computes-without-asking-the-game",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--what-computes-without-asking-the-game",
      "examples": [
        "Print(\"energy:\", SolarSatelliteProduction(temp, 123))"
      ]
    },
    {
      "name": "Speed",
      "signature": "Speed(fleet)",
      "returns": 1,
      "category": "Fleets",
      "section": "What a fleet carries, and how fast",
      "summary": "The speed of the slowest ship, the one that dictates the flight.",
      "anchor": "flottes--what-a-fleet-carries-and-how-fast",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--what-a-fleet-carries-and-how-fast",
      "examples": [
        "Print(Speed(f), Cargo(f))"
      ]
    },
    {
      "name": "Sqrt",
      "signature": "Sqrt(x)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Computing",
      "summary": "The square root.",
      "anchor": "outils--computing",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--computing",
      "examples": []
    },
    {
      "name": "StartBrain",
      "signature": "StartBrain()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Brain. Build queues and research.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartBrain()"
      ]
    },
    {
      "name": "StartColonizerBot",
      "signature": "StartColonizerBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The colonizer.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartColonizerBot()"
      ]
    },
    {
      "name": "StartDefenderBot",
      "signature": "StartDefenderBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The defender.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartDefenderBot()"
      ]
    },
    {
      "name": "StartDiscoveryBot",
      "signature": "StartDiscoveryBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Discovery.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartDiscoveryBot()"
      ]
    },
    {
      "name": "StartExpeditionsBot",
      "signature": "StartExpeditionsBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Expeditions.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartExpeditionsBot()"
      ]
    },
    {
      "name": "StartFarmingBot",
      "signature": "StartFarmingBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Farming. StartFarmingBot() gives the farmer a session when it has none.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartFarmingBot()",
        "err = StartFarmingBot()"
      ]
    },
    {
      "name": "StartFarmSession",
      "signature": "StartFarmSession(session)",
      "returns": 1,
      "since": "1.82.240",
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Starts one named session, like the ▶ on its row.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartFarmSession(session.ID)"
      ]
    },
    {
      "name": "StartHunter",
      "signature": "StartHunter()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The hunter. Target tracking.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartHunter()"
      ]
    },
    {
      "name": "StartPhalanxSession",
      "signature": "StartPhalanxSession(moon, target, interval)",
      "returns": 2,
      "category": "Fleets",
      "section": "Handing the watch to the bot",
      "summary": "Sets up the watch on a position and turns it on.",
      "anchor": "flottes--handing-the-watch-to-the-bot",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--handing-the-watch-to-the-bot",
      "examples": [
        "id, err = StartPhalanxSession(moon.GetID(), \"1:2:8\", 300)   // every 5 min"
      ]
    },
    {
      "name": "StartScanner",
      "signature": "StartScanner()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The scanner. System sweeps.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StartScanner()"
      ]
    },
    {
      "name": "StartScript",
      "signature": "StartScript(name)",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Starts it and returns at once.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": [
        "StartScript(\"night-watch\")",
        "StartScript(\"report\")",
        "err = StartScript(WATCH)"
      ]
    },
    {
      "name": "StartSleepMode",
      "signature": "StartSleepMode()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Sleep mode. See the warning below.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": []
    },
    {
      "name": "StartWorker",
      "signature": "StartWorker(name)",
      "returns": 1,
      "category": "Workers",
      "section": "The general form",
      "summary": "Switches the named worker on.",
      "anchor": "workers--the-general-form",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-general-form",
      "examples": [
        "err = StartWorker(\"timer\")",
        "err = StartWorker(\"repatriate\")"
      ]
    },
    {
      "name": "StopBrain",
      "signature": "StopBrain()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Brain. Build queues and research.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopBrain()"
      ]
    },
    {
      "name": "StopColonizerBot",
      "signature": "StopColonizerBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The colonizer.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopColonizerBot()"
      ]
    },
    {
      "name": "StopDefenderBot",
      "signature": "StopDefenderBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The defender.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopDefenderBot()"
      ]
    },
    {
      "name": "StopDiscoveryBot",
      "signature": "StopDiscoveryBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Discovery.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopDiscoveryBot()"
      ]
    },
    {
      "name": "StopExpeditionsBot",
      "signature": "StopExpeditionsBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Expeditions.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopExpeditionsBot()"
      ]
    },
    {
      "name": "StopFarmingBot",
      "signature": "StopFarmingBot()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Farming. StartFarmingBot() gives the farmer a session when it has none.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "err = StopFarmingBot()"
      ]
    },
    {
      "name": "StopHunter",
      "signature": "StopHunter()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The hunter. Target tracking.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopHunter()"
      ]
    },
    {
      "name": "StopPhalanxSession",
      "signature": "StopPhalanxSession(id)",
      "returns": 1,
      "category": "Fleets",
      "section": "Handing the watch to the bot",
      "summary": "Turns it off.",
      "anchor": "flottes--handing-the-watch-to-the-bot",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--handing-the-watch-to-the-bot",
      "examples": [
        "StopPhalanxSession(id)"
      ]
    },
    {
      "name": "StopScanner",
      "signature": "StopScanner()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "The scanner. System sweeps.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": [
        "StopScanner()"
      ]
    },
    {
      "name": "StopScript",
      "signature": "StopScript(name)",
      "returns": 1,
      "category": "Workers",
      "section": "One script driving others",
      "summary": "Stops it.",
      "anchor": "workers--one-script-driving-others",
      "url": "https://keplerbot.net/en/scripts/workers#workers--one-script-driving-others",
      "examples": [
        "StopScript(\"night-watch\")",
        "StopScript(WATCH)"
      ]
    },
    {
      "name": "StopSleepMode",
      "signature": "StopSleepMode()",
      "returns": 1,
      "category": "Workers",
      "section": "Switching on and off",
      "summary": "Sleep mode. See the warning below.",
      "anchor": "workers--switching-on-and-off",
      "url": "https://keplerbot.net/en/scripts/workers#workers--switching-on-and-off",
      "examples": []
    },
    {
      "name": "StopWorker",
      "signature": "StopWorker(name)",
      "returns": 1,
      "category": "Workers",
      "section": "The general form",
      "summary": "Switches it off.",
      "anchor": "workers--the-general-form",
      "url": "https://keplerbot.net/en/scripts/workers#workers--the-general-form",
      "examples": [
        "StopWorker(\"spyer\")"
      ]
    },
    {
      "name": "StorageKeys",
      "signature": "StorageKeys()",
      "returns": 1,
      "category": "Output and storage",
      "section": "Remembering between two passes",
      "summary": "Every key stored by this script.",
      "anchor": "base--remembering-between-two-passes",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--remembering-between-two-passes",
      "examples": [
        "for key in StorageKeys() {\n    Print(key)\n}"
      ]
    },
    {
      "name": "StructuralIntegrity",
      "signature": "StructuralIntegrity(id, researches)",
      "returns": 1,
      "category": "Fleets",
      "section": "Combat strength",
      "summary": "Structure, plus 10% per armour level.",
      "anchor": "flottes--combat-strength",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--combat-strength",
      "examples": []
    },
    {
      "name": "TearDown",
      "signature": "TearDown(celestial, building)",
      "returns": 1,
      "category": "Celestials",
      "section": "Starting and cancelling construction",
      "summary": "Tears one level down.",
      "anchor": "celestes--starting-and-cancelling-construction",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--starting-and-cancelling-construction",
      "examples": [
        "TearDown(c.GetID(), SOLARPLANT)"
      ]
    },
    {
      "name": "TechnologyConstructionTime",
      "signature": "TechnologyConstructionTime(id, level, lab)",
      "returns": 1,
      "category": "Fleets",
      "section": "Prices and construction times",
      "summary": "Time for a research, with the lab level given plainly.",
      "anchor": "flottes--prices-and-construction-times",
      "url": "https://keplerbot.net/en/scripts/fleets#flottes--prices-and-construction-times",
      "examples": [
        "Print(ShortDur(TechnologyConstructionTime(ESPIONAGETECHNOLOGY, 10, fac.ResearchLab)))"
      ]
    },
    {
      "name": "TechnologyDetails",
      "signature": "TechnologyDetails(celestial, what)",
      "returns": 2,
      "category": "Celestials",
      "section": "Production sliders, and the price on the spot",
      "summary": "Price, duration and level, on that celestial.",
      "anchor": "celestes--production-sliders-and-the-price-on-the-spot",
      "url": "https://keplerbot.net/en/scripts/celestials#celestes--production-sliders-and-the-price-on-the-spot",
      "examples": []
    },
    {
      "name": "Terminate",
      "signature": "Terminate()",
      "returns": 0,
      "category": "Output and storage",
      "section": "Steering your own script",
      "summary": "The same.",
      "anchor": "base--steering-your-own-script",
      "url": "https://keplerbot.net/en/scripts/output-and-storage#base--steering-your-own-script",
      "examples": []
    },
    {
      "name": "TriggerFleetSave",
      "signature": "TriggerFleetSave()",
      "returns": 1,
      "category": "Workers",
      "section": "Sleep, and the Defender's interval",
      "summary": "Sends the fleet out now, using the sleep-mode settings.",
      "anchor": "workers--sleep-and-the-defenders-interval",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sleep-and-the-defenders-interval",
      "examples": [
        "err = TriggerFleetSave()"
      ]
    },
    {
      "name": "UnignoreAlliance",
      "signature": "UnignoreAlliance(tag)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": []
    },
    {
      "name": "UnignorePlanet",
      "signature": "UnignorePlanet(coord)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": []
    },
    {
      "name": "UnignorePlayer",
      "signature": "UnignorePlayer(player)",
      "returns": 1,
      "category": "Workers",
      "section": "Sparing players, positions, alliances",
      "summary": "Removes it from the list.",
      "anchor": "workers--sparing-players-positions-alliances",
      "url": "https://keplerbot.net/en/scripts/workers#workers--sparing-players-positions-alliances",
      "examples": []
    },
    {
      "name": "Unix",
      "signature": "Unix(sec, nsec)",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "Rebuilds a date from a timestamp.",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": []
    },
    {
      "name": "VersionCompare",
      "signature": "VersionCompare(a, b)",
      "returns": 1,
      "category": "Toolbox",
      "section": "Comparing two versions",
      "summary": "-1 if a is older, 0 if they are equal, 1 if a is newer.",
      "anchor": "outils--comparing-two-versions",
      "url": "https://keplerbot.net/en/scripts/toolbox#outils--comparing-two-versions",
      "examples": [
        "Print(VersionCompare(\"1.2\", \"1.2.0\"))     // 0: absent segments count as zero",
        "if VersionCompare(VERSION, \"0.91.8\") == -1 {\n    Print(\"bot too old\")\n    Exit()\n}"
      ]
    },
    {
      "name": "WaitAttack",
      "signature": "WaitAttack(seconds)",
      "returns": 2,
      "category": "Scheduling",
      "section": "Reacting to an event",
      "summary": "Waits for an attack. The boolean says whether one came.",
      "anchor": "ordo--reacting-to-an-event",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--reacting-to-an-event",
      "examples": [
        "a, seen = WaitAttack(0)",
        "a, seen = WaitAttack(0)        // 0: wait with no limit"
      ]
    },
    {
      "name": "WaitAttackGone",
      "signature": "WaitAttackGone(seconds)",
      "returns": 2,
      "category": "Scheduling",
      "section": "Reacting to an event",
      "summary": "Waits for an attack to disappear.",
      "anchor": "ordo--reacting-to-an-event",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--reacting-to-an-event",
      "examples": []
    },
    {
      "name": "WaitChatMessage",
      "signature": "WaitChatMessage(seconds)",
      "returns": 2,
      "category": "Scheduling",
      "section": "Reacting to an event",
      "summary": "Waits for a player to write.",
      "anchor": "ordo--reacting-to-an-event",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--reacting-to-an-event",
      "examples": [
        "m, seen = WaitChatMessage(0)"
      ]
    },
    {
      "name": "WaitFleet",
      "signature": "WaitFleet(seconds)",
      "returns": 2,
      "category": "Scheduling",
      "section": "Reacting to an event",
      "summary": "Waits for a worker to send a fleet.",
      "anchor": "ordo--reacting-to-an-event",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--reacting-to-an-event",
      "examples": [
        "f, seen = WaitFleet(0)"
      ]
    },
    {
      "name": "WaitHunterTargetActive",
      "signature": "WaitHunterTargetActive(seconds)",
      "returns": 2,
      "category": "Scheduling",
      "section": "Reacting to an event",
      "summary": "Waits for a target to come back to their screen.",
      "anchor": "ordo--reacting-to-an-event",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--reacting-to-an-event",
      "examples": [
        "e, seen = WaitHunterTargetActive(0)"
      ]
    },
    {
      "name": "WaitHunterTargetIdle",
      "signature": "WaitHunterTargetIdle(seconds)",
      "returns": 2,
      "category": "Scheduling",
      "section": "Reacting to an event",
      "summary": "Waits for a target to leave it.",
      "anchor": "ordo--reacting-to-an-event",
      "url": "https://keplerbot.net/en/scripts/scheduling#ordo--reacting-to-an-event",
      "examples": [
        "e, seen = WaitHunterTargetIdle(0)"
      ]
    },
    {
      "name": "Weekday",
      "signature": "Weekday()",
      "returns": 1,
      "category": "Time and waiting",
      "section": "Telling the time",
      "summary": "The day of the week, Sunday being zero.",
      "anchor": "temps--telling-the-time",
      "url": "https://keplerbot.net/en/scripts/time-and-waiting#temps--telling-the-time",
      "examples": [
        "if Weekday() == 0 { Print(\"Sunday\") }"
      ]
    }
  ]
}
