openapi: 3.1.0
info:
  title: PROCatchem Lua Script API
  summary: Lua API reference for PROCatchem script authors, including notification helpers.
  version: 1.0.109
  description: "This documentation describes the Lua functions exposed by PROCatchem to user scripts.\n\
    \nThe API is represented as OpenAPI pseudo-endpoints so it can be rendered with Redoc/Redocly and\
    \ deployed as a static documentation site. These are not HTTP endpoints. Each operation describes\
    \ one Lua global function or script callback.\n\nNew notification helpers let scripts send configured\
    \ Discord/Telegram notification templates, pass template variables, override delivery targets, and\
    \ send quick plain-text alerts from Lua.\n\nBasic script shape:\n\n```lua\nname = \"Example Script\"\
    \nauthor = \"YourName\"\ndescription = \"Simple PROCatchem script.\"\n\nfunction onPathAction()\n\
    \    if getMapName() == \"Viridian City\" then\n        moveToGrass()\n    end\nend\n\nfunction onBattleAction()\n\
    \    attack()\nend\n```\n\nAction rule: a script should execute at most one path or battle action\
    \ per frame. Query/helper functions can be called freely.\n\nPC storage helpers document the current\
    \ official storage flow: open with `usePC()`, refresh or open a box, then use one-based indexes for\
    \ the visible team/box order. PC updates are asynchronous; after deposit, withdraw, swap, internal\
    \ box swap, or release, wait for `isCurrentPCBoxRefreshed()` or re-check the relevant PC/team state\
    \ before issuing the next dependent action."
servers:
- url: lua://PROCatchem
  description: Pseudo server used only to render Lua function documentation.
tags:
- name: Script metadata
  description: Top-level Lua fields read by the script loader.
- name: Lifecycle callbacks
  description: Functions implemented by your script and called by the bot runtime.
- name: Core utilities
  description: Logging, relog/restart helpers, hooks and utility helpers.
- name: Workflow
  description: Compose other Lua APIs into one ordered action.
- name: Map and NPC
  description: Map, cell, NPC, discoverable object and position helpers.
- name: General state
  description: Account, player, time, server and global game state helpers.
- name: Team Pokémon
  description: Current party/team Pokémon getters and team-level helpers.
- name: Items and shop
  description: Inventory, item usage and shop helpers.
- name: PC storage
  description: PC box query and management helpers.
- name: Battle state
  description: Current battle and opponent query helpers.
- name: Path actions
  description: Movement, NPC interaction, team ordering, PC and overworld actions.
- name: Dialog functions
  description: Dialog answer helpers.
- name: Battle actions
  description: Battle-only actions.
- name: Bot configuration
  description: AFK bot behavior configuration helpers.
- name: Move learning actions
  description: Move learning callbacks/actions.
- name: Custom options
  description: Script-defined UI options exposed in the tool.
- name: File APIs
  description: Read/write helpers for script-local files.
- name: Chat
  description: Chat/channel helpers.
- name: Notifications
  description: Discord and Telegram notification helpers for Lua scripts.
- name: Legacy special actions
  description: Legacy or special-purpose actions.
components:
  schemas:
    LuaValue:
      description: Any Lua-compatible value.
      oneOf:
      - type: string
      - type: number
      - type: boolean
      - type: object
      - type: array
        items: {}
    Position:
      type: object
      properties:
        x:
          type: integer
        y:
          type: integer
      required:
      - x
      - y
    NpcData:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/LuaValue'
    PokemonTypes:
      type: array
      items:
        type: string
      minItems: 0
      maxItems: 2
    NotificationVariables:
      type: object
      description: Lua table of template variable values. Keys are variable names without braces, e.g.
        pokemon for {pokemon}. Values are converted to strings.
      additionalProperties:
        type: string
      example:
        pokemon: Gyarados
        level: '30'
        map: Route 22
    NotificationTarget:
      type: string
      description: Notification delivery target override. personal/discord sends only to the user Discord
        webhook, procatchem sends only to the built-in PROCatchem Discord channel, telegram sends only
        to Telegram, and all uses the template configured target.
      enum:
      - personal
      - discord
      - procatchem
      - telegram
      - all
      example: procatchem
paths:
  /lua/metadata/name:
    get:
      tags:
      - Script metadata
      operationId: name
      summary: name()
      description: '**Callback**


        ```lua

        result = name()

        ```


        Script display name shown in the tool.


        **Practical scenario**


        Set this metadata once at the top of the Lua file so the Scripts tab displays a recognizable name.


        ```lua

        name = "Viridian Training Route"

        ```'
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = name()
      x-codeSamples:
      - lang: Lua
        source: name = "Viridian Training Route"
  /lua/metadata/author:
    get:
      tags:
      - Script metadata
      operationId: author
      summary: author()
      description: '**Callback**


        ```lua

        result = author()

        ```


        Script author displayed in the tool.


        **Practical scenario**


        Set this metadata once at the top of the Lua file so users know who maintains the script.


        ```lua

        author = "Iron Stark"

        ```'
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = author()
      x-codeSamples:
      - lang: Lua
        source: author = "Iron Stark"
  /lua/metadata/description:
    get:
      tags:
      - Script metadata
      operationId: description
      summary: description()
      description: '**Callback**


        ```lua

        result = description()

        ```


        Short script description displayed in the tool.


        **Practical scenario**


        Use this metadata to explain the route, requirements, and intended behavior before the script
        starts.


        ```lua

        description = "Trains in Viridian Forest and returns to the Pokécenter below 25% HP."

        ```'
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = description()
      x-codeSamples:
      - lang: Lua
        source: description = "Trains in Viridian Forest and returns to the Pokécenter below 25% HP."
  /lua/callbacks/onStart:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onStart
      summary: onStart()
      description: "**Callback**\n\n```lua\nonStart()\n```\n\nCalled when the script starts.\n\n**Practical\
        \ scenario**\n\nInitialize counters and log the starting state when the user starts the script.\n\
        \n```lua\nlocal encounters = 0\n\nfunction onStart()\n    encounters = 0\n    log(\"Training script\
        \ started on \" .. getMapName())\nend\n```"
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onStart()
      x-codeSamples:
      - lang: Lua
        source: "local encounters = 0\n\nfunction onStart()\n    encounters = 0\n    log(\"Training script\
          \ started on \" .. getMapName())\nend"
  /lua/callbacks/onStop:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onStop
      summary: onStop()
      description: "**Callback**\n\n```lua\nonStop()\n```\n\nCalled when the script stops.\n\n**Practical\
        \ scenario**\n\nPersist or report final state before the runtime finishes the script.\n\n```lua\n\
        function onStop()\n    log(\"Script stopped safely.\")\nend\n```"
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onStop()
      x-codeSamples:
      - lang: Lua
        source: "function onStop()\n    log(\"Script stopped safely.\")\nend"
  /lua/callbacks/onPause:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onPause
      summary: onPause()
      description: "**Callback**\n\n```lua\nonPause()\n```\n\nCalled when the script is paused.\n\n**Practical\
        \ scenario**\n\nUse this callback for status logging or pausing your own timers.\n\n```lua\nfunction\
        \ onPause()\n    log(\"Lua automation paused.\")\nend\n```"
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onPause()
      x-codeSamples:
      - lang: Lua
        source: "function onPause()\n    log(\"Lua automation paused.\")\nend"
  /lua/callbacks/onResume:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onResume
      summary: onResume()
      description: "**Callback**\n\n```lua\nonResume()\n```\n\nCalled when the script resumes.\n\n**Practical\
        \ scenario**\n\nRe-check game state because the player may have moved or changed the team while\
        \ paused.\n\n```lua\nfunction onResume()\n    log(\"Lua automation resumed on \" .. getMapName())\n\
        end\n```"
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onResume()
      x-codeSamples:
      - lang: Lua
        source: "function onResume()\n    log(\"Lua automation resumed on \" .. getMapName())\nend"
  /lua/callbacks/onPathAction:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onPathAction
      summary: onPathAction()
      description: "**Callback**\n\n```lua\nonPathAction()\n```\n\nCalled repeatedly while the player\
        \ is outside battle. Execute at most one path action per frame.\n\n**Practical scenario**\n\n\
        This is the main overworld decision callback. Perform no more than one path action per call.\n\
        \n```lua\nfunction onPathAction()\n    if getPokemonHealthPercent(1) < 25 then\n        usePokecenter()\n\
        \        return\n    end\n\n    moveToGrass()\nend\n```"
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onPathAction()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if getPokemonHealthPercent(1) < 25 then\n        usePokecenter()\n\
          \        return\n    end\n\n    moveToGrass()\nend"
  /lua/callbacks/onBattleAction:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onBattleAction
      summary: onBattleAction()
      description: "**Callback**\n\n```lua\nonBattleAction()\n```\n\nCalled repeatedly while the player\
        \ is in battle. Execute at most one battle action per frame.\n\n**Practical scenario**\n\nThis\
        \ is the main battle decision callback. Perform no more than one battle action per call.\n\n```lua\n\
        function onBattleAction()\n    if isOpponentShiny() or not isAlreadyCaught() then\n        weakAttack()\n\
        \        return\n    end\n\n    attack()\nend\n```"
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onBattleAction()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    if isOpponentShiny() or not isAlreadyCaught() then\n \
          \       weakAttack()\n        return\n    end\n\n    attack()\nend"
  /lua/callbacks/onDialogMessage:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onDialogMessage
      summary: onDialogMessage()
      description: "**Callback**\n\n```lua\nonDialogMessage(message)\n```\n\nCalled when a dialog message\
        \ is received.\n\n**Practical scenario**\n\nInspect NPC text to track quests or diagnose unexpected\
        \ dialog branches.\n\n```lua\nfunction onDialogMessage(message)\n    if stringContains(message,\
        \ \"badge\") then\n        log(\"Badge requirement detected: \" .. message)\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - message
            example:
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onDialogMessage(message)
      x-codeSamples:
      - lang: Lua
        source: "function onDialogMessage(message)\n    if stringContains(message, \"badge\") then\n \
          \       log(\"Badge requirement detected: \" .. message)\n    end\nend"
  /lua/callbacks/onBattleMessage:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onBattleMessage
      summary: onBattleMessage()
      description: "**Callback**\n\n```lua\nonBattleMessage(message)\n```\n\nCalled when a battle message\
        \ is received.\n\n**Practical scenario**\n\nInspect battle text for events that are not exposed\
        \ as dedicated state helpers.\n\n```lua\nfunction onBattleMessage(message)\n    if stringContains(message,\
        \ \"fainted\") then\n        log(\"A Pokémon fainted: \" .. message)\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - message
            example:
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onBattleMessage(message)
      x-codeSamples:
      - lang: Lua
        source: "function onBattleMessage(message)\n    if stringContains(message, \"fainted\") then\n\
          \        log(\"A Pokémon fainted: \" .. message)\n    end\nend"
  /lua/callbacks/onSystemMessage:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onSystemMessage
      summary: onSystemMessage()
      description: "**Callback**\n\n```lua\nonSystemMessage(message)\n```\n\nCalled when a system message\
        \ is received.\n\n**Practical scenario**\n\nUse system messages to confirm server-side actions\
        \ such as catches, releases, or item usage.\n\n```lua\nfunction onSystemMessage(message)\n   \
        \ log(\"SYSTEM: \" .. message)\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - message
            example:
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onSystemMessage(message)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    log(\"SYSTEM: \" .. message)\nend"
  /lua/callbacks/onWarningMessage:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onWarningMessage
      summary: onWarningMessage()
      description: "**Callback**\n\n```lua\nonWarningMessage(differentMap, distance)\n```\n\nCalled when\
        \ a warning message is received; distance can be -1 when unavailable.\n\n**Practical scenario**\n\
        \nRecord warnings so a long-running script can be diagnosed later.\n\n```lua\nfunction onWarningMessage(message)\n\
        \    logToFile(\"logs/warnings.txt\", message)\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                differentMap:
                  type: boolean
                  description: Value passed to the `differentMap` parameter.
                distance:
                  type: integer
                  description: Value passed to the `distance` parameter.
              required:
              - differentMap
              - distance
            example:
              differentMap: Viridian City
              distance: 1
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onWarningMessage(differentMap, distance)
      x-codeSamples:
      - lang: Lua
        source: "function onWarningMessage(message)\n    logToFile(\"logs/warnings.txt\", message)\nend"
  /lua/callbacks/onLearningMove:
    post:
      tags:
      - Lifecycle callbacks
      operationId: onLearningMove
      summary: onLearningMove()
      description: "**Callback**\n\n```lua\nonLearningMove(moveName, pokemonIndex)\n```\n\nCalled when\
        \ a Pokémon is learning a move.\n\n**Practical scenario**\n\nChoose which move to forget when\
        \ the game asks a Pokémon to learn a new move.\n\n```lua\nfunction onLearningMove(moveName, pokemonIndex)\n\
        \    if moveName == \"Thunderbolt\" then\n        forgetAnyMoveExcept(\"Thunderbolt\")\n    else\n\
        \        forgetMove(1)\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                moveName:
                  type: string
                  description: Exact move name as shown by the game.
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
              required:
              - moveName
              - pokemonIndex
            example:
              moveName: Tackle
              pokemonIndex: 1
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: onLearningMove(moveName, pokemonIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onLearningMove(moveName, pokemonIndex)\n    if moveName == \"Thunderbolt\" then\n\
          \        forgetAnyMoveExcept(\"Thunderbolt\")\n    else\n        forgetMove(1)\n    end\nend"
  /lua/core-utilities/log:
    post:
      tags:
      - Core utilities
      operationId: log
      summary: log()
      description: "**Lua global function**\n\n```lua\nlog(message)\n```\n\nDisplays the specified message\
        \ to the message log.\n\n**Practical scenario**\n\nWrite concise diagnostics that identify the\
        \ current map, Pokémon, or decision branch.\n\n```lua\nfunction onStart()\n    log(\"Script started\
        \ on \" .. getMapName())\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - message
            example:
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: log(message)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    log(\"Script started on \" .. getMapName())\nend"
  /lua/core-utilities/fatal:
    post:
      tags:
      - Core utilities
      operationId: fatal
      summary: fatal()
      description: "**Lua global function**\n\n```lua\nfatal(message)\n```\n\nDisplays the specified message\
        \ to the message log and stop the bot.\n\n**Practical scenario**\n\nStop immediately when a required\
        \ precondition is missing and explain how the user can fix it.\n\n```lua\nfunction onStart()\n\
        \    if getTeamSize() == 0 then\n        fatal(\"A Pokémon team is required before this script\
        \ can run.\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - message
            example:
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: fatal(message)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    if getTeamSize() == 0 then\n        fatal(\"A Pokémon team is\
          \ required before this script can run.\")\n    end\nend"
  /lua/core-utilities/logout:
    post:
      tags:
      - Core utilities
      operationId: logout
      summary: logout()
      description: "**Lua global function**\n\n```lua\nlogout(message)\n```\n\nDisplays the specified\
        \ message to the message log and logs out.\n\n**Practical scenario**\n\nUse a guarded condition\
        \ so the script does not request logout on every frame.\n\n```lua\nfunction onPathAction()\n \
        \   if getMoney() < 100 then\n        logout(\"Stopping: not enough money to continue safely.\"\
        )\n        return\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - message
            example:
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: logout(message)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if getMoney() < 100 then\n        logout(\"Stopping: not\
          \ enough money to continue safely.\")\n        return\n    end\nend"
  /lua/core-utilities/relog:
    post:
      tags:
      - Core utilities
      operationId: relog
      summary: relog()
      description: "**Lua global function**\n\n```lua\nrelog(delay, message)\n```\n\nLogs out and logs\
        \ back in after the specified number of seconds.\n\n**Practical scenario**\n\nSchedule a reconnect\
        \ only from a guarded branch, such as recovering from a known server state.\n\n```lua\nfunction\
        \ onWarningMessage(differentMap, distance)\n    if differentMap then\n        relog(15, \"Map\
        \ synchronization failed; reconnecting.\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                delay:
                  type: number
                  description: Value passed to the `delay` parameter.
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - delay
              - message
            example:
              delay: 15
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: relog(delay, message)
      x-codeSamples:
      - lang: Lua
        source: "function onWarningMessage(differentMap, distance)\n    if differentMap then\n       \
          \ relog(15, \"Map synchronization failed; reconnecting.\")\n    end\nend"
  /lua/core-utilities/restart:
    post:
      tags:
      - Core utilities
      operationId: restart
      summary: restart()
      description: "**Lua global function**\n\n```lua\nrestart(delay, message)\n```\n\nStart the script.\n\
        \n**Practical scenario**\n\nRestart a script only after detecting a state that cannot be recovered\
        \ inside the current run.\n\n```lua\nfunction onWarningMessage(differentMap, distance)\n    if\
        \ distance > 10 then\n        restart(5, \"Player position is too far from the expected route.\"\
        )\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                delay:
                  type: integer
                  description: Value passed to the `delay` parameter.
                message:
                  type: string
                  description: Message text provided by the game or sent by the script.
              required:
              - delay
              - message
            example:
              delay: 15
              message: Hello from PROCatchem script.
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: restart(delay, message)
      x-codeSamples:
      - lang: Lua
        source: "function onWarningMessage(differentMap, distance)\n    if distance > 10 then\n      \
          \  restart(5, \"Player position is too far from the expected route.\")\n    end\nend"
  /lua/core-utilities/stringcontains:
    post:
      tags:
      - Core utilities
      operationId: stringContains
      summary: stringContains()
      description: "**Lua global function**\n\n```lua\nresult = stringContains(haystack, needle)\n```\n\
        \nReturns true if the string contains the specified part, ignoring the case.\n\n**Practical scenario**\n\
        \nUse case-insensitive message checks to recognize dialog, battle, or system text.\n\n```lua\n\
        function onDialogMessage(message)\n    if stringContains(message, \"other badges\") then\n   \
        \     log(\"This NPC is blocking progress until more badges are earned.\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                haystack:
                  type: string
                  description: Value passed to the `haystack` parameter.
                needle:
                  type: string
                  description: Value passed to the `needle` parameter.
              required:
              - haystack
              - needle
            example:
              haystack: value
              needle: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = stringContains(haystack, needle)
      x-codeSamples:
      - lang: Lua
        source: "function onDialogMessage(message)\n    if stringContains(message, \"other badges\") then\n\
          \        log(\"This NPC is blocking progress until more badges are earned.\")\n    end\nend"
  /lua/core-utilities/playsound:
    post:
      tags:
      - Core utilities
      operationId: playSound
      summary: playSound()
      description: "**Lua global function**\n\n```lua\nplaySound(file)\n```\n\nReturns playing a custom\
        \ sound.\n\n**Practical scenario**\n\nUse this helper for diagnostics or lifecycle control. Avoid\
        \ calling restart/logout helpers repeatedly every frame.\n\n```lua\nfunction onStart()\n    function\
        \ onStart()\n    playSound(\"logs/script.txt\")\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: Path relative to the script/tool data directory.
              required:
              - file
            example:
              file: logs/script.txt
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: playSound(file)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    playSound(\"logs/script.txt\")\nend\n\
          end"
  /lua/core-utilities/registerhook:
    post:
      tags:
      - Core utilities
      operationId: registerHook
      summary: registerHook()
      description: "**Lua global function**\n\n```lua\nregisterHook(eventName, callback)\n```\n\nCalls\
        \ the specified function when the specified event occurs.\n\n**Practical scenario**\n\nRegister\
        \ a callback once, usually from `onStart`, rather than registering it every frame.\n\n```lua\n\
        function onStart()\n    registerHook(\"battle\", function(message)\n        log(\"Battle hook:\
        \ \" .. tostring(message))\n    end)\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                eventName:
                  type: string
                  description: Value passed to the `eventName` parameter.
                callback:
                  description: Any Lua value.
                  oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: object
                  - type: array
                    items: {}
              required:
              - eventName
              - callback
            example:
              eventName: value
              callback: {}
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: registerHook(eventName, callback)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    registerHook(\"battle\", function(message)\n        log(\"Battle\
          \ hook: \" .. tostring(message))\n    end)\nend"
  /lua/workflow/execute-steps:
    post:
      tags:
      - Workflow
      operationId: executeSteps
      summary: executeSteps()
      description: "**Lua global function**\n\n```lua\nexecuteSteps(steps, options)\n```\n\nRuns a list\
        \ of steps (other Lua functions/APIs) as one ordered action. Each step is a function, a `{ \"\
        name\", function }` pair, or a `{ name, run, args, continueOnError }` table. Honours the one-bot-action-per-frame\
        \ rule via `stopOnAction` (default true): it stops at the first step that performs a bot action\
        \ and returns `nextIndex` to resume next frame.\n\n**Practical scenario**\n\nGroup query/helper\
        \ work and stop at the first real bot action, then resume from `nextIndex` on a later frame.\n\
        \n```lua\nlocal nextStep = 1\n\nfunction onPathAction()\n    local result = executeSteps({\n \
        \       { \"log map\", function() log(getMapName()) end },\n        { \"move\", moveToGrass }\n\
        \    }, { stopOnAction = true, logProgress = true, startIndex = nextStep })\n\n    nextStep =\
        \ result.nextIndex or 1\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                steps:
                  type: array
                  items:
                    type: object
                  description: Ordered Lua functions/step descriptors to execute.
                options:
                  type: object
                  properties:
                    stopOnError:
                      type: boolean
                      default: true
                    stopOnAction:
                      type: boolean
                      default: true
                    logProgress:
                      type: boolean
                      default: false
                  description: Optional execution settings table.
              required:
              - steps
            example:
              steps: []
              options:
                stopOnAction: true
      responses:
        '200':
          description: Result table { ok, total, completed, actionPerformed, stoppedForAction, stoppedForError,
            nextIndex?, elapsedMs, results }.
      x-lua-signature: executeSteps(steps, options)
      x-codeSamples:
      - lang: Lua
        source: "local nextStep = 1\n\nfunction onPathAction()\n    local result = executeSteps({\n  \
          \      { \"log map\", function() log(getMapName()) end },\n        { \"move\", moveToGrass }\n\
          \    }, { stopOnAction = true, logProgress = true, startIndex = nextStep })\n\n    nextStep\
          \ = result.nextIndex or 1\nend"
  /lua/map-and-npc/getplayerx:
    post:
      tags:
      - Map and NPC
      operationId: getPlayerX
      summary: getPlayerX()
      description: "**Lua global function**\n\n```lua\nresult = getPlayerX()\n```\n\nReturns the X-coordinate\
        \ of the current cell.\n\n**Practical scenario**\n\nUse this query in overworld logic to choose\
        \ a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getPlayerX()\n    log(\"getPlayerX: \" .. tostring(result))\nend\n    log(\"\
        getPlayerX: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPlayerX()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPlayerX()\n\
          \    log(\"getPlayerX: \" .. tostring(result))\nend\n    log(\"getPlayerX: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getplayery:
    post:
      tags:
      - Map and NPC
      operationId: getPlayerY
      summary: getPlayerY()
      description: "**Lua global function**\n\n```lua\nresult = getPlayerY()\n```\n\nReturns the Y-coordinate\
        \ of the current cell.\n\n**Practical scenario**\n\nUse this query in overworld logic to choose\
        \ a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getPlayerY()\n    log(\"getPlayerY: \" .. tostring(result))\nend\n    log(\"\
        getPlayerY: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPlayerY()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPlayerY()\n\
          \    log(\"getPlayerY: \" .. tostring(result))\nend\n    log(\"getPlayerY: \" .. tostring(result))\n\
          end"
  /lua/general-state/getaccountname:
    post:
      tags:
      - General state
      operationId: getAccountName
      summary: getAccountName()
      description: "**Lua global function**\n\n```lua\nresult = getAccountName()\n```\n\nReturns current\
        \ account name.\n\n**Practical scenario**\n\nUse this query as a guard before an action that depends\
        \ on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getAccountName()\n    log(\"getAccountName: \" .. tostring(result))\nend\n\
        \    log(\"getAccountName: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getAccountName()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getAccountName()\n\
          \    log(\"getAccountName: \" .. tostring(result))\nend\n    log(\"getAccountName: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getmapname:
    post:
      tags:
      - Map and NPC
      operationId: getMapName
      summary: getMapName()
      description: "**Lua global function**\n\n```lua\nresult = getMapName()\n```\n\nReturns the name\
        \ of the current map.\n\n**Practical scenario**\n\nUse this query in overworld logic to choose\
        \ a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getMapName()\n    log(\"getMapName: \" .. tostring(result))\nend\n    log(\"\
        getMapName: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getMapName()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getMapName()\n\
          \    log(\"getMapName: \" .. tostring(result))\nend\n    log(\"getMapName: \" .. tostring(result))\n\
          end"
  /lua/general-state/getpokedexowned:
    post:
      tags:
      - General state
      operationId: getPokedexOwned
      summary: getPokedexOwned()
      description: "**Lua global function**\n\n```lua\nresult = getPokedexOwned()\n```\n\nReturns Owned\
        \ Entry of the pokedex\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getPokedexOwned()\n    log(\"getPokedexOwned: \" .. tostring(result))\nend\n\
        \    log(\"getPokedexOwned: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokedexOwned()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokedexOwned()\n\
          \    log(\"getPokedexOwned: \" .. tostring(result))\nend\n    log(\"getPokedexOwned: \" .. tostring(result))\n\
          end"
  /lua/general-state/getpokedexseen:
    post:
      tags:
      - General state
      operationId: getPokedexSeen
      summary: getPokedexSeen()
      description: "**Lua global function**\n\n```lua\nresult = getPokedexSeen()\n```\n\nReturns Seen\
        \ Entry of the pokedex\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getPokedexSeen()\n    log(\"getPokedexSeen: \" .. tostring(result))\nend\n\
        \    log(\"getPokedexSeen: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokedexSeen()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokedexSeen()\n\
          \    log(\"getPokedexSeen: \" .. tostring(result))\nend\n    log(\"getPokedexSeen: \" .. tostring(result))\n\
          end"
  /lua/general-state/getpokedexevolved:
    post:
      tags:
      - General state
      operationId: getPokedexEvolved
      summary: getPokedexEvolved()
      description: "**Lua global function**\n\n```lua\nresult = getPokedexEvolved()\n```\n\nReturns Evolved\
        \ Entry of the pokedex\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getPokedexEvolved()\n    log(\"getPokedexEvolved: \" .. tostring(result))\n\
        end\n    log(\"getPokedexEvolved: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokedexEvolved()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokedexEvolved()\n\
          \    log(\"getPokedexEvolved: \" .. tostring(result))\nend\n    log(\"getPokedexEvolved: \"\
          \ .. tostring(result))\nend"
  /lua/general-state/getteamsize:
    post:
      tags:
      - General state
      operationId: getTeamSize
      summary: getTeamSize()
      description: "**Lua global function**\n\n```lua\nresult = getTeamSize()\n```\n\nReturns the amount\
        \ of pokémon in the team.\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getTeamSize()\n    log(\"getTeamSize: \" .. tostring(result))\nend\n    log(\"\
        getTeamSize: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getTeamSize()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getTeamSize()\n\
          \    log(\"getTeamSize: \" .. tostring(result))\nend\n    log(\"getTeamSize: \" .. tostring(result))\n\
          end"
  /lua/general-state/isgamescriptactive:
    post:
      tags:
      - General state
      operationId: isGameScriptActive
      summary: isGameScriptActive()
      description: "**Lua global function**\n\n```lua\nresult = isGameScriptActive()\n```\n\nLua function\
        \ `isGameScriptActive`.\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isGameScriptActive()\n    log(\"isGameScriptActive: \" .. tostring(result))\n\
        end\n    log(\"isGameScriptActive: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isGameScriptActive()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isGameScriptActive()\n\
          \    log(\"isGameScriptActive: \" .. tostring(result))\nend\n    log(\"isGameScriptActive: \"\
          \ .. tostring(result))\nend"
  /lua/general-state/isaccountmember:
    post:
      tags:
      - General state
      operationId: isAccountMember
      summary: isAccountMember()
      description: "**Lua global function**\n\n```lua\nresult = isAccountMember()\n```\n\nReturns current\
        \ account's membership status.\n\n**Practical scenario**\n\nUse this query as a guard before an\
        \ action that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function\
        \ onPathAction()\n    local result = isAccountMember()\n    log(\"isAccountMember: \" .. tostring(result))\n\
        end\n    log(\"isAccountMember: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isAccountMember()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isAccountMember()\n\
          \    log(\"isAccountMember: \" .. tostring(result))\nend\n    log(\"isAccountMember: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getpokemonid:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonId
      summary: getPokemonId()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonId(index)\n```\n\nReturns the\
        \ ID of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query to make\
        \ team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonId(1)\n    log(\"getPokemonId: \" ..\
        \ tostring(result))\nend\n    log(\"getPokemonId: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonId(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonId(1)\n\
          \    log(\"getPokemonId: \" .. tostring(result))\nend\n    log(\"getPokemonId: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getpokemonname:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonName
      summary: getPokemonName()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonName(index)\n```\n\nReturns\
        \ the name of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query to\
        \ make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonName(1)\n    log(\"getPokemonName:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonName: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonName(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonName(1)\n\
          \    log(\"getPokemonName: \" .. tostring(result))\nend\n    log(\"getPokemonName: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getpokemonhealth:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonHealth
      summary: getPokemonHealth()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHealth(index)\n```\n\nReturns\
        \ the current health of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this\
        \ query to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonHealth(1)\n    log(\"getPokemonHealth:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonHealth: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonHealth(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonHealth(1)\n\
          \    log(\"getPokemonHealth: \" .. tostring(result))\nend\n    log(\"getPokemonHealth: \" ..\
          \ tostring(result))\nend"
  /lua/team-pok-mon/getpokemonhealthpercent:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonHealthPercent
      summary: getPokemonHealthPercent()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHealthPercent(index)\n```\n\n\
        Returns the percentage of remaining health of the specified pokémon in the team.\n\n**Practical\
        \ scenario**\n\nUse this query to make team decisions before selecting a path or battle action.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = getPokemonHealthPercent(1)\n\
        \    log(\"getPokemonHealthPercent: \" .. tostring(result))\nend\n    log(\"getPokemonHealthPercent:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonHealthPercent(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonHealthPercent(1)\n\
          \    log(\"getPokemonHealthPercent: \" .. tostring(result))\nend\n    log(\"getPokemonHealthPercent:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmaxhealth:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMaxHealth
      summary: getPokemonMaxHealth()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMaxHealth(index)\n```\n\nReturns\
        \ the maximum health of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this\
        \ query to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonMaxHealth(1)\n    log(\"getPokemonMaxHealth:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonMaxHealth: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMaxHealth(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMaxHealth(1)\n\
          \    log(\"getPokemonMaxHealth: \" .. tostring(result))\nend\n    log(\"getPokemonMaxHealth:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonlevel:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonLevel
      summary: getPokemonLevel()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonLevel(index)\n```\n\nReturns\
        \ the level of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonLevel(1)\n    log(\"getPokemonLevel:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonLevel: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonLevel(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonLevel(1)\n\
          \    log(\"getPokemonLevel: \" .. tostring(result))\nend\n    log(\"getPokemonLevel: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getpokemontotalexperience:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonTotalExperience
      summary: getPokemonTotalExperience()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonTotalExperience(index)\n```\n\
        \nReturns the experience total of a pokemon level.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonTotalExperience(1)\n    log(\"getPokemonTotalExperience:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonTotalExperience: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonTotalExperience(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonTotalExperience(1)\n\
          \    log(\"getPokemonTotalExperience: \" .. tostring(result))\nend\n    log(\"getPokemonTotalExperience:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonremainingexperience:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonRemainingExperience
      summary: getPokemonRemainingExperience()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonRemainingExperience(index)\n\
        ```\n\nReturns the remaining experience of a pokemon before next level.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getPokemonRemainingExperience(1)\n\
        \    log(\"getPokemonRemainingExperience: \" .. tostring(result))\nend\n    log(\"getPokemonRemainingExperience:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonRemainingExperience(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonRemainingExperience(1)\n\
          \    log(\"getPokemonRemainingExperience: \" .. tostring(result))\nend\n    log(\"getPokemonRemainingExperience:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonstatus:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonStatus
      summary: getPokemonStatus()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonStatus(index)\n```\n\nReturns\
        \ the status of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonStatus(1)\n    log(\"getPokemonStatus:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonStatus: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonStatus(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonStatus(1)\n\
          \    log(\"getPokemonStatus: \" .. tostring(result))\nend\n    log(\"getPokemonStatus: \" ..\
          \ tostring(result))\nend"
  /lua/team-pok-mon/getpokemonform:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonForm
      summary: getPokemonForm()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonForm(index)\n```\n\nReturns\
        \ the form of the specified pokémon in the team (0 if no form).\n\n**Practical scenario**\n\n\
        Use this query to make team decisions before selecting a path or battle action.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = getPokemonForm(1)\n    log(\"\
        getPokemonForm: \" .. tostring(result))\nend\n    log(\"getPokemonForm: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonForm(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonForm(1)\n\
          \    log(\"getPokemonForm: \" .. tostring(result))\nend\n    log(\"getPokemonForm: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getpokemonhelditem:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonHeldItem
      summary: getPokemonHeldItem()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHeldItem(index)\n```\n\nReturns\
        \ the item held by the specified pokemon in the team, null if empty.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getPokemonHeldItem(1)\n\
        \    log(\"getPokemonHeldItem: \" .. tostring(result))\nend\n    log(\"getPokemonHeldItem: \"\
        \ .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonHeldItem(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonHeldItem(1)\n\
          \    log(\"getPokemonHeldItem: \" .. tostring(result))\nend\n    log(\"getPokemonHeldItem: \"\
          \ .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonuniqueid:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonUniqueId
      summary: getPokemonUniqueId()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonUniqueId(pokemonUid)\n```\n\n\
        PROCatchem unique ID of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getPokemonUniqueId(1)\n\
        \    log(\"getPokemonUniqueId: \" .. tostring(result))\nend\n    log(\"getPokemonUniqueId: \"\
        \ .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonUid:
                  type: integer
                  description: Stable Pokémon database/unique identifier returned by the corresponding
                    query API.
              required:
              - pokemonUid
            example:
              pokemonUid: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonUniqueId(pokemonUid)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonUniqueId(1)\n\
          \    log(\"getPokemonUniqueId: \" .. tostring(result))\nend\n    log(\"getPokemonUniqueId: \"\
          \ .. tostring(result))\nend"
  /lua/general-state/getremainingpowerpoints:
    post:
      tags:
      - General state
      operationId: getRemainingPowerPoints
      summary: getRemainingPowerPoints()
      description: "**Lua global function**\n\n```lua\nresult = getRemainingPowerPoints(pokemonIndex,\
        \ moveName)\n```\n\nReturns the remaining power points of the specified move of the specified\
        \ pokémon in the team.\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getRemainingPowerPoints(1, \"Tackle\")\n    log(\"getRemainingPowerPoints:\
        \ \" .. tostring(result))\nend\n    log(\"getRemainingPowerPoints: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
                moveName:
                  type: string
                  description: Exact move name as shown by the game.
              required:
              - pokemonIndex
              - moveName
            example:
              pokemonIndex: 1
              moveName: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getRemainingPowerPoints(pokemonIndex, moveName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getRemainingPowerPoints(1,\
          \ \"Tackle\")\n    log(\"getRemainingPowerPoints: \" .. tostring(result))\nend\n    log(\"getRemainingPowerPoints:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmaxpowerpoints:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMaxPowerPoints
      summary: getPokemonMaxPowerPoints()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMaxPowerPoints(index, moveId)\n\
        ```\n\nMax move PP of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getPokemonMaxPowerPoints(1,\
        \ \"Tackle\")\n    log(\"getPokemonMaxPowerPoints: \" .. tostring(result))\nend\n    log(\"getPokemonMaxPowerPoints:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMaxPowerPoints(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMaxPowerPoints(1,\
          \ \"Tackle\")\n    log(\"getPokemonMaxPowerPoints: \" .. tostring(result))\nend\n    log(\"\
          getPokemonMaxPowerPoints: \" .. tostring(result))\nend"
  /lua/team-pok-mon/ispokemonshiny:
    post:
      tags:
      - Team Pokémon
      operationId: isPokemonShiny
      summary: isPokemonShiny()
      description: "**Lua global function**\n\n```lua\nresult = isPokemonShiny(index)\n```\n\nReturns\
        \ the shyniness of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = isPokemonShiny(1)\n    log(\"isPokemonShiny:\
        \ \" .. tostring(result))\nend\n    log(\"isPokemonShiny: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isPokemonShiny(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isPokemonShiny(1)\n\
          \    log(\"isPokemonShiny: \" .. tostring(result))\nend\n    log(\"isPokemonShiny: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getpokemonmovename:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMoveName
      summary: getPokemonMoveName()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveName(index, moveId)\n```\n\
        \nReturns the move of the specified pokémon in the team at the specified index.\n\n**Practical\
        \ scenario**\n\nUse this query to make team decisions before selecting a path or battle action.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveName(1,\
        \ \"Tackle\")\n    log(\"getPokemonMoveName: \" .. tostring(result))\nend\n    log(\"getPokemonMoveName:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonMoveName(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveName(1,\
          \ \"Tackle\")\n    log(\"getPokemonMoveName: \" .. tostring(result))\nend\n    log(\"getPokemonMoveName:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmoveaccuracy:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMoveAccuracy
      summary: getPokemonMoveAccuracy()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveAccuracy(index, moveId)\n\
        ```\n\nReturns the move accuracy of the specified pokémon in the team at the specified index.\n\
        \n**Practical scenario**\n\nUse this query to make team decisions before selecting a path or battle\
        \ action.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result =\
        \ getPokemonMoveAccuracy(1, \"Tackle\")\n    log(\"getPokemonMoveAccuracy: \" .. tostring(result))\n\
        end\n    log(\"getPokemonMoveAccuracy: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMoveAccuracy(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveAccuracy(1,\
          \ \"Tackle\")\n    log(\"getPokemonMoveAccuracy: \" .. tostring(result))\nend\n    log(\"getPokemonMoveAccuracy:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmovepower:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMovePower
      summary: getPokemonMovePower()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMovePower(index, moveId)\n```\n\
        \nReturns the move power of the specified pokémon in the team at the specified index.\n\n**Practical\
        \ scenario**\n\nUse this query to make team decisions before selecting a path or battle action.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = getPokemonMovePower(1,\
        \ \"Tackle\")\n    log(\"getPokemonMovePower: \" .. tostring(result))\nend\n    log(\"getPokemonMovePower:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMovePower(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMovePower(1,\
          \ \"Tackle\")\n    log(\"getPokemonMovePower: \" .. tostring(result))\nend\n    log(\"getPokemonMovePower:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmovetype:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMoveType
      summary: getPokemonMoveType()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveType(index, moveId)\n```\n\
        \nReturns the move type of the specified pokémon in the team at the specified index.\n\n**Practical\
        \ scenario**\n\nUse this query to make team decisions before selecting a path or battle action.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveType(1,\
        \ \"Tackle\")\n    log(\"getPokemonMoveType: \" .. tostring(result))\nend\n    log(\"getPokemonMoveType:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonMoveType(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveType(1,\
          \ \"Tackle\")\n    log(\"getPokemonMoveType: \" .. tostring(result))\nend\n    log(\"getPokemonMoveType:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmovedamagetype:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMoveDamageType
      summary: getPokemonMoveDamageType()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveDamageType(index, moveId)\n\
        ```\n\nReturns the move damage type of the specified pokémon in the team at the specified index.\n\
        \n**Practical scenario**\n\nUse this query to make team decisions before selecting a path or battle\
        \ action.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result =\
        \ getPokemonMoveDamageType(1, \"Tackle\")\n    log(\"getPokemonMoveDamageType: \" .. tostring(result))\n\
        end\n    log(\"getPokemonMoveDamageType: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonMoveDamageType(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveDamageType(1,\
          \ \"Tackle\")\n    log(\"getPokemonMoveDamageType: \" .. tostring(result))\nend\n    log(\"\
          getPokemonMoveDamageType: \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonmovestatus:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonMoveStatus
      summary: getPokemonMoveStatus()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveStatus(index, moveId)\n\
        ```\n\nReturns true if the move of the specified pokémon in the team at the specified index can\
        \ apply a status .\n\n**Practical scenario**\n\nUse this query to make team decisions before selecting\
        \ a path or battle action.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n \
        \   local result = getPokemonMoveStatus(1, \"Tackle\")\n    log(\"getPokemonMoveStatus: \" ..\
        \ tostring(result))\nend\n    log(\"getPokemonMoveStatus: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - index
              - moveId
            example:
              index: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = getPokemonMoveStatus(index, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonMoveStatus(1,\
          \ \"Tackle\")\n    log(\"getPokemonMoveStatus: \" .. tostring(result))\nend\n    log(\"getPokemonMoveStatus:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonnature:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonNature
      summary: getPokemonNature()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonNature(index)\n```\n\nNature\
        \ of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonNature(1)\n    log(\"getPokemonNature:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonNature: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonNature(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonNature(1)\n\
          \    log(\"getPokemonNature: \" .. tostring(result))\nend\n    log(\"getPokemonNature: \" ..\
          \ tostring(result))\nend"
  /lua/team-pok-mon/getpokemonability:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonAbility
      summary: getPokemonAbility()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonAbility(index)\n```\n\nAbility\
        \ of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonAbility(1)\n    log(\"getPokemonAbility:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonAbility: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonAbility(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonAbility(1)\n\
          \    log(\"getPokemonAbility: \" .. tostring(result))\nend\n    log(\"getPokemonAbility: \"\
          \ .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonstat:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonStat
      summary: getPokemonStat()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonStat(pokemonIndex, statType)\n\
        ```\n\nReturns the value for the specified stat of the specified pokémon in the team.\n\n**Practical\
        \ scenario**\n\nRead a current team stat by its documented stat key.\n\n```lua\nfunction onPathAction()\n\
        \    local speed = getPokemonStat(1, \"SPE\")\n    log(\"Lead Pokémon Speed: \" .. tostring(speed))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - pokemonIndex
              - statType
            example:
              pokemonIndex: 1
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonStat(pokemonIndex, statType)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    local speed = getPokemonStat(1, \"SPE\")\n    log(\"Lead\
          \ Pokémon Speed: \" .. tostring(speed))\nend"
  /lua/team-pok-mon/getpokemoneffortvalue:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonEffortValue
      summary: getPokemonEffortValue()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonEffortValue(pokemonIndex, statType)\n\
        ```\n\nReturns the effort value for the specified stat of the specified pokémon in the team.\n\
        \n**Practical scenario**\n\nInspect a team Pokémon EV before deciding whether to keep training\
        \ that stat.\n\n```lua\nfunction onPathAction()\n    local attackEV = getPokemonEffortValue(1,\
        \ \"ATK\")\n    if attackEV >= 252 then\n        log(\"Attack EV training is complete.\")\n  \
        \  end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - pokemonIndex
              - statType
            example:
              pokemonIndex: 1
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonEffortValue(pokemonIndex, statType)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    local attackEV = getPokemonEffortValue(1, \"ATK\")\n   \
          \ if attackEV >= 252 then\n        log(\"Attack EV training is complete.\")\n    end\nend"
  /lua/team-pok-mon/getpokemonindividualvalue:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonIndividualValue
      summary: getPokemonIndividualValue()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonIndividualValue(pokemonIndex,\
        \ statType)\n```\n\nReturns the individual value for the specified stat of the specified pokémon\
        \ in the team.\n\n**Practical scenario**\n\nInspect a team Pokémon IV when filtering catches or\
        \ selecting a lead.\n\n```lua\nfunction onPathAction()\n    local speedIV = getPokemonIndividualValue(1,\
        \ \"SPE\")\n    log(\"Lead Pokémon Speed IV: \" .. tostring(speedIV))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - pokemonIndex
              - statType
            example:
              pokemonIndex: 1
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonIndividualValue(pokemonIndex, statType)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    local speedIV = getPokemonIndividualValue(1, \"SPE\")\n\
          \    log(\"Lead Pokémon Speed IV: \" .. tostring(speedIV))\nend"
  /lua/team-pok-mon/getpokemonhappiness:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonHappiness
      summary: getPokemonHappiness()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHappiness(index)\n```\n\nReturns\
        \ the happiness of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonHappiness(1)\n    log(\"getPokemonHappiness:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonHappiness: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonHappiness(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonHappiness(1)\n\
          \    log(\"getPokemonHappiness: \" .. tostring(result))\nend\n    log(\"getPokemonHappiness:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemonregion:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonRegion
      summary: getPokemonRegion()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonRegion(index)\n```\n\nReturns\
        \ the region of capture of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse\
        \ this query to make team decisions before selecting a path or battle action.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = getPokemonRegion(1)\n    log(\"\
        getPokemonRegion: \" .. tostring(result))\nend\n    log(\"getPokemonRegion: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonRegion(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonRegion(1)\n\
          \    log(\"getPokemonRegion: \" .. tostring(result))\nend\n    log(\"getPokemonRegion: \" ..\
          \ tostring(result))\nend"
  /lua/team-pok-mon/getpokemonoriginaltrainer:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonOriginalTrainer
      summary: getPokemonOriginalTrainer()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonOriginalTrainer(index)\n```\n\
        \nReturns the original trainer of the specified pokémon in the team.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getPokemonOriginalTrainer(1)\n\
        \    log(\"getPokemonOriginalTrainer: \" .. tostring(result))\nend\n    log(\"getPokemonOriginalTrainer:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonOriginalTrainer(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonOriginalTrainer(1)\n\
          \    log(\"getPokemonOriginalTrainer: \" .. tostring(result))\nend\n    log(\"getPokemonOriginalTrainer:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/getpokemongender:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonGender
      summary: getPokemonGender()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonGender(index)\n```\n\nReturns\
        \ the gender of the specified pokémon in the team.\n\n**Practical scenario**\n\nUse this query\
        \ to make team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getPokemonGender(1)\n    log(\"getPokemonGender:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonGender: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonGender(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonGender(1)\n\
          \    log(\"getPokemonGender: \" .. tostring(result))\nend\n    log(\"getPokemonGender: \" ..\
          \ tostring(result))\nend"
  /lua/team-pok-mon/getpokemontype:
    post:
      tags:
      - Team Pokémon
      operationId: getPokemonType
      summary: getPokemonType()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonType(index)\n```\n\nReturns\
        \ the type of the specified pokémon in the team as an array of length 2.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getPokemonType(1)\n \
        \   log(\"getPokemonType: \" .. tostring(result))\nend\n    log(\"getPokemonType: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example: []
      x-lua-signature: result = getPokemonType(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getPokemonType(1)\n\
          \    log(\"getPokemonType: \" .. tostring(result))\nend\n    log(\"getPokemonType: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getdamagemultiplier:
    post:
      tags:
      - Team Pokémon
      operationId: getDamageMultiplier
      summary: getDamageMultiplier()
      description: "**Lua global function**\n\n```lua\nresult = getDamageMultiplier(attacker, ...)\n```\n\
        \nReturns the multiplier of the damage type between an attacking type and one or two defending\
        \ types.\n\n**Practical scenario**\n\nCompare one attacking type against the opponent's one or\
        \ two defending types.\n\n```lua\nfunction onBattleAction()\n    local opponentTypes = getOpponentType()\n\
        \    local multiplier = getDamageMultiplier(\"ELECTRIC\", opponentTypes)\n\n    if multiplier\
        \ >= 2 then\n        useMove(\"Thunderbolt\")\n    else\n        attack()\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                attacker:
                  type: string
                  description: Value passed to the `attacker` parameter.
                defender:
                  type: array
                  items:
                    description: Any Lua value.
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: object
                    - type: array
                      items: {}
                  description: Value passed to the `defender` parameter.
              required:
              - attacker
              - defender
            example:
              attacker: value
              defender: []
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: number
              example: 1.0
      x-lua-signature: result = getDamageMultiplier(attacker, ...)
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    local opponentTypes = getOpponentType()\n    local multiplier\
          \ = getDamageMultiplier(\"ELECTRIC\", opponentTypes)\n\n    if multiplier >= 2 then\n      \
          \  useMove(\"Thunderbolt\")\n    else\n        attack()\n    end\nend"
  /lua/team-pok-mon/ispokemonusable:
    post:
      tags:
      - Team Pokémon
      operationId: isPokemonUsable
      summary: isPokemonUsable()
      description: "**Lua global function**\n\n```lua\nresult = isPokemonUsable(index)\n```\n\nReturns\
        \ true if the specified pokémon has is alive and has an offensive attack available.\n\n**Practical\
        \ scenario**\n\nUse this query to make team decisions before selecting a path or battle action.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = isPokemonUsable(1)\n\
        \    log(\"isPokemonUsable: \" .. tostring(result))\nend\n    log(\"isPokemonUsable: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isPokemonUsable(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isPokemonUsable(1)\n\
          \    log(\"isPokemonUsable: \" .. tostring(result))\nend\n    log(\"isPokemonUsable: \" .. tostring(result))\n\
          end"
  /lua/team-pok-mon/getusablepokemoncount:
    post:
      tags:
      - Team Pokémon
      operationId: getUsablePokemonCount
      summary: getUsablePokemonCount()
      description: "**Lua global function**\n\n```lua\nresult = getUsablePokemonCount()\n```\n\nReturns\
        \ the amount of usable pokémon in the team.\n\n**Practical scenario**\n\nUse this query to make\
        \ team decisions before selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getUsablePokemonCount()\n    log(\"getUsablePokemonCount:\
        \ \" .. tostring(result))\nend\n    log(\"getUsablePokemonCount: \" .. tostring(result))\nend\n\
        ```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getUsablePokemonCount()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getUsablePokemonCount()\n\
          \    log(\"getUsablePokemonCount: \" .. tostring(result))\nend\n    log(\"getUsablePokemonCount:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/hasmove:
    post:
      tags:
      - Team Pokémon
      operationId: hasMove
      summary: hasMove()
      description: "**Lua global function**\n\n```lua\nresult = hasMove(pokemonIndex, moveName)\n```\n\
        \nReturns true if the specified pokémon has a move with the specified name.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = hasMove(1, \"Tackle\"\
        )\n    log(\"hasMove: \" .. tostring(result))\nend\n    log(\"hasMove: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
                moveName:
                  type: string
                  description: Exact move name as shown by the game.
              required:
              - pokemonIndex
              - moveName
            example:
              pokemonIndex: 1
              moveName: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = hasMove(pokemonIndex, moveName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = hasMove(1, \"\
          Tackle\")\n    log(\"hasMove: \" .. tostring(result))\nend\n    log(\"hasMove: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getactivebattlers:
    post:
      tags:
      - Map and NPC
      operationId: getActiveBattlers
      summary: getActiveBattlers()
      description: "**Lua global function**\n\n```lua\nresult = getActiveBattlers()\n```\n\nAPI return\
        \ an array of all NPCs that can be challenged on the current map. format : {\"npcName\" = {\"\
        x\" = x, \"y\" = y}}\n\n**Practical scenario**\n\nUse this query in overworld logic to choose\
        \ a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getActiveBattlers()\n    log(\"getActiveBattlers: \" .. tostring(result))\n\
        end\n    log(\"getActiveBattlers: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getActiveBattlers()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getActiveBattlers()\n\
          \    log(\"getActiveBattlers: \" .. tostring(result))\nend\n    log(\"getActiveBattlers: \"\
          \ .. tostring(result))\nend"
  /lua/map-and-npc/getactivedigspots:
    post:
      tags:
      - Map and NPC
      operationId: getActiveDigSpots
      summary: getActiveDigSpots()
      description: "**Lua global function**\n\n```lua\nresult = getActiveDigSpots()\n```\n\nAPI return\
        \ an array of all usable Dig Spots on the currrent map. format : {index = {\"x\" = x, \"y\" =\
        \ y}}\n\n**Practical scenario**\n\nUse this query in overworld logic to choose a safe destination\
        \ or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local\
        \ result = getActiveDigSpots()\n    log(\"getActiveDigSpots: \" .. tostring(result))\nend\n  \
        \  log(\"getActiveDigSpots: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getActiveDigSpots()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getActiveDigSpots()\n\
          \    log(\"getActiveDigSpots: \" .. tostring(result))\nend\n    log(\"getActiveDigSpots: \"\
          \ .. tostring(result))\nend"
  /lua/map-and-npc/getactiveheadbutttrees:
    post:
      tags:
      - Map and NPC
      operationId: getActiveHeadbuttTrees
      summary: getActiveHeadbuttTrees()
      description: "**Lua global function**\n\n```lua\nresult = getActiveHeadbuttTrees()\n```\n\nAPI return\
        \ an array of all usable Headbutt trees on the currrent map. format : {index = {\"x\" = x, \"\
        y\" = y}}\n\n**Practical scenario**\n\nUse this query in overworld logic to choose a safe destination\
        \ or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local\
        \ result = getActiveHeadbuttTrees()\n    log(\"getActiveHeadbuttTrees: \" .. tostring(result))\n\
        end\n    log(\"getActiveHeadbuttTrees: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getActiveHeadbuttTrees()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getActiveHeadbuttTrees()\n\
          \    log(\"getActiveHeadbuttTrees: \" .. tostring(result))\nend\n    log(\"getActiveHeadbuttTrees:\
          \ \" .. tostring(result))\nend"
  /lua/map-and-npc/getactiveberrytrees:
    post:
      tags:
      - Map and NPC
      operationId: getActiveBerryTrees
      summary: getActiveBerryTrees()
      description: "**Lua global function**\n\n```lua\nresult = getActiveBerryTrees()\n```\n\nAPI return\
        \ an array of all harvestable berry trees on the currrent map. format : {index = {\"x\" = x, \"\
        y\" = y}}\n\n**Practical scenario**\n\nUse this query in overworld logic to choose a safe destination\
        \ or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local\
        \ result = getActiveBerryTrees()\n    log(\"getActiveBerryTrees: \" .. tostring(result))\nend\n\
        \    log(\"getActiveBerryTrees: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getActiveBerryTrees()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getActiveBerryTrees()\n\
          \    log(\"getActiveBerryTrees: \" .. tostring(result))\nend\n    log(\"getActiveBerryTrees:\
          \ \" .. tostring(result))\nend"
  /lua/map-and-npc/getdiscoverableitems:
    post:
      tags:
      - Map and NPC
      operationId: getDiscoverableItems
      summary: getDiscoverableItems()
      description: "**Lua global function**\n\n```lua\nresult = getDiscoverableItems()\n```\n\nAPI return\
        \ an array of all discoverable items on the currrent map. format : {index = {\"x\" = x, \"y\"\
        \ = y}}\n\n**Practical scenario**\n\nUse this query in overworld logic to choose a safe destination\
        \ or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local\
        \ result = getDiscoverableItems()\n    log(\"getDiscoverableItems: \" .. tostring(result))\nend\n\
        \    log(\"getDiscoverableItems: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getDiscoverableItems()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getDiscoverableItems()\n\
          \    log(\"getDiscoverableItems: \" .. tostring(result))\nend\n    log(\"getDiscoverableItems:\
          \ \" .. tostring(result))\nend"
  /lua/map-and-npc/getdiscoverablepokestops:
    post:
      tags:
      - Map and NPC
      operationId: getDiscoverablePokestops
      summary: getDiscoverablePokestops()
      description: "**Lua global function**\n\n```lua\nresult = getDiscoverablePokestops()\n```\n\nAPI\
        \ return an array of all pokestops on the current map. format : {index = {\"x\" = x, \"y\" = y}}\n\
        \n**Practical scenario**\n\nUse this query in overworld logic to choose a safe destination or\
        \ NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local\
        \ result = getDiscoverablePokestops()\n    log(\"getDiscoverablePokestops: \" .. tostring(result))\n\
        end\n    log(\"getDiscoverablePokestops: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getDiscoverablePokestops()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getDiscoverablePokestops()\n\
          \    log(\"getDiscoverablePokestops: \" .. tostring(result))\nend\n    log(\"getDiscoverablePokestops:\
          \ \" .. tostring(result))\nend"
  /lua/map-and-npc/getdiscoverableabandonedpokemon:
    post:
      tags:
      - Map and NPC
      operationId: getDiscoverableAbandonedPokemon
      summary: getDiscoverableAbandonedPokemon()
      description: "**Lua global function**\n\n```lua\nresult = getDiscoverableAbandonedPokemon()\n```\n\
        \nAPI return an array of all Abandoned Pokemon on the current map. format : {index = {\"x\" =\
        \ x, \"y\" = y}}\n\n**Practical scenario**\n\nUse this query in overworld logic to choose a safe\
        \ destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getDiscoverableAbandonedPokemon()\n    log(\"getDiscoverableAbandonedPokemon:\
        \ \" .. tostring(result))\nend\n    log(\"getDiscoverableAbandonedPokemon: \" .. tostring(result))\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getDiscoverableAbandonedPokemon()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getDiscoverableAbandonedPokemon()\n\
          \    log(\"getDiscoverableAbandonedPokemon: \" .. tostring(result))\nend\n    log(\"getDiscoverableAbandonedPokemon:\
          \ \" .. tostring(result))\nend"
  /lua/map-and-npc/getnpcdata:
    post:
      tags:
      - Map and NPC
      operationId: getNpcData
      summary: getNpcData()
      description: "**Lua global function**\n\n```lua\nresult = getNpcData()\n```\n\nReturns npc data\
        \ on current map, format : { { \"x\" = x , \"y\" = y, \"type\" = type }, {...}, ... }\n\n**Practical\
        \ scenario**\n\nUse this query in overworld logic to choose a safe destination or NPC interaction.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = getNpcData()\n\
        \    log(\"getNpcData: \" .. tostring(result))\nend\n    log(\"getNpcData: \" .. tostring(result))\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    description: Any Lua value.
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: object
                    - type: array
                      items: {}
              example: {}
      x-lua-signature: result = getNpcData()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getNpcData()\n\
          \    log(\"getNpcData: \" .. tostring(result))\nend\n    log(\"getNpcData: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getmaplinks:
    post:
      tags:
      - Map and NPC
      operationId: getMapLinks
      summary: getMapLinks()
      description: "**Lua global function**\n\n```lua\nresult = getMapLinks()\n```\n\nLua function `getMapLinks`.\n\
        \n**Practical scenario**\n\nUse this query in overworld logic to choose a safe destination or\
        \ NPC interaction.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local\
        \ result = getMapLinks()\n    log(\"getMapLinks: \" .. tostring(result))\nend\n    log(\"getMapLinks:\
        \ \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    type: integer
              example: {}
      x-lua-signature: result = getMapLinks()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getMapLinks()\n\
          \    log(\"getMapLinks: \" .. tostring(result))\nend\n    log(\"getMapLinks: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getmapwidth:
    post:
      tags:
      - Map and NPC
      operationId: getMapWidth
      summary: getMapWidth()
      description: "**Lua global function**\n\n```lua\nresult = getMapWidth()\n```\n\nThe number of cells\
        \ on the current map in the x direction.\n\n**Practical scenario**\n\nUse this query in overworld\
        \ logic to choose a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getMapWidth()\n    log(\"getMapWidth: \" .. tostring(result))\n\
        end\n    log(\"getMapWidth: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getMapWidth()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getMapWidth()\n\
          \    log(\"getMapWidth: \" .. tostring(result))\nend\n    log(\"getMapWidth: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getmapheight:
    post:
      tags:
      - Map and NPC
      operationId: getMapHeight
      summary: getMapHeight()
      description: "**Lua global function**\n\n```lua\nresult = getMapHeight()\n```\n\nThe number of cells\
        \ on the current map in the y direction.\n\n**Practical scenario**\n\nUse this query in overworld\
        \ logic to choose a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getMapHeight()\n    log(\"getMapHeight: \" ..\
        \ tostring(result))\nend\n    log(\"getMapHeight: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getMapHeight()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getMapHeight()\n\
          \    log(\"getMapHeight: \" .. tostring(result))\nend\n    log(\"getMapHeight: \" .. tostring(result))\n\
          end"
  /lua/map-and-npc/getcelltype:
    post:
      tags:
      - Map and NPC
      operationId: getCellType
      summary: getCellType()
      description: "**Lua global function**\n\n```lua\nresult = getCellType(x, y)\n```\n\nReturns the\
        \ cell type of the specified cell on the current map.\n\n**Practical scenario**\n\nUse this query\
        \ in overworld logic to choose a safe destination or NPC interaction.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getCellType(10, 15)\n    log(\"getCellType: \"\
        \ .. tostring(result))\nend\n    log(\"getCellType: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                x:
                  type: integer
                  description: Map X coordinate.
                y:
                  type: integer
                  description: Map Y coordinate.
              required:
              - x
              - y
            example:
              x: 10
              y: 15
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getCellType(x, y)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getCellType(10,\
          \ 15)\n    log(\"getCellType: \" .. tostring(result))\nend\n    log(\"getCellType: \" .. tostring(result))\n\
          end"
  /lua/items-and-shop/hasitem:
    post:
      tags:
      - Items and shop
      operationId: hasItem
      summary: hasItem()
      description: "**Lua global function**\n\n```lua\nresult = hasItem(itemName)\n```\n\nReturns true\
        \ if the specified item is in the inventory.\n\n**Practical scenario**\n\nUse this query to guard\
        \ an item or shop action and avoid sending requests that cannot succeed.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = hasItem(\"Potion\")\n    if result then\n   \
        \     log(\"hasItem condition is true\")\n    end\nend\n    if result then\n        log(\"hasItem\
        \ condition is true\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
              required:
              - itemName
            example:
              itemName: Potion
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = hasItem(itemName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = hasItem(\"Potion\"\
          )\n    if result then\n        log(\"hasItem condition is true\")\n    end\nend\n    if result\
          \ then\n        log(\"hasItem condition is true\")\n    end\nend"
  /lua/items-and-shop/getitemquantity:
    post:
      tags:
      - Items and shop
      operationId: getItemQuantity
      summary: getItemQuantity()
      description: "**Lua global function**\n\n```lua\nresult = getItemQuantity(itemName)\n```\n\nReturns\
        \ the quantity of the specified item in the inventory.\n\n**Practical scenario**\n\nUse this query\
        \ to guard an item or shop action and avoid sending requests that cannot succeed.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getItemQuantity(\"Potion\"\
        )\n    if result then\n        log(\"getItemQuantity condition is true\")\n    end\nend\n    if\
        \ result then\n        log(\"getItemQuantity condition is true\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
              required:
              - itemName
            example:
              itemName: Potion
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getItemQuantity(itemName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getItemQuantity(\"\
          Potion\")\n    if result then\n        log(\"getItemQuantity condition is true\")\n    end\n\
          end\n    if result then\n        log(\"getItemQuantity condition is true\")\n    end\nend"
  /lua/items-and-shop/hasitemid:
    post:
      tags:
      - Items and shop
      operationId: hasItemId
      summary: hasItemId()
      description: "**Lua global function**\n\n```lua\nresult = hasItemId(itemid)\n```\n\nReturns true\
        \ if the specified item is in the inventory.\n\n**Practical scenario**\n\nUse this query to guard\
        \ an item or shop action and avoid sending requests that cannot succeed.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = hasItemId(\"Potion\")\n    if result then\n \
        \       log(\"hasItemId condition is true\")\n    end\nend\n    if result then\n        log(\"\
        hasItemId condition is true\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemid:
                  type: integer
                  description: Value passed to the `itemid` parameter.
              required:
              - itemid
            example:
              itemid: Potion
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = hasItemId(itemid)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = hasItemId(\"\
          Potion\")\n    if result then\n        log(\"hasItemId condition is true\")\n    end\nend\n\
          \    if result then\n        log(\"hasItemId condition is true\")\n    end\nend"
  /lua/items-and-shop/getitemquantityid:
    post:
      tags:
      - Items and shop
      operationId: getItemQuantityId
      summary: getItemQuantityId()
      description: "**Lua global function**\n\n```lua\nresult = getItemQuantityId(itemid)\n```\n\nReturns\
        \ the quantity of the specified item in the inventory.\n\n**Practical scenario**\n\nUse this query\
        \ to guard an item or shop action and avoid sending requests that cannot succeed.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = getItemQuantityId(\"\
        Potion\")\n    if result then\n        log(\"getItemQuantityId condition is true\")\n    end\n\
        end\n    if result then\n        log(\"getItemQuantityId condition is true\")\n    end\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemid:
                  type: integer
                  description: Value passed to the `itemid` parameter.
              required:
              - itemid
            example:
              itemid: Potion
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getItemQuantityId(itemid)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getItemQuantityId(\"\
          Potion\")\n    if result then\n        log(\"getItemQuantityId condition is true\")\n    end\n\
          end\n    if result then\n        log(\"getItemQuantityId condition is true\")\n    end\nend"
  /lua/team-pok-mon/haspokemoninteam:
    post:
      tags:
      - Team Pokémon
      operationId: hasPokemonInTeam
      summary: hasPokemonInTeam()
      description: "**Lua global function**\n\n```lua\nresult = hasPokemonInTeam(pokemonName)\n```\n\n\
        Returns true if the specified pokémon is present in the team.\n\n**Practical scenario**\n\nGuard\
        \ routes that require a specific Pokémon in the current team.\n\n```lua\nfunction onPathAction()\n\
        \    if not hasPokemonInTeam(\"Pikachu\") then\n        fatal(\"Put Pikachu in the team before\
        \ starting this route.\")\n        return\n    end\n\n    moveToGrass()\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonName:
                  type: string
                  description: Value passed to the `pokemonName` parameter.
              required:
              - pokemonName
            example:
              pokemonName: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = hasPokemonInTeam(pokemonName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not hasPokemonInTeam(\"Pikachu\") then\n        fatal(\"\
          Put Pikachu in the team before starting this route.\")\n        return\n    end\n\n    moveToGrass()\n\
          end"
  /lua/team-pok-mon/isteamsortedbylevelascending:
    post:
      tags:
      - Team Pokémon
      operationId: isTeamSortedByLevelAscending
      summary: isTeamSortedByLevelAscending()
      description: "**Lua global function**\n\n```lua\nresult = isTeamSortedByLevelAscending()\n```\n\n\
        Returns true if the team is sorted by level in ascending order.\n\n**Practical scenario**\n\n\
        Use this query to make team decisions before selecting a path or battle action.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = isTeamSortedByLevelAscending()\n\
        \    log(\"isTeamSortedByLevelAscending: \" .. tostring(result))\nend\n    log(\"isTeamSortedByLevelAscending:\
        \ \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isTeamSortedByLevelAscending()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isTeamSortedByLevelAscending()\n\
          \    log(\"isTeamSortedByLevelAscending: \" .. tostring(result))\nend\n    log(\"isTeamSortedByLevelAscending:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/isteamsortedbyleveldescending:
    post:
      tags:
      - Team Pokémon
      operationId: isTeamSortedByLevelDescending
      summary: isTeamSortedByLevelDescending()
      description: "**Lua global function**\n\n```lua\nresult = isTeamSortedByLevelDescending()\n```\n\
        \nReturns true if the team is sorted by level in descending order.\n\n**Practical scenario**\n\
        \nUse this query to make team decisions before selecting a path or battle action.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = isTeamSortedByLevelDescending()\n\
        \    log(\"isTeamSortedByLevelDescending: \" .. tostring(result))\nend\n    log(\"isTeamSortedByLevelDescending:\
        \ \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isTeamSortedByLevelDescending()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isTeamSortedByLevelDescending()\n\
          \    log(\"isTeamSortedByLevelDescending: \" .. tostring(result))\nend\n    log(\"isTeamSortedByLevelDescending:\
          \ \" .. tostring(result))\nend"
  /lua/team-pok-mon/isteamrangesortedbylevelascending:
    post:
      tags:
      - Team Pokémon
      operationId: isTeamRangeSortedByLevelAscending
      summary: isTeamRangeSortedByLevelAscending()
      description: "**Lua global function**\n\n```lua\nresult = isTeamRangeSortedByLevelAscending(fromIndex,\
        \ toIndex)\n```\n\nReturns true if the specified part of the team is sorted by level in ascending\
        \ order.\n\n**Practical scenario**\n\nUse this query to make team decisions before selecting a\
        \ path or battle action.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n   \
        \ local result = isTeamRangeSortedByLevelAscending(10, 10)\n    log(\"isTeamRangeSortedByLevelAscending:\
        \ \" .. tostring(result))\nend\n    log(\"isTeamRangeSortedByLevelAscending: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fromIndex:
                  type: integer
                  description: Value passed to the `fromIndex` parameter.
                toIndex:
                  type: integer
                  description: Value passed to the `toIndex` parameter.
              required:
              - fromIndex
              - toIndex
            example:
              fromIndex: 10
              toIndex: 10
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isTeamRangeSortedByLevelAscending(fromIndex, toIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isTeamRangeSortedByLevelAscending(10,\
          \ 10)\n    log(\"isTeamRangeSortedByLevelAscending: \" .. tostring(result))\nend\n    log(\"\
          isTeamRangeSortedByLevelAscending: \" .. tostring(result))\nend"
  /lua/team-pok-mon/isteamrangesortedbyleveldescending:
    post:
      tags:
      - Team Pokémon
      operationId: isTeamRangeSortedByLevelDescending
      summary: isTeamRangeSortedByLevelDescending()
      description: "**Lua global function**\n\n```lua\nresult = isTeamRangeSortedByLevelDescending(fromIndex,\
        \ toIndex)\n```\n\nReturns true if the specified part of the team the team is sorted by level\
        \ in descending order.\n\n**Practical scenario**\n\nUse this query to make team decisions before\
        \ selecting a path or battle action.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isTeamRangeSortedByLevelDescending(10, 10)\n    log(\"isTeamRangeSortedByLevelDescending:\
        \ \" .. tostring(result))\nend\n    log(\"isTeamRangeSortedByLevelDescending: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fromIndex:
                  type: integer
                  description: Value passed to the `fromIndex` parameter.
                toIndex:
                  type: integer
                  description: Value passed to the `toIndex` parameter.
              required:
              - fromIndex
              - toIndex
            example:
              fromIndex: 10
              toIndex: 10
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isTeamRangeSortedByLevelDescending(fromIndex, toIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isTeamRangeSortedByLevelDescending(10,\
          \ 10)\n    log(\"isTeamRangeSortedByLevelDescending: \" .. tostring(result))\nend\n    log(\"\
          isTeamRangeSortedByLevelDescending: \" .. tostring(result))\nend"
  /lua/map-and-npc/isnpcvisible:
    post:
      tags:
      - Map and NPC
      operationId: isNpcVisible
      summary: isNpcVisible()
      description: "**Lua global function**\n\n```lua\nresult = isNpcVisible(npcName)\n```\n\nReturns\
        \ true if there is a visible NPC with the specified name on the map.\n\n**Practical scenario**\n\
        \nUse this query in overworld logic to choose a safe destination or NPC interaction.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = isNpcVisible(\"Nurse\
        \ Joy\")\n    log(\"isNpcVisible: \" .. tostring(result))\nend\n    log(\"isNpcVisible: \" ..\
        \ tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                npcName:
                  type: string
                  description: Exact or documented NPC name.
              required:
              - npcName
            example:
              npcName: Nurse Joy
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isNpcVisible(npcName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isNpcVisible(\"\
          Nurse Joy\")\n    log(\"isNpcVisible: \" .. tostring(result))\nend\n    log(\"isNpcVisible:\
          \ \" .. tostring(result))\nend"
  /lua/map-and-npc/isnpconcell:
    post:
      tags:
      - Map and NPC
      operationId: isNpcOnCell
      summary: isNpcOnCell()
      description: "**Lua global function**\n\n```lua\nresult = isNpcOnCell(cellX, cellY)\n```\n\nReturns\
        \ true if there is a visible NPC the specified coordinates.\n\n**Practical scenario**\n\nUse this\
        \ query in overworld logic to choose a safe destination or NPC interaction.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = isNpcOnCell(10, 15)\n    log(\"\
        isNpcOnCell: \" .. tostring(result))\nend\n    log(\"isNpcOnCell: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cellX:
                  type: integer
                  description: Value passed to the `cellX` parameter.
                cellY:
                  type: integer
                  description: Value passed to the `cellY` parameter.
              required:
              - cellX
              - cellY
            example:
              cellX: 10
              cellY: 15
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isNpcOnCell(cellX, cellY)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isNpcOnCell(10,\
          \ 15)\n    log(\"isNpcOnCell: \" .. tostring(result))\nend\n    log(\"isNpcOnCell: \" .. tostring(result))\n\
          end"
  /lua/general-state/isshopopen:
    post:
      tags:
      - General state
      operationId: isShopOpen
      summary: isShopOpen()
      description: "**Lua global function**\n\n```lua\nresult = isShopOpen()\n```\n\nReturns true if there\
        \ is a shop opened.\n\n**Practical scenario**\n\nUse this query as a guard before an action that\
        \ depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isShopOpen()\n    log(\"isShopOpen: \" .. tostring(result))\nend\n    log(\"\
        isShopOpen: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isShopOpen()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isShopOpen()\n\
          \    log(\"isShopOpen: \" .. tostring(result))\nend\n    log(\"isShopOpen: \" .. tostring(result))\n\
          end"
  /lua/general-state/isrelearningmoves:
    post:
      tags:
      - General state
      operationId: isRelearningMoves
      summary: isRelearningMoves()
      description: "**Lua global function**\n\n```lua\nresult = isRelearningMoves()\n```\n\nReturns true\
        \ if the player is relearning the move of a Pokemon from an NPC.\n\n**Practical scenario**\n\n\
        Use this query as a guard before an action that depends on the current global state.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = isRelearningMoves()\n\
        \    log(\"isRelearningMoves: \" .. tostring(result))\nend\n    log(\"isRelearningMoves: \" ..\
        \ tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isRelearningMoves()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isRelearningMoves()\n\
          \    log(\"isRelearningMoves: \" .. tostring(result))\nend\n    log(\"isRelearningMoves: \"\
          \ .. tostring(result))\nend"
  /lua/general-state/getmoney:
    post:
      tags:
      - General state
      operationId: getMoney
      summary: getMoney()
      description: "**Lua global function**\n\n```lua\nresult = getMoney()\n```\n\nReturns the amount\
        \ of money in the inventory.\n\n**Practical scenario**\n\nUse this query as a guard before an\
        \ action that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function\
        \ onPathAction()\n    local result = getMoney()\n    log(\"getMoney: \" .. tostring(result))\n\
        end\n    log(\"getMoney: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getMoney()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getMoney()\n\
          \    log(\"getMoney: \" .. tostring(result))\nend\n    log(\"getMoney: \" .. tostring(result))\n\
          end"
  /lua/general-state/ismounted:
    post:
      tags:
      - General state
      operationId: isMounted
      summary: isMounted()
      description: "**Lua global function**\n\n```lua\nresult = isMounted()\n```\n\nReturns true if the\
        \ player is riding a mount or the bicycle.\n\n**Practical scenario**\n\nUse this query as a guard\
        \ before an action that depends on the current global state.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = isMounted()\n    log(\"isMounted: \" .. tostring(result))\n\
        end\n    log(\"isMounted: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isMounted()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isMounted()\n\
          \    log(\"isMounted: \" .. tostring(result))\nend\n    log(\"isMounted: \" .. tostring(result))\n\
          end"
  /lua/general-state/issurfing:
    post:
      tags:
      - General state
      operationId: isSurfing
      summary: isSurfing()
      description: "**Lua global function**\n\n```lua\nresult = isSurfing()\n```\n\nReturns true if the\
        \ player is surfing\n\n**Practical scenario**\n\nUse this query as a guard before an action that\
        \ depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isSurfing()\n    log(\"isSurfing: \" .. tostring(result))\nend\n    log(\"\
        isSurfing: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isSurfing()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isSurfing()\n\
          \    log(\"isSurfing: \" .. tostring(result))\nend\n    log(\"isSurfing: \" .. tostring(result))\n\
          end"
  /lua/general-state/isprivatemessageenabled:
    post:
      tags:
      - General state
      operationId: isPrivateMessageEnabled
      summary: isPrivateMessageEnabled()
      description: "**Lua global function**\n\n```lua\nresult = isPrivateMessageEnabled()\n```\n\nCheck\
        \ if the private message from normal users are blocked.\n\n**Practical scenario**\n\nUse this\
        \ query as a guard before an action that depends on the current global state.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = isPrivateMessageEnabled()\n\
        \    log(\"isPrivateMessageEnabled: \" .. tostring(result))\nend\n    log(\"isPrivateMessageEnabled:\
        \ \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isPrivateMessageEnabled()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isPrivateMessageEnabled()\n\
          \    log(\"isPrivateMessageEnabled: \" .. tostring(result))\nend\n    log(\"isPrivateMessageEnabled:\
          \ \" .. tostring(result))\nend"
  /lua/general-state/ispartyinspectionenabled:
    post:
      tags:
      - General state
      operationId: isPartyInspectionEnabled
      summary: isPartyInspectionEnabled()
      description: "**Lua global function**\n\n```lua\nresult = isPartyInspectionEnabled()\n```\n\nCheck\
        \ if party inspections are turned on.\n\n**Practical scenario**\n\nUse this query as a guard before\
        \ an action that depends on the current global state.\n\n```lua\nfunction onPathAction()\n   \
        \ function onPathAction()\n    local result = isPartyInspectionEnabled()\n    log(\"isPartyInspectionEnabled:\
        \ \" .. tostring(result))\nend\n    log(\"isPartyInspectionEnabled: \" .. tostring(result))\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isPartyInspectionEnabled()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isPartyInspectionEnabled()\n\
          \    log(\"isPartyInspectionEnabled: \" .. tostring(result))\nend\n    log(\"isPartyInspectionEnabled:\
          \ \" .. tostring(result))\nend"
  /lua/general-state/isnpcinteractionsenabled:
    post:
      tags:
      - General state
      operationId: isNpcInteractionsEnabled
      summary: isNpcInteractionsEnabled()
      description: "**Lua global function**\n\n```lua\nresult = isNpcInteractionsEnabled()\n```\n\nReturns\
        \ true if the bot is checking for npc interactions.\n\n**Practical scenario**\n\nUse this query\
        \ as a guard before an action that depends on the current global state.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = isNpcInteractionsEnabled()\n    log(\"isNpcInteractionsEnabled:\
        \ \" .. tostring(result))\nend\n    log(\"isNpcInteractionsEnabled: \" .. tostring(result))\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isNpcInteractionsEnabled()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isNpcInteractionsEnabled()\n\
          \    log(\"isNpcInteractionsEnabled: \" .. tostring(result))\nend\n    log(\"isNpcInteractionsEnabled:\
          \ \" .. tostring(result))\nend"
  /lua/general-state/gettime:
    post:
      tags:
      - General state
      operationId: getTime
      summary: getTime()
      description: "**Lua global function**\n\n```lua\nhour, minute = getTime()\n```\n\nReturn the current\
        \ in game hour and minute.\n\n**Practical scenario**\n\nRead both return values when a route should\
        \ run only during a specific in-game time window.\n\n```lua\nfunction onPathAction()\n    local\
        \ hour, minute = getTime()\n\n    if hour >= 20 or hour < 5 then\n        log(string.format(\"\
        Night route active at %02d:%02d\", hour, minute))\n        moveToGrass()\n        return\n   \
        \ end\nend\n```"
      responses:
        '200':
          description: Lua return values.
          content:
            application/json:
              schema:
                type: object
                properties:
                  hour:
                    type: integer
                  minute:
                    type: integer
                required:
                - hour
                - minute
              example:
                hour: 12
                minute: 34
      x-lua-signature: hour, minute = getTime()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    local hour, minute = getTime()\n\n    if hour >= 20 or hour\
          \ < 5 then\n        log(string.format(\"Night route active at %02d:%02d\", hour, minute))\n\
          \        moveToGrass()\n        return\n    end\nend"
  /lua/general-state/ismorning:
    post:
      tags:
      - General state
      operationId: isMorning
      summary: isMorning()
      description: "**Lua global function**\n\n```lua\nresult = isMorning()\n```\n\nReturn true if morning\
        \ time.\n\n**Practical scenario**\n\nUse this query as a guard before an action that depends on\
        \ the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isMorning()\n    log(\"isMorning: \" .. tostring(result))\nend\n    log(\"\
        isMorning: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isMorning()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isMorning()\n\
          \    log(\"isMorning: \" .. tostring(result))\nend\n    log(\"isMorning: \" .. tostring(result))\n\
          end"
  /lua/general-state/isnoon:
    post:
      tags:
      - General state
      operationId: isNoon
      summary: isNoon()
      description: "**Lua global function**\n\n```lua\nresult = isNoon()\n```\n\nReturn true if noon time.\n\
        \n**Practical scenario**\n\nUse this query as a guard before an action that depends on the current\
        \ global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result\
        \ = isNoon()\n    log(\"isNoon: \" .. tostring(result))\nend\n    log(\"isNoon: \" .. tostring(result))\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isNoon()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isNoon()\n \
          \   log(\"isNoon: \" .. tostring(result))\nend\n    log(\"isNoon: \" .. tostring(result))\n\
          end"
  /lua/general-state/isnight:
    post:
      tags:
      - General state
      operationId: isNight
      summary: isNight()
      description: "**Lua global function**\n\n```lua\nresult = isNight()\n```\n\nReturn true if night\
        \ time.\n\n**Practical scenario**\n\nUse this query as a guard before an action that depends on\
        \ the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isNight()\n    log(\"isNight: \" .. tostring(result))\nend\n    log(\"isNight:\
        \ \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isNight()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isNight()\n\
          \    log(\"isNight: \" .. tostring(result))\nend\n    log(\"isNight: \" .. tostring(result))\n\
          end"
  /lua/general-state/isoutside:
    post:
      tags:
      - General state
      operationId: isOutside
      summary: isOutside()
      description: "**Lua global function**\n\n```lua\nresult = isOutside()\n```\n\nReturn true if the\
        \ character is outside.\n\n**Practical scenario**\n\nUse this query as a guard before an action\
        \ that depends on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isOutside()\n    log(\"isOutside: \" .. tostring(result))\nend\n    log(\"\
        isOutside: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isOutside()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isOutside()\n\
          \    log(\"isOutside: \" .. tostring(result))\nend\n    log(\"isOutside: \" .. tostring(result))\n\
          end"
  /lua/general-state/isautoevolve:
    post:
      tags:
      - General state
      operationId: isAutoEvolve
      summary: isAutoEvolve()
      description: "**Lua global function**\n\n```lua\nresult = isAutoEvolve()\n```\n\nReturn the state\
        \ Auto Evolve\n\n**Practical scenario**\n\nUse this query as a guard before an action that depends\
        \ on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = isAutoEvolve()\n    log(\"isAutoEvolve: \" .. tostring(result))\nend\n   \
        \ log(\"isAutoEvolve: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isAutoEvolve()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isAutoEvolve()\n\
          \    log(\"isAutoEvolve: \" .. tostring(result))\nend\n    log(\"isAutoEvolve: \" .. tostring(result))\n\
          end"
  /lua/general-state/setmount:
    post:
      tags:
      - General state
      operationId: setMount
      summary: setMount()
      description: "**Lua global function**\n\n```lua\nresult = setMount(mount)\n```\n\nConfigure the\
        \ ground mount or bike item that the bot should use while moving on outside ground maps. Pass\
        \ the exact item name, for example `Arcanine Mount` or `Blue Bicycle`. Pass an empty string to\
        \ clear the configured ground mount. The function only configures the item; the tool uses it automatically\
        \ before movement when appropriate.\n\n**Practical scenario**\n\nConfigure this state deliberately\
        \ and verify the related query before issuing further movement.\n\n```lua\nfunction onStart()\n\
        \    function onStart()\n    local result = setMount(\"Arcanine Mount\")\n    log(\"Configured\
        \ setMount.\")\nend\n    log(\"Configured setMount.\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mount:
                  type: string
                  description: Exact mount or bicycle item name; an empty string clears the configuration.
              required:
              - mount
            example:
              mount: Arcanine Mount
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = setMount(mount)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    local result = setMount(\"Arcanine Mount\"\
          )\n    log(\"Configured setMount.\")\nend\n    log(\"Configured setMount.\")\nend"
  /lua/general-state/dismount:
    post:
      tags:
      - General state
      operationId: disMount
      summary: disMount()
      description: "**Lua global function**\n\n```lua\nresult = disMount()\n```\n\nDisables automatic\
        \ ground mounting and dismounts the currently active ground mount by toggling the official mount\
        \ item packet. It affects ground mounts and bicycles only; it does not cancel Surf. The configured\
        \ ground mount is cleared, so call `setMount()` again before expecting automatic ground mounting\
        \ later. Returns `true` when the configured mount was cleared or a dismount packet was sent, otherwise\
        \ `false` when there was nothing to change.\n\n**Practical scenario**\n\nUse this before entering\
        \ an area where a ground mount is unwanted. It also clears automatic ground-mount configuration.\n\
        \n```lua\nfunction onPathAction()\n    if isMounted() and not isSurfing() then\n        disMount()\n\
        \        return\n    end\n\n    moveToCell(10, 15)\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = disMount()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if isMounted() and not isSurfing() then\n        disMount()\n\
          \        return\n    end\n\n    moveToCell(10, 15)\nend"
  /lua/general-state/setwatermount:
    post:
      tags:
      - General state
      operationId: setWaterMount
      summary: setWaterMount()
      description: "**Lua global function**\n\n```lua\nresult = setWaterMount(mount)\n```\n\nConfigure\
        \ an optional water mount item that should be used when the bot needs to start surfing. Call this\
        \ before a path that may enter water. Most scripts can leave it unset; without a water mount,\
        \ `useSurf()` and pathfinding use the normal `/surf` flow. Pass an empty string to clear the configured\
        \ water mount.\n\n**Practical scenario**\n\nConfigure this state deliberately and verify the related\
        \ query before issuing further movement.\n\n```lua\nfunction onStart()\n    function onStart()\n\
        \    local result = setWaterMount(\"Lapras Mount\")\n    log(\"Configured setWaterMount.\")\n\
        end\n    log(\"Configured setWaterMount.\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mount:
                  type: string
                  description: Exact mount or bicycle item name; an empty string clears the configuration.
              required:
              - mount
            example:
              mount: Lapras Mount
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = setWaterMount(mount)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    local result = setWaterMount(\"Lapras\
          \ Mount\")\n    log(\"Configured setWaterMount.\")\nend\n    log(\"Configured setWaterMount.\"\
          )\nend"
  /lua/general-state/iscurrentpcboxrefreshed:
    post:
      tags:
      - General state
      operationId: isCurrentPCBoxRefreshed
      summary: isCurrentPCBoxRefreshed()
      description: "**Lua global function**\n\n```lua\nresult = isCurrentPCBoxRefreshed()\n```\n\nReturns\
        \ true when the latest requested PC box action has completed or there is no pending PC box refresh.\
        \ Use this after `usePC()`, `openPCBox()`, or `refreshPCBox()` before reading PC Pokémon data.\n\
        \n**Practical scenario**\n\nUse this query as a guard before an action that depends on the current\
        \ global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result\
        \ = isCurrentPCBoxRefreshed()\n    log(\"isCurrentPCBoxRefreshed: \" .. tostring(result))\nend\n\
        \    log(\"isCurrentPCBoxRefreshed: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isCurrentPCBoxRefreshed()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = isCurrentPCBoxRefreshed()\n\
          \    log(\"isCurrentPCBoxRefreshed: \" .. tostring(result))\nend\n    log(\"isCurrentPCBoxRefreshed:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getcurrentpcboxid:
    post:
      tags:
      - PC storage
      operationId: getCurrentPCBoxId
      summary: getCurrentPCBoxId()
      description: "**Lua global function**\n\n```lua\nresult = getCurrentPCBoxId()\n```\n\nGet the active\
        \ PC Box.\n\n**Practical scenario**\n\nRead this value only after the PC is open and the selected\
        \ box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getCurrentPCBoxId()\n    log(\"getCurrentPCBoxId:\
        \ \" .. tostring(result))\nend\n    log(\"getCurrentPCBoxId: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getCurrentPCBoxId()
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getCurrentPCBoxId()\n    log(\"getCurrentPCBoxId:\
          \ \" .. tostring(result))\nend\n    log(\"getCurrentPCBoxId: \" .. tostring(result))\nend"
  /lua/pc-storage/ispcopen:
    post:
      tags:
      - PC storage
      operationId: isPCOpen
      summary: isPCOpen()
      description: "**Lua global function**\n\n```lua\nresult = isPCOpen()\n```\n\nCheck if the PC is\
        \ open. Moving close the PC, usePC() opens it.\n\n**Practical scenario**\n\nRead this value only\
        \ after the PC is open and the selected box is refreshed.\n\n```lua\nfunction inspectPC()\n  \
        \  if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    function\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    local result = isPCOpen()\n    log(\"isPCOpen: \" .. tostring(result))\nend\n \
        \   log(\"isPCOpen: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isPCOpen()
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = isPCOpen()\n    log(\"isPCOpen: \" ..\
          \ tostring(result))\nend\n    log(\"isPCOpen: \" .. tostring(result))\nend"
  /lua/pc-storage/getcurrentpcboxsize:
    post:
      tags:
      - PC storage
      operationId: getCurrentPCBoxSize
      summary: getCurrentPCBoxSize()
      description: "**Lua global function**\n\n```lua\nresult = getCurrentPCBoxSize()\n```\n\nReturns\
        \ the number of Pokémon currently cached in the visible PC box. PC boxes can hold up to 30 slots;\
        \ use this as the safe upper bound for one-based `boxPokemonId` indexes after the box is refreshed.\n\
        \n**Practical scenario**\n\nRead this value only after the PC is open and the selected box is\
        \ refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getCurrentPCBoxSize()\n    log(\"getCurrentPCBoxSize:\
        \ \" .. tostring(result))\nend\n    log(\"getCurrentPCBoxSize: \" .. tostring(result))\nend\n\
        ```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getCurrentPCBoxSize()
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getCurrentPCBoxSize()\n    log(\"getCurrentPCBoxSize:\
          \ \" .. tostring(result))\nend\n    log(\"getCurrentPCBoxSize: \" .. tostring(result))\nend"
  /lua/pc-storage/getpcboxcount:
    post:
      tags:
      - PC storage
      operationId: getPCBoxCount
      summary: getPCBoxCount()
      description: "**Lua global function**\n\n```lua\nresult = getPCBoxCount()\n```\n\nReturn the number\
        \ of non-empty boxes in the PC\n\n**Practical scenario**\n\nRead this value only after the PC\
        \ is open and the selected box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen()\
        \ or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    function inspectPC()\n\
        \    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    local\
        \ result = getPCBoxCount()\n    log(\"getPCBoxCount: \" .. tostring(result))\nend\n    log(\"\
        getPCBoxCount: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPCBoxCount()
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPCBoxCount()\n    log(\"getPCBoxCount:\
          \ \" .. tostring(result))\nend\n    log(\"getPCBoxCount: \" .. tostring(result))\nend"
  /lua/pc-storage/getpcpokemoncount:
    post:
      tags:
      - PC storage
      operationId: getPCPokemonCount
      summary: getPCPokemonCount()
      description: "**Lua global function**\n\n```lua\nresult = getPCPokemonCount()\n```\n\nReturns the\
        \ latest known total Pokémon count for the current PC storage view. The value is read from server\
        \ PC metadata when available and should not be inferred from internal slot IDs.\n\n**Practical\
        \ scenario**\n\nRead this value only after the PC is open and the selected box is refreshed.\n\
        \n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPCPokemonCount()\n    log(\"getPCPokemonCount:\
        \ \" .. tostring(result))\nend\n    log(\"getPCPokemonCount: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPCPokemonCount()
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPCPokemonCount()\n    log(\"getPCPokemonCount:\
          \ \" .. tostring(result))\nend\n    log(\"getPCPokemonCount: \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonidfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonIdFromPC
      summary: getPokemonIdFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonIdFromPC(boxId, boxPokemonId)\n\
        ```\n\nPokedex ID of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonIdFromPC(1, 1)\n    log(\"getPokemonIdFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonIdFromPC: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonIdFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonIdFromPC(1, 1)\n    log(\"getPokemonIdFromPC:\
          \ \" .. tostring(result))\nend\n    log(\"getPokemonIdFromPC: \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonnamefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonNameFromPC
      summary: getPokemonNameFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonNameFromPC(boxId, boxPokemonId)\n\
        ```\n\nName of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\nRead\
        \ this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonNameFromPC(1, 1)\n    log(\"getPokemonNameFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonNameFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonNameFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonNameFromPC(1, 1)\n    log(\"\
          getPokemonNameFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonNameFromPC: \" .. tostring(result))\n\
          end"
  /lua/pc-storage/getpokemonhealthfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonHealthFromPC
      summary: getPokemonHealthFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHealthFromPC(boxId, boxPokemonId)\n\
        ```\n\nCurrent HP of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonHealthFromPC(1, 1)\n    log(\"getPokemonHealthFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonHealthFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonHealthFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonHealthFromPC(1, 1)\n    log(\"\
          getPokemonHealthFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonHealthFromPC: \" ..\
          \ tostring(result))\nend"
  /lua/pc-storage/getpokemonhealthpercentfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonHealthPercentFromPC
      summary: getPokemonHealthPercentFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHealthPercentFromPC(boxId, boxPokemonId)\n\
        ```\n\nReturns the percentage of remaining health of the specified pokémon in the team.\n\n**Practical\
        \ scenario**\n\nRead this value only after the PC is open and the selected box is refreshed.\n\
        \n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonHealthPercentFromPC(1, 1)\n  \
        \  log(\"getPokemonHealthPercentFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonHealthPercentFromPC:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonHealthPercentFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonHealthPercentFromPC(1, 1)\n\
          \    log(\"getPokemonHealthPercentFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonHealthPercentFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmaxhealthfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMaxHealthFromPC
      summary: getPokemonMaxHealthFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMaxHealthFromPC(boxId, boxPokemonId)\n\
        ```\n\nMax HP of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\n\
        Read this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonMaxHealthFromPC(1, 1)\n    log(\"getPokemonMaxHealthFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonMaxHealthFromPC: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMaxHealthFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMaxHealthFromPC(1, 1)\n    log(\"\
          getPokemonMaxHealthFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMaxHealthFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonlevelfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonLevelFromPC
      summary: getPokemonLevelFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonLevelFromPC(boxId, boxPokemonId)\n\
        ```\n\nLevel of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\n\
        Read this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonLevelFromPC(1, 1)\n    log(\"getPokemonLevelFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonLevelFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonLevelFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonLevelFromPC(1, 1)\n    log(\"\
          getPokemonLevelFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonLevelFromPC: \" ..\
          \ tostring(result))\nend"
  /lua/pc-storage/getpokemontotalexperiencefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonTotalExperienceFromPC
      summary: getPokemonTotalExperienceFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonTotalExperienceFromPC(boxId,\
        \ boxPokemonId)\n```\n\nTotal of experience cost of a level for the pokemon of the current box\
        \ matching the ID.\n\n**Practical scenario**\n\nRead this value only after the PC is open and\
        \ the selected box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not\
        \ isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    function inspectPC()\n    if\
        \ not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    local result\
        \ = getPokemonTotalExperienceFromPC(1, 1)\n    log(\"getPokemonTotalExperienceFromPC: \" .. tostring(result))\n\
        end\n    log(\"getPokemonTotalExperienceFromPC: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonTotalExperienceFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonTotalExperienceFromPC(1, 1)\n\
          \    log(\"getPokemonTotalExperienceFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonTotalExperienceFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonremainingexperiencefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonRemainingExperienceFromPC
      summary: getPokemonRemainingExperienceFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonRemainingExperienceFromPC(boxId,\
        \ boxPokemonId)\n```\n\nRemaining experience before the next level of the pokemon of the current\
        \ box matching the ID.\n\n**Practical scenario**\n\nRead this value only after the PC is open\
        \ and the selected box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or\
        \ not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    function inspectPC()\n  \
        \  if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    local\
        \ result = getPokemonRemainingExperienceFromPC(1, 1)\n    log(\"getPokemonRemainingExperienceFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonRemainingExperienceFromPC: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonRemainingExperienceFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonRemainingExperienceFromPC(1,\
          \ 1)\n    log(\"getPokemonRemainingExperienceFromPC: \" .. tostring(result))\nend\n    log(\"\
          getPokemonRemainingExperienceFromPC: \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonstatusfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonStatusFromPC
      summary: getPokemonStatusFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonStatusFromPC(boxId, boxPokemonId)\n\
        ```\n\nStatus of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\n\
        Read this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonStatusFromPC(1, 1)\n    log(\"getPokemonStatusFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonStatusFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonStatusFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonStatusFromPC(1, 1)\n    log(\"\
          getPokemonStatusFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonStatusFromPC: \" ..\
          \ tostring(result))\nend"
  /lua/pc-storage/getpokemontypefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonTypeFromPC
      summary: getPokemonTypeFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonTypeFromPC(boxId, boxPokemonId)\n\
        ```\n\nType of the pokemon of the current box matching the ID as an array of length 2.\n\n**Practical\
        \ scenario**\n\nRead this value only after the PC is open and the selected box is refreshed.\n\
        \n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonTypeFromPC(1, 1)\n    log(\"getPokemonTypeFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonTypeFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example: []
      x-lua-signature: result = getPokemonTypeFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonTypeFromPC(1, 1)\n    log(\"\
          getPokemonTypeFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonTypeFromPC: \" .. tostring(result))\n\
          end"
  /lua/pc-storage/getpokemonhelditemfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonHeldItemFromPC
      summary: getPokemonHeldItemFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHeldItemFromPC(boxId, boxPokemonId)\n\
        ```\n\nReturns the item held by the specified pokemon in the PC, null if empty.\n\n**Practical\
        \ scenario**\n\nRead this value only after the PC is open and the selected box is refreshed.\n\
        \n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonHeldItemFromPC(1, 1)\n    log(\"\
        getPokemonHeldItemFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonHeldItemFromPC: \"\
        \ .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonHeldItemFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonHeldItemFromPC(1, 1)\n    log(\"\
          getPokemonHeldItemFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonHeldItemFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonuniqueidfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonUniqueIdFromPC
      summary: getPokemonUniqueIdFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonUniqueIdFromPC(boxId, boxPokemonId)\n\
        ```\n\nPROCatchem custom unique ID of the pokemon of the current box matching the ID.\n\n**Practical\
        \ scenario**\n\nRead this value only after the PC is open and the selected box is refreshed.\n\
        \n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonUniqueIdFromPC(1, 1)\n    log(\"\
        getPokemonUniqueIdFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonUniqueIdFromPC: \"\
        \ .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonUniqueIdFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonUniqueIdFromPC(1, 1)\n    log(\"\
          getPokemonUniqueIdFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonUniqueIdFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonremainingpowerpointsfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonRemainingPowerPointsFromPC
      summary: getPokemonRemainingPowerPointsFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonRemainingPowerPointsFromPC(boxId,\
        \ boxPokemonId, moveId)\n```\n\nCurrent move PP of the pokemon of the current box matching the\
        \ ID.\n\n**Practical scenario**\n\nRead this value only after the PC is open and the selected\
        \ box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonRemainingPowerPointsFromPC(1,\
        \ 1, \"Tackle\")\n    log(\"getPokemonRemainingPowerPointsFromPC: \" .. tostring(result))\nend\n\
        \    log(\"getPokemonRemainingPowerPointsFromPC: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonRemainingPowerPointsFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonRemainingPowerPointsFromPC(1,\
          \ 1, \"Tackle\")\n    log(\"getPokemonRemainingPowerPointsFromPC: \" .. tostring(result))\n\
          end\n    log(\"getPokemonRemainingPowerPointsFromPC: \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmaxpowerpointsfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMaxPowerPointsFromPC
      summary: getPokemonMaxPowerPointsFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMaxPowerPointsFromPC(boxId,\
        \ boxPokemonId, moveId)\n```\n\nMax move PP of the pokemon of the current box matching the ID.\n\
        \n**Practical scenario**\n\nRead this value only after the PC is open and the selected box is\
        \ refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonMaxPowerPointsFromPC(1, 1, \"\
        Tackle\")\n    log(\"getPokemonMaxPowerPointsFromPC: \" .. tostring(result))\nend\n    log(\"\
        getPokemonMaxPowerPointsFromPC: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMaxPowerPointsFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMaxPowerPointsFromPC(1, 1, \"\
          Tackle\")\n    log(\"getPokemonMaxPowerPointsFromPC: \" .. tostring(result))\nend\n    log(\"\
          getPokemonMaxPowerPointsFromPC: \" .. tostring(result))\nend"
  /lua/pc-storage/ispokemonfrompcshiny:
    post:
      tags:
      - PC storage
      operationId: isPokemonFromPCShiny
      summary: isPokemonFromPCShiny()
      description: "**Lua global function**\n\n```lua\nresult = isPokemonFromPCShiny(boxId, boxPokemonId)\n\
        ```\n\nShyniness of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = isPokemonFromPCShiny(1, 1)\n    log(\"isPokemonFromPCShiny:\
        \ \" .. tostring(result))\nend\n    log(\"isPokemonFromPCShiny: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isPokemonFromPCShiny(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = isPokemonFromPCShiny(1, 1)\n    log(\"\
          isPokemonFromPCShiny: \" .. tostring(result))\nend\n    log(\"isPokemonFromPCShiny: \" .. tostring(result))\n\
          end"
  /lua/pc-storage/getpokemonmovenamefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMoveNameFromPC
      summary: getPokemonMoveNameFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveNameFromPC(boxId, boxPokemonId,\
        \ moveId)\n```\n\nMove of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonMoveNameFromPC(1, 1, \"Tackle\")\n  \
        \  log(\"getPokemonMoveNameFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMoveNameFromPC:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonMoveNameFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMoveNameFromPC(1, 1, \"Tackle\"\
          )\n    log(\"getPokemonMoveNameFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMoveNameFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmoveaccuracyfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMoveAccuracyFromPC
      summary: getPokemonMoveAccuracyFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveAccuracyFromPC(boxId, boxPokemonId,\
        \ moveId)\n```\n\nReturns the move accuracy of the specified pokémon in the box at the specified\
        \ index.\n\n**Practical scenario**\n\nRead this value only after the PC is open and the selected\
        \ box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonMoveAccuracyFromPC(1, 1, \"Tackle\"\
        )\n    log(\"getPokemonMoveAccuracyFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMoveAccuracyFromPC:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMoveAccuracyFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMoveAccuracyFromPC(1, 1, \"\
          Tackle\")\n    log(\"getPokemonMoveAccuracyFromPC: \" .. tostring(result))\nend\n    log(\"\
          getPokemonMoveAccuracyFromPC: \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmovepowerfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMovePowerFromPC
      summary: getPokemonMovePowerFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMovePowerFromPC(boxId, boxPokemonId,\
        \ moveId)\n```\n\nReturns the move power of the specified pokémon in the box at the specified\
        \ index.\n\n**Practical scenario**\n\nRead this value only after the PC is open and the selected\
        \ box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonMovePowerFromPC(1, 1, \"Tackle\"\
        )\n    log(\"getPokemonMovePowerFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMovePowerFromPC:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonMovePowerFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMovePowerFromPC(1, 1, \"Tackle\"\
          )\n    log(\"getPokemonMovePowerFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMovePowerFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmovetypefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMoveTypeFromPC
      summary: getPokemonMoveTypeFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveTypeFromPC(boxId, boxPokemonId,\
        \ moveId)\n```\n\nReturns the move type of the specified pokémon in the box at the specified index.\n\
        \n**Practical scenario**\n\nRead this value only after the PC is open and the selected box is\
        \ refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonMoveTypeFromPC(1, 1, \"Tackle\"\
        )\n    log(\"getPokemonMoveTypeFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMoveTypeFromPC:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonMoveTypeFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMoveTypeFromPC(1, 1, \"Tackle\"\
          )\n    log(\"getPokemonMoveTypeFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMoveTypeFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmovedamagetypefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMoveDamageTypeFromPC
      summary: getPokemonMoveDamageTypeFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveDamageTypeFromPC(boxId,\
        \ boxPokemonId, moveId)\n```\n\nReturns the move damage type of the specified pokémon in the box\
        \ at the specified index.\n\n**Practical scenario**\n\nRead this value only after the PC is open\
        \ and the selected box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or\
        \ not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    function inspectPC()\n  \
        \  if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    local\
        \ result = getPokemonMoveDamageTypeFromPC(1, 1, \"Tackle\")\n    log(\"getPokemonMoveDamageTypeFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonMoveDamageTypeFromPC: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonMoveDamageTypeFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMoveDamageTypeFromPC(1, 1, \"\
          Tackle\")\n    log(\"getPokemonMoveDamageTypeFromPC: \" .. tostring(result))\nend\n    log(\"\
          getPokemonMoveDamageTypeFromPC: \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonmovestatusfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonMoveStatusFromPC
      summary: getPokemonMoveStatusFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonMoveStatusFromPC(boxId, boxPokemonId,\
        \ moveId)\n```\n\nReturns true if the move of the specified pokémon in the box at the specified\
        \ index can apply a status .\n\n**Practical scenario**\n\nRead this value only after the PC is\
        \ open and the selected box is refreshed.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen()\
        \ or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    function inspectPC()\n\
        \    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n    end\n\n    local\
        \ result = getPokemonMoveStatusFromPC(1, 1, \"Tackle\")\n    log(\"getPokemonMoveStatusFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonMoveStatusFromPC: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                moveId:
                  type: integer
                  description: Value passed to the `moveId` parameter.
              required:
              - boxId
              - boxPokemonId
              - moveId
            example:
              boxId: 1
              boxPokemonId: 1
              moveId: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = getPokemonMoveStatusFromPC(boxId, boxPokemonId, moveId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonMoveStatusFromPC(1, 1, \"Tackle\"\
          )\n    log(\"getPokemonMoveStatusFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonMoveStatusFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonnaturefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonNatureFromPC
      summary: getPokemonNatureFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonNatureFromPC(boxId, boxPokemonId)\n\
        ```\n\nNature of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\n\
        Read this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonNatureFromPC(1, 1)\n    log(\"getPokemonNatureFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonNatureFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonNatureFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonNatureFromPC(1, 1)\n    log(\"\
          getPokemonNatureFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonNatureFromPC: \" ..\
          \ tostring(result))\nend"
  /lua/pc-storage/getpokemonabilityfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonAbilityFromPC
      summary: getPokemonAbilityFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonAbilityFromPC(boxId, boxPokemonId)\n\
        ```\n\nAbility of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\n\
        Read this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonAbilityFromPC(1, 1)\n    log(\"getPokemonAbilityFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonAbilityFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonAbilityFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonAbilityFromPC(1, 1)\n    log(\"\
          getPokemonAbilityFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonAbilityFromPC: \"\
          \ .. tostring(result))\nend"
  /lua/pc-storage/getpokemonstatfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonStatFromPC
      summary: getPokemonStatFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonStatFromPC(boxId, boxPokemonId,\
        \ statType)\n```\n\nReturns the value for the specified stat of the specified pokémon in the PC.\n\
        \n**Practical scenario**\n\nOpen and refresh the PC before reading a stored Pokémon stat.\n\n\
        ```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n  \
        \      return\n    end\n\n    local speed = getPokemonStatFromPC(1, 1, \"SPE\")\n    log(\"Box\
        \ 1 slot 1 Speed: \" .. tostring(speed))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - boxId
              - boxPokemonId
              - statType
            example:
              boxId: 1
              boxPokemonId: 1
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonStatFromPC(boxId, boxPokemonId, statType)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    local speed = getPokemonStatFromPC(1, 1, \"SPE\")\n    log(\"\
          Box 1 slot 1 Speed: \" .. tostring(speed))\nend"
  /lua/pc-storage/getpokemoneffortvaluefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonEffortValueFromPC
      summary: getPokemonEffortValueFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonEffortValueFromPC(boxId, boxPokemonId,\
        \ statType)\n```\n\nReturns the effort value for the specified stat of the specified pokémon in\
        \ the PC.\n\n**Practical scenario**\n\nRead EVs from a refreshed PC entry before selecting a Pokémon\
        \ to withdraw.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local attackEV = getPokemonEffortValueFromPC(1, 1, \"ATK\"\
        )\n    log(\"Stored Pokémon Attack EV: \" .. tostring(attackEV))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - boxId
              - boxPokemonId
              - statType
            example:
              boxId: 1
              boxPokemonId: 1
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonEffortValueFromPC(boxId, boxPokemonId, statType)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    local attackEV = getPokemonEffortValueFromPC(1, 1, \"ATK\")\n\
          \    log(\"Stored Pokémon Attack EV: \" .. tostring(attackEV))\nend"
  /lua/pc-storage/getpokemonindividualvaluefrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonIndividualValueFromPC
      summary: getPokemonIndividualValueFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonIndividualValueFromPC(boxId,\
        \ boxPokemonId, statType)\n```\n\nReturns the individual value for the specified stat of the specified\
        \ pokémon in the PC.\n\n**Practical scenario**\n\nRead IVs from a refreshed PC entry when filtering\
        \ stored catches.\n\n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local speedIV = getPokemonIndividualValueFromPC(1, 1, \"\
        SPE\")\n    log(\"Stored Pokémon Speed IV: \" .. tostring(speedIV))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - boxId
              - boxPokemonId
              - statType
            example:
              boxId: 1
              boxPokemonId: 1
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonIndividualValueFromPC(boxId, boxPokemonId, statType)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    local speedIV = getPokemonIndividualValueFromPC(1, 1, \"SPE\"\
          )\n    log(\"Stored Pokémon Speed IV: \" .. tostring(speedIV))\nend"
  /lua/pc-storage/getpokemonhappinessfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonHappinessFromPC
      summary: getPokemonHappinessFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonHappinessFromPC(boxId, boxPokemonId)\n\
        ```\n\nHappiness of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonHappinessFromPC(1, 1)\n    log(\"getPokemonHappinessFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonHappinessFromPC: \" .. tostring(result))\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonHappinessFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonHappinessFromPC(1, 1)\n    log(\"\
          getPokemonHappinessFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonHappinessFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemonregionfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonRegionFromPC
      summary: getPokemonRegionFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonRegionFromPC(boxId, boxPokemonId)\n\
        ```\n\nRegion of capture of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonRegionFromPC(1, 1)\n    log(\"getPokemonRegionFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonRegionFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonRegionFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonRegionFromPC(1, 1)\n    log(\"\
          getPokemonRegionFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonRegionFromPC: \" ..\
          \ tostring(result))\nend"
  /lua/pc-storage/getpokemonoriginaltrainerfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonOriginalTrainerFromPC
      summary: getPokemonOriginalTrainerFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonOriginalTrainerFromPC(boxId,\
        \ boxPokemonId)\n```\n\nOriginal trainer of the pokemon of the current box matching the ID.\n\n\
        **Practical scenario**\n\nRead this value only after the PC is open and the selected box is refreshed.\n\
        \n```lua\nfunction inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
        \ then\n        return\n    end\n\n    local result = getPokemonOriginalTrainerFromPC(1, 1)\n\
        \    log(\"getPokemonOriginalTrainerFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonOriginalTrainerFromPC:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonOriginalTrainerFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonOriginalTrainerFromPC(1, 1)\n\
          \    log(\"getPokemonOriginalTrainerFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonOriginalTrainerFromPC:\
          \ \" .. tostring(result))\nend"
  /lua/pc-storage/getpokemongenderfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonGenderFromPC
      summary: getPokemonGenderFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonGenderFromPC(boxId, boxPokemonId)\n\
        ```\n\nGender of the pokemon of the current box matching the ID.\n\n**Practical scenario**\n\n\
        Read this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonGenderFromPC(1, 1)\n    log(\"getPokemonGenderFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonGenderFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getPokemonGenderFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonGenderFromPC(1, 1)\n    log(\"\
          getPokemonGenderFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonGenderFromPC: \" ..\
          \ tostring(result))\nend"
  /lua/pc-storage/getpokemonformfrompc:
    post:
      tags:
      - PC storage
      operationId: getPokemonFormFromPC
      summary: getPokemonFormFromPC()
      description: "**Lua global function**\n\n```lua\nresult = getPokemonFormFromPC(boxId, boxPokemonId)\n\
        ```\n\nForm of the pokémon in the current box matching the ID. (0 if no form)\n\n**Practical scenario**\n\
        \nRead this value only after the PC is open and the selected box is refreshed.\n\n```lua\nfunction\
        \ inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n        return\n \
        \   end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n\
        \        return\n    end\n\n    local result = getPokemonFormFromPC(1, 1)\n    log(\"getPokemonFormFromPC:\
        \ \" .. tostring(result))\nend\n    log(\"getPokemonFormFromPC: \" .. tostring(result))\nend\n\
        ```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getPokemonFormFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed() then\n \
          \       return\n    end\n\n    function inspectPC()\n    if not isPCOpen() or not isCurrentPCBoxRefreshed()\
          \ then\n        return\n    end\n\n    local result = getPokemonFormFromPC(1, 1)\n    log(\"\
          getPokemonFormFromPC: \" .. tostring(result))\nend\n    log(\"getPokemonFormFromPC: \" .. tostring(result))\n\
          end"
  /lua/general-state/getserver:
    post:
      tags:
      - General state
      operationId: getServer
      summary: getServer()
      description: "**Lua global function**\n\n```lua\nresult = getServer()\n```\n\nReturns the connected\
        \ server\n\n**Practical scenario**\n\nUse this query as a guard before an action that depends\
        \ on the current global state.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n\
        \    local result = getServer()\n    log(\"getServer: \" .. tostring(result))\nend\n    log(\"\
        getServer: \" .. tostring(result))\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getServer()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getServer()\n\
          \    log(\"getServer: \" .. tostring(result))\nend\n    log(\"getServer: \" .. tostring(result))\n\
          end"
  /lua/battle-state/isopponentshiny:
    post:
      tags:
      - Battle state
      operationId: isOpponentShiny
      summary: isOpponentShiny()
      description: "**Lua global function**\n\n```lua\nresult = isOpponentShiny()\n```\n\nReturns true\
        \ if the opponent pokémon is shiny.\n\n**Practical scenario**\n\nCall this only from battle logic.\
        \ It is a query and can be combined with one battle action in the same callback.\n\n```lua\nfunction\
        \ onBattleAction()\n    function onBattleAction()\n    local result = isOpponentShiny()\n    log(\"\
        isOpponentShiny: \" .. tostring(result))\n    attack()\nend\n    log(\"isOpponentShiny: \" ..\
        \ tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isOpponentShiny()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = isOpponentShiny()\n\
          \    log(\"isOpponentShiny: \" .. tostring(result))\n    attack()\nend\n    log(\"isOpponentShiny:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/isalreadycaught:
    post:
      tags:
      - Battle state
      operationId: isAlreadyCaught
      summary: isAlreadyCaught()
      description: "**Lua global function**\n\n```lua\nresult = isAlreadyCaught()\n```\n\nReturns true\
        \ if the opponent pokémon has already been caught and has a pokédex entry.\n\n**Practical scenario**\n\
        \nCall this only from battle logic. It is a query and can be combined with one battle action in\
        \ the same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n   \
        \ local result = isAlreadyCaught()\n    log(\"isAlreadyCaught: \" .. tostring(result))\n    attack()\n\
        end\n    log(\"isAlreadyCaught: \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isAlreadyCaught()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = isAlreadyCaught()\n\
          \    log(\"isAlreadyCaught: \" .. tostring(result))\n    attack()\nend\n    log(\"isAlreadyCaught:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/iswildbattle:
    post:
      tags:
      - Battle state
      operationId: isWildBattle
      summary: isWildBattle()
      description: "**Lua global function**\n\n```lua\nresult = isWildBattle()\n```\n\nReturns true if\
        \ the current battle is against a wild pokémon.\n\n**Practical scenario**\n\nCall this only from\
        \ battle logic. It is a query and can be combined with one battle action in the same callback.\n\
        \n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result = isWildBattle()\n\
        \    log(\"isWildBattle: \" .. tostring(result))\n    attack()\nend\n    log(\"isWildBattle: \"\
        \ .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isWildBattle()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = isWildBattle()\n\
          \    log(\"isWildBattle: \" .. tostring(result))\n    attack()\nend\n    log(\"isWildBattle:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getactivepokemonnumber:
    post:
      tags:
      - Battle state
      operationId: getActivePokemonNumber
      summary: getActivePokemonNumber()
      description: "**Lua global function**\n\n```lua\nresult = getActivePokemonNumber()\n```\n\nReturns\
        \ the index of the active team pokémon in the current battle.\n\n**Practical scenario**\n\nCall\
        \ this only from battle logic. It is a query and can be combined with one battle action in the\
        \ same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local\
        \ result = getActivePokemonNumber()\n    log(\"getActivePokemonNumber: \" .. tostring(result))\n\
        \    attack()\nend\n    log(\"getActivePokemonNumber: \" .. tostring(result))\n    attack()\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getActivePokemonNumber()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getActivePokemonNumber()\n\
          \    log(\"getActivePokemonNumber: \" .. tostring(result))\n    attack()\nend\n    log(\"getActivePokemonNumber:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentid:
    post:
      tags:
      - Battle state
      operationId: getOpponentId
      summary: getOpponentId()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentId()\n```\n\nReturns the id\
        \ of the opponent pokémon in the current battle.\n\n**Practical scenario**\n\nCall this only from\
        \ battle logic. It is a query and can be combined with one battle action in the same callback.\n\
        \n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result = getOpponentId()\n\
        \    log(\"getOpponentId: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentId:\
        \ \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentId()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentId()\n\
          \    log(\"getOpponentId: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentId:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentname:
    post:
      tags:
      - Battle state
      operationId: getOpponentName
      summary: getOpponentName()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentName()\n```\n\nReturns the\
        \ name of the opponent pokémon in the current battle.\n\n**Practical scenario**\n\nCall this only\
        \ from battle logic. It is a query and can be combined with one battle action in the same callback.\n\
        \n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result = getOpponentName()\n\
        \    log(\"getOpponentName: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentName:\
        \ \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getOpponentName()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentName()\n\
          \    log(\"getOpponentName: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentName:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponenthealth:
    post:
      tags:
      - Battle state
      operationId: getOpponentHealth
      summary: getOpponentHealth()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentHealth()\n```\n\nReturns the\
        \ current health of the opponent pokémon in the current battle.\n\n**Practical scenario**\n\n\
        Call this only from battle logic. It is a query and can be combined with one battle action in\
        \ the same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n   \
        \ local result = getOpponentHealth()\n    log(\"getOpponentHealth: \" .. tostring(result))\n \
        \   attack()\nend\n    log(\"getOpponentHealth: \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentHealth()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentHealth()\n\
          \    log(\"getOpponentHealth: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentHealth:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentmaxhealth:
    post:
      tags:
      - Battle state
      operationId: getOpponentMaxHealth
      summary: getOpponentMaxHealth()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentMaxHealth()\n```\n\nReturns\
        \ the maximum health of the opponent pokémon in the current battle.\n\n**Practical scenario**\n\
        \nCall this only from battle logic. It is a query and can be combined with one battle action in\
        \ the same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n   \
        \ local result = getOpponentMaxHealth()\n    log(\"getOpponentMaxHealth: \" .. tostring(result))\n\
        \    attack()\nend\n    log(\"getOpponentMaxHealth: \" .. tostring(result))\n    attack()\nend\n\
        ```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentMaxHealth()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentMaxHealth()\n\
          \    log(\"getOpponentMaxHealth: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentMaxHealth:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponenthealthpercent:
    post:
      tags:
      - Battle state
      operationId: getOpponentHealthPercent
      summary: getOpponentHealthPercent()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentHealthPercent()\n```\n\nReturns\
        \ the percentage of remaining health of the opponent pokémon in the current battle.\n\n**Practical\
        \ scenario**\n\nCall this only from battle logic. It is a query and can be combined with one battle\
        \ action in the same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n\
        \    local result = getOpponentHealthPercent()\n    log(\"getOpponentHealthPercent: \" .. tostring(result))\n\
        \    attack()\nend\n    log(\"getOpponentHealthPercent: \" .. tostring(result))\n    attack()\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentHealthPercent()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentHealthPercent()\n\
          \    log(\"getOpponentHealthPercent: \" .. tostring(result))\n    attack()\nend\n    log(\"\
          getOpponentHealthPercent: \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentlevel:
    post:
      tags:
      - Battle state
      operationId: getOpponentLevel
      summary: getOpponentLevel()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentLevel()\n```\n\nReturns the\
        \ level of the opponent pokémon in the current battle.\n\n**Practical scenario**\n\nCall this\
        \ only from battle logic. It is a query and can be combined with one battle action in the same\
        \ callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result\
        \ = getOpponentLevel()\n    log(\"getOpponentLevel: \" .. tostring(result))\n    attack()\nend\n\
        \    log(\"getOpponentLevel: \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentLevel()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentLevel()\n\
          \    log(\"getOpponentLevel: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentLevel:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentstatus:
    post:
      tags:
      - Battle state
      operationId: getOpponentStatus
      summary: getOpponentStatus()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentStatus()\n```\n\nReturns the\
        \ status of the opponent pokémon in the current battle.\n\n**Practical scenario**\n\nCall this\
        \ only from battle logic. It is a query and can be combined with one battle action in the same\
        \ callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result\
        \ = getOpponentStatus()\n    log(\"getOpponentStatus: \" .. tostring(result))\n    attack()\n\
        end\n    log(\"getOpponentStatus: \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getOpponentStatus()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentStatus()\n\
          \    log(\"getOpponentStatus: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentStatus:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentform:
    post:
      tags:
      - Battle state
      operationId: getOpponentForm
      summary: getOpponentForm()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentForm()\n```\n\nReturns the\
        \ form of the opponent pokémon in the current battle (0 if no form).\n\n**Practical scenario**\n\
        \nCall this only from battle logic. It is a query and can be combined with one battle action in\
        \ the same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n   \
        \ local result = getOpponentForm()\n    log(\"getOpponentForm: \" .. tostring(result))\n    attack()\n\
        end\n    log(\"getOpponentForm: \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentForm()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentForm()\n\
          \    log(\"getOpponentForm: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentForm:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/battle-state/getopponentgender:
    post:
      tags:
      - Battle state
      operationId: getOpponentGender
      summary: getOpponentGender()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentGender()\n```\n\nReturns the\
        \ gender of the current opponent Pokémon. The result is `\"M\"` for male, `\"F\"` for female,\
        \ or an empty string for genderless/unknown. This function is valid only during battle; calling\
        \ it outside battle triggers the same fatal Lua error contract as the other `getOpponent...` helpers.\n\
        \n**Practical scenario**\n\nUse this during battle when behavior depends on gender-specific moves,\
        \ abilities, or encounter rules.\n\n```lua\nfunction onBattleAction()\n    local gender = getOpponentGender()\n\
        \n    if gender == \"M\" then\n        log(\"Male opponent detected.\")\n    elseif gender ==\
        \ \"F\" then\n        log(\"Female opponent detected.\")\n    else\n        log(\"Genderless or\
        \ unknown opponent.\")\n    end\n\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
                enum:
                - M
                - F
                - ''
              example: M
      x-lua-signature: result = getOpponentGender()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    local gender = getOpponentGender()\n\n    if gender ==\
          \ \"M\" then\n        log(\"Male opponent detected.\")\n    elseif gender == \"F\" then\n  \
          \      log(\"Female opponent detected.\")\n    else\n        log(\"Genderless or unknown opponent.\"\
          )\n    end\n\n    attack()\nend"
  /lua/battle-state/getbattleturn:
    post:
      tags:
      - Battle state
      operationId: getBattleTurn
      summary: getBattleTurn()
      description: "**Lua global function**\n\n```lua\nresult = getBattleTurn()\n```\n\nReturns the\
        \ latest battle turn number confirmed by the server through the `BT:n` battle marker. The value\
        \ is monotonic for the current battle: duplicate or out-of-order lower markers do not move the\
        \ turn backwards. `0` means the battle exists but no valid `BT:n` marker has been received yet.\
        \ This function is valid only during battle; calling it outside battle follows the tool's fatal\
        \ Lua error contract.\n\n**Practical scenario**\n\nUse the server-backed turn number when a script\
        \ needs different behavior on the first turn or after several turns. Unlike counting `onBattleAction()`\
        \ calls, this remains aligned with server battle progression when a move continues automatically,\
        \ a forced switch occurs, or one player command spans multiple server turns.\n\n```lua\nfunction\
        \ onBattleAction()\n    local turn = getBattleTurn()\n\n    if turn == 1 then\n        log(\"First\
        \ server-confirmed battle turn.\")\n        useMove(\"Thunder Wave\")\n        return\n    end\n\
        \n    log(\"Current battle turn: \" .. tostring(turn))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
                minimum: 0
              example: 1
      x-lua-signature: result = getBattleTurn()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    local turn = getBattleTurn()\n\n    if turn == 1 then\n\
          \        log(\"First server-confirmed battle turn.\")\n        useMove(\"Thunder Wave\")\n  \
          \      return\n    end\n\n    log(\"Current battle turn: \" .. tostring(turn))\n    attack()\n\
          end"
  /lua/battle-state/isopponenteffortvalue:
    post:
      tags:
      - Battle state
      operationId: isOpponentEffortValue
      summary: isOpponentEffortValue()
      description: "**Lua global function**\n\n```lua\nresult = isOpponentEffortValue(statType)\n```\n\
        \nReturns true if the opponent is only giving the specified effort value.\n\n**Practical scenario**\n\
        \nUse a documented stat key to verify that the opponent gives only the EV you are training.\n\n\
        ```lua\nfunction onBattleAction()\n    if isOpponentEffortValue(\"ATK\") then\n        attack()\n\
        \    else\n        run()\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - statType
            example:
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isOpponentEffortValue(statType)
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    if isOpponentEffortValue(\"ATK\") then\n        attack()\n\
          \    else\n        run()\n    end\nend"
  /lua/battle-state/getopponenteffortvalue:
    post:
      tags:
      - Battle state
      operationId: getOpponentEffortValue
      summary: getOpponentEffortValue()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentEffortValue(statType)\n```\n\
        \nReturns the amount of a particular EV given by the opponent.\n\n**Practical scenario**\n\nRead\
        \ the exact EV yield of the current opponent for one stat.\n\n```lua\nfunction onBattleAction()\n\
        \    local attackYield = getOpponentEffortValue(\"ATK\")\n    log(\"Opponent Attack EV yield:\
        \ \" .. tostring(attackYield))\n    attack()\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                statType:
                  type: string
                  description: Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script.
              required:
              - statType
            example:
              statType: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: integer
              example: 1
      x-lua-signature: result = getOpponentEffortValue(statType)
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    local attackYield = getOpponentEffortValue(\"ATK\")\n\
          \    log(\"Opponent Attack EV yield: \" .. tostring(attackYield))\n    attack()\nend"
  /lua/battle-state/getopponenttype:
    post:
      tags:
      - Battle state
      operationId: getOpponentType
      summary: getOpponentType()
      description: "**Lua global function**\n\n```lua\nresult = getOpponentType()\n```\n\nReturns the\
        \ type of the opponent pokémon in the current battle as an array of length 2.\n\n**Practical scenario**\n\
        \nCall this only from battle logic. It is a query and can be combined with one battle action in\
        \ the same callback.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n   \
        \ local result = getOpponentType()\n    log(\"getOpponentType: \" .. tostring(result))\n    attack()\n\
        end\n    log(\"getOpponentType: \" .. tostring(result))\n    attack()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example: []
      x-lua-signature: result = getOpponentType()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = getOpponentType()\n\
          \    log(\"getOpponentType: \" .. tostring(result))\n    attack()\nend\n    log(\"getOpponentType:\
          \ \" .. tostring(result))\n    attack()\nend"
  /lua/path-actions/movetocell:
    post:
      tags:
      - Path actions
      operationId: moveToCell
      summary: moveToCell()
      description: "**Lua global function**\n\n```lua\nresult = moveToCell(x, y)\n```\n\nMoves to the\
        \ specified coordinates.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return\
        \ immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = moveToCell(10, 15)\n    return\nend\n    return\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                x:
                  type: integer
                  description: Map X coordinate.
                y:
                  type: integer
                  description: Map Y coordinate.
              required:
              - x
              - y
            example:
              x: 10
              y: 15
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToCell(x, y)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = moveToCell(10,\
          \ 15)\n    return\nend\n    return\nend"
  /lua/path-actions/movetolistcell:
    post:
      tags:
      - Path actions
      operationId: moveToListCell
      summary: moveToListCell()
      description: "**Lua global function**\n\n```lua\nresult = moveToListCell(list, \"\")\n```\n\nMoves\
        \ to the specified list coordinates.\n\n**Practical scenario**\n\nProvide comma-separated `x-y`\
        \ cell lists. The optional second list can represent cells to avoid or an alternate set used by\
        \ the path helper.\n\n```lua\nfunction onPathAction()\n    local preferred = \"10-15,11-15,12-15\"\
        \n    local alternate = \"10-16,11-16,12-16\"\n    moveToListCell(preferred, alternate)\n    return\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                list:
                  type: string
                  description: Value passed to the `list` parameter.
                '""':
                  type: string
                  description: Value passed to the `""` parameter.
              required:
              - list
              - '""'
            example:
              list: value
              '""': value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToListCell(list, "")
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    local preferred = \"10-15,11-15,12-15\"\n    local alternate\
          \ = \"10-16,11-16,12-16\"\n    moveToListCell(preferred, alternate)\n    return\nend"
  /lua/path-actions/movetomap:
    post:
      tags:
      - Path actions
      operationId: moveToMap
      summary: moveToMap()
      description: "**Lua global function**\n\n```lua\nresult = moveToMap(mapName)\n```\n\nMoves to the\
        \ nearest cell teleporting to the specified map.\n\n**Practical scenario**\n\nThis legacy function\
        \ is retired. Walk to the destination map link with `moveToCell()` instead.\n\n```lua\nfunction\
        \ onPathAction()\n    -- moveToMap(\"Viridian City\") is retired.\n    -- Walk onto the known\
        \ map-link cell instead.\n    moveToCell(25, 42)\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mapName:
                  type: string
                  description: Value passed to the `mapName` parameter.
              required:
              - mapName
            example:
              mapName: Viridian City
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToMap(mapName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    -- moveToMap(\"Viridian City\") is retired.\n    -- Walk\
          \ onto the known map-link cell instead.\n    moveToCell(25, 42)\n    return\nend"
  /lua/path-actions/movetorectangle:
    post:
      tags:
      - Path actions
      operationId: moveToRectangle
      summary: moveToRectangle()
      description: "**Lua global function**\n\n```lua\nresult = moveToRectangle(...)\n```\n\nMoves to\
        \ a random accessible cell of the specified rectangle.\n\n**Practical scenario**\n\nPass four\
        \ coordinates: minimum X/Y followed by maximum X/Y. The tool chooses a random accessible cell\
        \ inside the rectangle.\n\n```lua\nfunction onPathAction()\n    moveToRectangle(10, 15, 14, 19)\n\
        \    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                arg1:
                  type: array
                  items:
                    description: Any Lua value.
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: object
                    - type: array
                      items: {}
                  description: Value passed to the `arg1` parameter.
              required:
              - arg1
            example:
              arg1: []
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToRectangle(...)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    moveToRectangle(10, 15, 14, 19)\n    return\nend"
  /lua/path-actions/movetonormalground:
    post:
      tags:
      - Path actions
      operationId: moveToNormalGround
      summary: moveToNormalGround()
      description: "**Lua global function**\n\n```lua\nresult = moveToNormalGround()\n```\n\nMove randomly\
        \ avoiding water and links.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return\
        \ immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = moveToNormalGround()\n    return\nend\n    return\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToNormalGround()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = moveToNormalGround()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/movetograss:
    post:
      tags:
      - Path actions
      operationId: moveToGrass
      summary: moveToGrass()
      description: "**Lua global function**\n\n```lua\nresult = moveToGrass()\n```\n\nMoves to the nearest\
        \ grass patch then move randomly inside it.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = moveToGrass()\n    return\n\
        end\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToGrass()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = moveToGrass()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/movetowater:
    post:
      tags:
      - Path actions
      operationId: moveToWater
      summary: moveToWater()
      description: "**Lua global function**\n\n```lua\nresult = moveToWater()\n```\n\nMoves to the nearest\
        \ water area then move randomly inside it.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = moveToWater()\n    return\n\
        end\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveToWater()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = moveToWater()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/movenearexit:
    post:
      tags:
      - Path actions
      operationId: moveNearExit
      summary: moveNearExit()
      description: "**Lua global function**\n\n```lua\nresult = moveNearExit(mapName)\n```\n\nMoves near\
        \ the cell teleporting to the specified map.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = moveNearExit(\"Viridian City\"\
        )\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mapName:
                  type: string
                  description: Value passed to the `mapName` parameter.
              required:
              - mapName
            example:
              mapName: Viridian City
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = moveNearExit(mapName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = moveNearExit(\"\
          Viridian City\")\n    return\nend\n    return\nend"
  /lua/path-actions/talktonpc:
    post:
      tags:
      - Path actions
      operationId: talkToNpc
      summary: talkToNpc()
      description: "**Lua global function**\n\n```lua\nresult = talkToNpc(npcName)\n```\n\nMoves then\
        \ talk to NPC specified by its name.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = talkToNpc(\"Nurse Joy\")\n \
        \   return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                npcName:
                  type: string
                  description: Exact or documented NPC name.
              required:
              - npcName
            example:
              npcName: Nurse Joy
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = talkToNpc(npcName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = talkToNpc(\"\
          Nurse Joy\")\n    return\nend\n    return\nend"
  /lua/path-actions/talktonpconcell:
    post:
      tags:
      - Path actions
      operationId: talkToNpcOnCell
      summary: talkToNpcOnCell()
      description: "**Lua global function**\n\n```lua\nresult = talkToNpcOnCell(cellX, cellY)\n```\n\n\
        Moves then talk to NPC located on the specified cell.\n\n**Practical scenario**\n\nUse this in\
        \ `onPathAction()` and return immediately so only one overworld action is issued in the frame.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = talkToNpcOnCell(10,\
        \ 15)\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cellX:
                  type: integer
                  description: Value passed to the `cellX` parameter.
                cellY:
                  type: integer
                  description: Value passed to the `cellY` parameter.
              required:
              - cellX
              - cellY
            example:
              cellX: 10
              cellY: 15
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = talkToNpcOnCell(cellX, cellY)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = talkToNpcOnCell(10,\
          \ 15)\n    return\nend\n    return\nend"
  /lua/path-actions/usepokecenter:
    post:
      tags:
      - Path actions
      operationId: usePokecenter
      summary: usePokecenter()
      description: "**Lua global function**\n\n```lua\nresult = usePokecenter()\n```\n\nMoves to the Nurse\
        \ Joy then talk to the cell below her.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = usePokecenter()\n    return\n\
        end\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = usePokecenter()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = usePokecenter()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/swappokemon:
    post:
      tags:
      - Path actions
      operationId: swapPokemon
      summary: swapPokemon()
      description: "**Lua global function**\n\n```lua\nresult = swapPokemon(index1, index2)\n```\n\nSwaps\
        \ the two pokémon specified by their position in the team.\n\n**Practical scenario**\n\nUse this\
        \ in `onPathAction()` and return immediately so only one overworld action is issued in the frame.\n\
        \n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result = swapPokemon(1,\
        \ 1)\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index1:
                  type: integer
                  description: Value passed to the `index1` parameter.
                index2:
                  type: integer
                  description: Value passed to the `index2` parameter.
              required:
              - index1
              - index2
            example:
              index1: 1
              index2: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = swapPokemon(index1, index2)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = swapPokemon(1,\
          \ 1)\n    return\nend\n    return\nend"
  /lua/path-actions/swappokemonwithleader:
    post:
      tags:
      - Path actions
      operationId: swapPokemonWithLeader
      summary: swapPokemonWithLeader()
      description: "**Lua global function**\n\n```lua\nresult = swapPokemonWithLeader(pokemonName)\n```\n\
        \nSwaps the first pokémon with the specified name with the leader of the team.\n\n**Practical\
        \ scenario**\n\nMove the named Pokémon to the lead slot before continuing the route.\n\n```lua\n\
        function onPathAction()\n    if getPokemonName(1) ~= \"Pikachu\" then\n        swapPokemonWithLeader(\"\
        Pikachu\")\n        return\n    end\n\n    moveToGrass()\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonName:
                  type: string
                  description: Value passed to the `pokemonName` parameter.
              required:
              - pokemonName
            example:
              pokemonName: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = swapPokemonWithLeader(pokemonName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if getPokemonName(1) ~= \"Pikachu\" then\n        swapPokemonWithLeader(\"\
          Pikachu\")\n        return\n    end\n\n    moveToGrass()\nend"
  /lua/path-actions/sortteambylevelascending:
    post:
      tags:
      - Path actions
      operationId: sortTeamByLevelAscending
      summary: sortTeamByLevelAscending()
      description: "**Lua global function**\n\n```lua\nresult = sortTeamByLevelAscending()\n```\n\nSorts\
        \ the pokémon in the team by level in ascending order, one pokémon at a time.\n\n**Practical scenario**\n\
        \nUse this in `onPathAction()` and return immediately so only one overworld action is issued in\
        \ the frame.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result\
        \ = sortTeamByLevelAscending()\n    return\nend\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sortTeamByLevelAscending()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = sortTeamByLevelAscending()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/sortteambyleveldescending:
    post:
      tags:
      - Path actions
      operationId: sortTeamByLevelDescending
      summary: sortTeamByLevelDescending()
      description: "**Lua global function**\n\n```lua\nresult = sortTeamByLevelDescending()\n```\n\nSorts\
        \ the pokémon in the team by level in descending order, one pokémon at a time.\n\n**Practical\
        \ scenario**\n\nUse this in `onPathAction()` and return immediately so only one overworld action\
        \ is issued in the frame.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n  \
        \  local result = sortTeamByLevelDescending()\n    return\nend\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sortTeamByLevelDescending()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = sortTeamByLevelDescending()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/sortteamrangebylevelascending:
    post:
      tags:
      - Path actions
      operationId: sortTeamRangeByLevelAscending
      summary: sortTeamRangeByLevelAscending()
      description: "**Lua global function**\n\n```lua\nresult = sortTeamRangeByLevelAscending(fromIndex,\
        \ toIndex)\n```\n\nSorts the specified part of the team by level in ascending order, one pokémon\
        \ at a time.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return immediately\
        \ so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n  \
        \  function onPathAction()\n    local result = sortTeamRangeByLevelAscending(10, 10)\n    return\n\
        end\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fromIndex:
                  type: integer
                  description: Value passed to the `fromIndex` parameter.
                toIndex:
                  type: integer
                  description: Value passed to the `toIndex` parameter.
              required:
              - fromIndex
              - toIndex
            example:
              fromIndex: 10
              toIndex: 10
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sortTeamRangeByLevelAscending(fromIndex, toIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = sortTeamRangeByLevelAscending(10,\
          \ 10)\n    return\nend\n    return\nend"
  /lua/path-actions/sortteamrangebyleveldescending:
    post:
      tags:
      - Path actions
      operationId: sortTeamRangeByLevelDescending
      summary: sortTeamRangeByLevelDescending()
      description: "**Lua global function**\n\n```lua\nresult = sortTeamRangeByLevelDescending(fromIndex,\
        \ toIndex)\n```\n\nSorts the specified part of the team by level in descending order, one pokémon\
        \ at a time.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return immediately\
        \ so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n  \
        \  function onPathAction()\n    local result = sortTeamRangeByLevelDescending(10, 10)\n    return\n\
        end\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fromIndex:
                  type: integer
                  description: Value passed to the `fromIndex` parameter.
                toIndex:
                  type: integer
                  description: Value passed to the `toIndex` parameter.
              required:
              - fromIndex
              - toIndex
            example:
              fromIndex: 10
              toIndex: 10
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sortTeamRangeByLevelDescending(fromIndex, toIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = sortTeamRangeByLevelDescending(10,\
          \ 10)\n    return\nend\n    return\nend"
  /lua/items-and-shop/buyitem:
    post:
      tags:
      - Items and shop
      operationId: buyItem
      summary: buyItem()
      description: "**Lua global function**\n\n```lua\nresult = buyItem(itemName, quantity)\n```\n\nBuys\
        \ the specified item from the opened shop.\n\n**Practical scenario**\n\nCheck inventory/shop state\
        \ first, perform this action once, then return so the server can update state.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = buyItem(\"Potion\", 15)\n  \
        \  return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
                quantity:
                  type: integer
                  description: Value passed to the `quantity` parameter.
              required:
              - itemName
              - quantity
            example:
              itemName: Potion
              quantity: 15
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = buyItem(itemName, quantity)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = buyItem(\"Potion\"\
          , 15)\n    return\nend\n    return\nend"
  /lua/items-and-shop/hasshopitem:
    post:
      tags:
      - Items and shop
      operationId: hasShopItem
      summary: hasShopItem()
      description: "**Lua global function**\n\n```lua\nresult = hasShopItem(itemName)\n```\n\nLua function\
        \ `hasShopItem`.\n\n**Practical scenario**\n\nUse this query to guard an item or shop action and\
        \ avoid sending requests that cannot succeed.\n\n```lua\nfunction onPathAction()\n    function\
        \ onPathAction()\n    local result = hasShopItem(\"Potion\")\n    if result then\n        log(\"\
        hasShopItem condition is true\")\n    end\nend\n    if result then\n        log(\"hasShopItem\
        \ condition is true\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
              required:
              - itemName
            example:
              itemName: Potion
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = hasShopItem(itemName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = hasShopItem(\"\
          Potion\")\n    if result then\n        log(\"hasShopItem condition is true\")\n    end\nend\n\
          \    if result then\n        log(\"hasShopItem condition is true\")\n    end\nend"
  /lua/path-actions/relearnmove:
    post:
      tags:
      - Path actions
      operationId: relearnMove
      summary: relearnMove()
      description: "**Lua global function**\n\n```lua\nresult = relearnMove(moveName)\n```\n\nRelearn\
        \ a move from the move relearner NPC.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = relearnMove(\"Tackle\")\n  \
        \  return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                moveName:
                  type: string
                  description: Exact move name as shown by the game.
              required:
              - moveName
            example:
              moveName: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = relearnMove(moveName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = relearnMove(\"\
          Tackle\")\n    return\nend\n    return\nend"
  /lua/pc-storage/usepc:
    post:
      tags:
      - PC storage
      operationId: usePC
      summary: usePC()
      description: "**Lua global function**\n\n```lua\nresult = usePC()\n```\n\nMove next to the map PC\
        \ when needed, open Pokémon Storage, and request the current PC box. The PC opens using the official\
        \ storage flow and remains open until closed by movement or another PC action. Use `isCurrentPCBoxRefreshed()`\
        \ before relying on the refreshed box contents.\n\n**Practical scenario**\n\nPC actions are asynchronous.\
        \ Issue one operation, return, and wait for the next server refresh before making a dependent\
        \ change.\n\n```lua\nfunction onPathAction()\n    if not isPCOpen() then\n        usePC()\n  \
        \      return\n    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n\
        \        return\n    end\n\n    local result = usePC()\n    return\nend\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = usePC()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = usePC()\n    return\nend\n    return\nend"
  /lua/pc-storage/openpcbox:
    post:
      tags:
      - PC storage
      operationId: openPCBox
      summary: openPCBox()
      description: "**Lua global function**\n\n```lua\nresult = openPCBox(boxId)\n```\n\nOpen or refresh\
        \ a PC box by its one-based box number. The visible box order uses one-based `boxPokemonId` indexes,\
        \ while the tool internally tracks server database IDs and PC slot IDs. Wait for `isCurrentPCBoxRefreshed()`\
        \ before reading the box immediately after opening it.\n\n**Practical scenario**\n\nPC actions\
        \ are asynchronous. Issue one operation, return, and wait for the next server refresh before making\
        \ a dependent change.\n\n```lua\nfunction onPathAction()\n    if not isPCOpen() then\n       \
        \ usePC()\n        return\n    end\n\n    function onPathAction()\n    if not isPCOpen() then\n\
        \        usePC()\n        return\n    end\n\n    local result = openPCBox(1)\n    return\nend\n\
        \    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
              required:
              - boxId
            example:
              boxId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = openPCBox(boxId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = openPCBox(1)\n    return\nend\n    return\nend"
  /lua/pc-storage/depositpokemontopc:
    post:
      tags:
      - PC storage
      operationId: depositPokemonToPC
      summary: depositPokemonToPC()
      description: "**Lua global function**\n\n```lua\nresult = depositPokemonToPC(teamPokemonId)\n```\n\
        \nSend the Pokémon at the one-based team index into the currently open PC box. The tool resolves\
        \ the selected team Pokémon to its server database ID and waits for the server PC delta update\
        \ instead of forcing an immediate full refresh. Re-check team/PC state before issuing a dependent\
        \ action.\n\n**Practical scenario**\n\nPC actions are asynchronous. Issue one operation, return,\
        \ and wait for the next server refresh before making a dependent change.\n\n```lua\nfunction onPathAction()\n\
        \    if not isPCOpen() then\n        usePC()\n        return\n    end\n\n    function onPathAction()\n\
        \    if not isPCOpen() then\n        usePC()\n        return\n    end\n\n    local result = depositPokemonToPC(2)\n\
        \    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                teamPokemonId:
                  type: integer
                  description: Value passed to the `teamPokemonId` parameter.
              required:
              - teamPokemonId
            example:
              teamPokemonId: 2
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = depositPokemonToPC(teamPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = depositPokemonToPC(2)\n    return\nend\n    return\n\
          end"
  /lua/pc-storage/withdrawpokemonfrompc:
    post:
      tags:
      - PC storage
      operationId: withdrawPokemonFromPC
      summary: withdrawPokemonFromPC()
      description: "**Lua global function**\n\n```lua\nresult = withdrawPokemonFromPC(boxId, boxPokemonId)\n\
        ```\n\nMove the Pokémon at the one-based PC box index into the team. The tool resolves the selected\
        \ PC Pokémon to its server database ID and waits for the normal team update plus PC delta remove\
        \ response. The target `boxId` should match the visible/refreshed PC box.\n\n**Practical scenario**\n\
        \nPC actions are asynchronous. Issue one operation, return, and wait for the next server refresh\
        \ before making a dependent change.\n\n```lua\nfunction onPathAction()\n    if not isPCOpen()\
        \ then\n        usePC()\n        return\n    end\n\n    function onPathAction()\n    if not isPCOpen()\
        \ then\n        usePC()\n        return\n    end\n\n    local result = withdrawPokemonFromPC(1,\
        \ 1)\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = withdrawPokemonFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = withdrawPokemonFromPC(1, 1)\n    return\nend\n   \
          \ return\nend"
  /lua/pc-storage/swappokemonfrompc:
    post:
      tags:
      - PC storage
      operationId: swapPokemonFromPC
      summary: swapPokemonFromPC()
      description: "**Lua global function**\n\n```lua\nresult = swapPokemonFromPC(boxId, boxPokemonId,\
        \ teamPokemonId)\n```\n\nSwap the Pokémon at the one-based team index with the Pokémon at the\
        \ one-based index in the selected PC box. The tool sends the official database-ID swap packet\
        \ and applies the server PC delta update, so the PC Pokémon can be at any position in the box,\
        \ including the first slot.\n\n**Practical scenario**\n\nPC actions are asynchronous. Issue one\
        \ operation, return, and wait for the next server refresh before making a dependent change.\n\n\
        ```lua\nfunction onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
        \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n       \
        \ return\n    end\n\n    local result = swapPokemonFromPC(1, 1, 2)\n    return\nend\n    return\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
                teamPokemonId:
                  type: integer
                  description: Value passed to the `teamPokemonId` parameter.
              required:
              - boxId
              - boxPokemonId
              - teamPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
              teamPokemonId: 2
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = swapPokemonFromPC(boxId, boxPokemonId, teamPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = swapPokemonFromPC(1, 1, 2)\n    return\nend\n    return\n\
          end"
  /lua/pc-storage/swappokemonwithinpc:
    post:
      tags:
      - PC storage
      operationId: swapPokemonWithinPC
      summary: swapPokemonWithinPC()
      description: "**Lua global function**\n\n```lua\nresult = swapPokemonWithinPC(boxId, firstBoxPokemonId,\
        \ secondBoxPokemonId)\n```\n\nSwap two Pokémon positions inside the same visible PC box. Both\
        \ PC indexes are one-based. The server returns a position-pair delta, and the tool updates the\
        \ cached PC slot order without refreshing the full box.\n\n**Practical scenario**\n\nPC actions\
        \ are asynchronous. Issue one operation, return, and wait for the next server refresh before making\
        \ a dependent change.\n\n```lua\nfunction onPathAction()\n    if not isPCOpen() then\n       \
        \ usePC()\n        return\n    end\n\n    function onPathAction()\n    if not isPCOpen() then\n\
        \        usePC()\n        return\n    end\n\n    local result = swapPokemonWithinPC(1, 1, 2)\n\
        \    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                firstBoxPokemonId:
                  type: integer
                  description: Value passed to the `firstBoxPokemonId` parameter.
                secondBoxPokemonId:
                  type: integer
                  description: Value passed to the `secondBoxPokemonId` parameter.
              required:
              - boxId
              - firstBoxPokemonId
              - secondBoxPokemonId
            example:
              boxId: 1
              firstBoxPokemonId: 1
              secondBoxPokemonId: 2
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = swapPokemonWithinPC(boxId, firstBoxPokemonId, secondBoxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = swapPokemonWithinPC(1, 1, 2)\n    return\nend\n  \
          \  return\nend"
  /lua/items-and-shop/giveitemtopokemon:
    post:
      tags:
      - Items and shop
      operationId: giveItemToPokemon
      summary: giveItemToPokemon()
      description: "**Lua global function**\n\n```lua\nresult = giveItemToPokemon(itemName, pokemonIndex)\n\
        ```\n\nGive the specified item on the specified pokemon.\n\n**Practical scenario**\n\nCheck inventory/shop\
        \ state first, perform this action once, then return so the server can update state.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = giveItemToPokemon(\"\
        Potion\", 1)\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
              required:
              - itemName
              - pokemonIndex
            example:
              itemName: Potion
              pokemonIndex: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = giveItemToPokemon(itemName, pokemonIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = giveItemToPokemon(\"\
          Potion\", 1)\n    return\nend\n    return\nend"
  /lua/items-and-shop/takeitemfrompokemon:
    post:
      tags:
      - Items and shop
      operationId: takeItemFromPokemon
      summary: takeItemFromPokemon()
      description: "**Lua global function**\n\n```lua\nresult = takeItemFromPokemon(index)\n```\n\nTake\
        \ the held item from the specified pokemon.\n\n**Practical scenario**\n\nCheck inventory/shop\
        \ state first, perform this action once, then return so the server can update state.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = takeItemFromPokemon(1)\n\
        \    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = takeItemFromPokemon(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = takeItemFromPokemon(1)\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/releasepokemonfromteam:
    post:
      tags:
      - Path actions
      operationId: releasePokemonFromTeam
      summary: releasePokemonFromTeam()
      description: "**Lua global function**\n\n```lua\nresult = releasePokemonFromTeam(pokemonUid)\n```\n\
        \nReleases the specified pokemon in the team.\n\n**Practical scenario**\n\nUse this in `onPathAction()`\
        \ and return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = releasePokemonFromTeam(1)\n\
        \    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pokemonUid:
                  type: integer
                  description: Stable Pokémon database/unique identifier returned by the corresponding
                    query API.
              required:
              - pokemonUid
            example:
              pokemonUid: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = releasePokemonFromTeam(pokemonUid)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = releasePokemonFromTeam(1)\n\
          \    return\nend\n    return\nend"
  /lua/pc-storage/releasepokemonfrompc:
    post:
      tags:
      - PC storage
      operationId: releasePokemonFromPC
      summary: releasePokemonFromPC()
      description: "**Lua global function**\n\n```lua\nresult = releasePokemonFromPC(boxId, boxPokemonId)\n\
        ```\n\nPermanently release/delete the Pokémon at the one-based index in the selected PC box. This\
        \ cannot be undone. The tool resolves the Pokémon database ID, sends the official release packet,\
        \ and waits for the server PC delta remove update.\n\n**Practical scenario**\n\nRelease only after\
        \ opening the correct box and validating the target. The operation is permanent and asynchronous.\n\
        \n```lua\nfunction onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
        \    end\n\n    if not isCurrentPCBoxRefreshed() then\n        refreshPCBox()\n        return\n\
        \    end\n\n    if getPokemonNameFromPC(1, 1) == \"Rattata\" then\n        releasePokemonFromPC(1,\
        \ 1)\n        return\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
                boxPokemonId:
                  type: integer
                  description: One-based Pokémon position inside the selected PC box.
              required:
              - boxId
              - boxPokemonId
            example:
              boxId: 1
              boxPokemonId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = releasePokemonFromPC(boxId, boxPokemonId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    if not isCurrentPCBoxRefreshed() then\n        refreshPCBox()\n        return\n\
          \    end\n\n    if getPokemonNameFromPC(1, 1) == \"Rattata\" then\n        releasePokemonFromPC(1,\
          \ 1)\n        return\n    end\nend"
  /lua/path-actions/enableprivatemessage:
    post:
      tags:
      - Path actions
      operationId: enablePrivateMessage
      summary: enablePrivateMessage()
      description: "**Lua global function**\n\n```lua\nresult = enablePrivateMessage()\n```\n\nEnable\
        \ private messages from users.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return\
        \ immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = enablePrivateMessage()\n    return\nend\n   \
        \ return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = enablePrivateMessage()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = enablePrivateMessage()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/disableprivatemessage:
    post:
      tags:
      - Path actions
      operationId: disablePrivateMessage
      summary: disablePrivateMessage()
      description: "**Lua global function**\n\n```lua\nresult = disablePrivateMessage()\n```\n\nDisable\
        \ private messages from users.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return\
        \ immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = disablePrivateMessage()\n    return\nend\n  \
        \  return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = disablePrivateMessage()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = disablePrivateMessage()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/enablepartyinspection:
    post:
      tags:
      - Path actions
      operationId: enablePartyInspection
      summary: enablePartyInspection()
      description: "**Lua global function**\n\n```lua\nresult = enablePartyInspection()\n```\n\nEnable\
        \ party inspection from users.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return\
        \ immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = enablePartyInspection()\n    return\nend\n  \
        \  return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = enablePartyInspection()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = enablePartyInspection()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/disablepartyinspection:
    post:
      tags:
      - Path actions
      operationId: disablePartyInspection
      summary: disablePartyInspection()
      description: "**Lua global function**\n\n```lua\nresult = disablePartyInspection()\n```\n\nDisable\
        \ party inspection from users.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return\
        \ immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = disablePartyInspection()\n    return\nend\n \
        \   return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = disablePartyInspection()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = disablePartyInspection()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/enableautoevolve:
    post:
      tags:
      - Path actions
      operationId: enableAutoEvolve
      summary: enableAutoEvolve()
      description: "**Lua global function**\n\n```lua\nresult = enableAutoEvolve()\n```\n\nEnable auto\
        \ evolve on Pkm Catchem client.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and\
        \ return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = enableAutoEvolve()\n    return\n\
        end\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = enableAutoEvolve()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = enableAutoEvolve()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/disableautoevolve:
    post:
      tags:
      - Path actions
      operationId: disableAutoEvolve
      summary: disableAutoEvolve()
      description: "**Lua global function**\n\n```lua\nresult = disableAutoEvolve()\n```\n\nDisable auto\
        \ evolve on Pkm Catchem client.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and\
        \ return immediately so only one overworld action is issued in the frame.\n\n```lua\nfunction\
        \ onPathAction()\n    function onPathAction()\n    local result = disableAutoEvolve()\n    return\n\
        end\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = disableAutoEvolve()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = disableAutoEvolve()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/enablenpcinteractions:
    post:
      tags:
      - Path actions
      operationId: enableNpcInteractions
      summary: enableNpcInteractions()
      description: "**Lua global function**\n\n```lua\nresult = enableNpcInteractions()\n```\n\nEnables\
        \ npc interactions.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return immediately\
        \ so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n  \
        \  function onPathAction()\n    local result = enableNpcInteractions()\n    return\nend\n    return\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = enableNpcInteractions()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = enableNpcInteractions()\n\
          \    return\nend\n    return\nend"
  /lua/path-actions/disablenpcinteractions:
    post:
      tags:
      - Path actions
      operationId: disableNpcInteractions
      summary: disableNpcInteractions()
      description: "**Lua global function**\n\n```lua\nresult = disableNpcInteractions()\n```\n\nDisables\
        \ npc interactions.\n\n**Practical scenario**\n\nUse this in `onPathAction()` and return immediately\
        \ so only one overworld action is issued in the frame.\n\n```lua\nfunction onPathAction()\n  \
        \  function onPathAction()\n    local result = disableNpcInteractions()\n    return\nend\n   \
        \ return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = disableNpcInteractions()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = disableNpcInteractions()\n\
          \    return\nend\n    return\nend"
  /lua/map-and-npc/isinarea:
    post:
      tags:
      - Map and NPC
      operationId: isInArea
      summary: isInArea()
      description: "**Lua global function**\n\n```lua\nresult = isInArea(text)\n```\n\nCheck condition\
        \ list cell\n\n**Practical scenario**\n\nUse the condition-string syntax expected by the tool\
        \ to test whether the current coordinates satisfy a route region.\n\n```lua\nfunction onPathAction()\n\
        \    local insideRoute = isInArea(\">=:10->=:15?&&,<=:20-<=:25?&&\")\n    if insideRoute then\n\
        \        moveToGrass()\n        return\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: Value passed to the `text` parameter.
              required:
              - text
            example:
              text: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = isInArea(text)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    local insideRoute = isInArea(\">=:10->=:15?&&,<=:20-<=:25?&&\"\
          )\n    if insideRoute then\n        moveToGrass()\n        return\n    end\nend"
  /lua/dialog-functions/pushdialoganswer:
    post:
      tags:
      - Dialog functions
      operationId: pushDialogAnswer
      summary: pushDialogAnswer()
      description: "**Lua global function**\n\n```lua\npushDialogAnswer(answerValue)\n```\n\nAdds the\
        \ specified answer to the answer queue. It will be used in the next dialog.\n\n**Practical scenario**\n\
        \nQueue the expected answer before interacting with the NPC that will open the dialog.\n\n```lua\n\
        function onPathAction()\n    pushDialogAnswer(\"Yes\")\n    talkToNpc(\"Nurse Joy\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                answerValue:
                  description: Any Lua value.
                  oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: object
                  - type: array
                    items: {}
              required:
              - answerValue
            example:
              answerValue: {}
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: pushDialogAnswer(answerValue)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    pushDialogAnswer(\"Yes\")\n    talkToNpc(\"Nurse Joy\")\n\
          end"
  /lua/items-and-shop/useitem:
    post:
      tags:
      - Items and shop
      operationId: useItem
      summary: useItem()
      description: "**Lua global function**\n\n```lua\nresult = useItem(itemName)\n```\n\nUses the specified\
        \ item.\n\n**Practical scenario**\n\nCheck inventory/shop state first, perform this action once,\
        \ then return so the server can update state.\n\n```lua\nfunction onPathAction()\n    function\
        \ onPathAction()\n    local result = useItem(\"Potion\")\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
              required:
              - itemName
            example:
              itemName: Potion
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = useItem(itemName)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = useItem(\"Potion\"\
          )\n    return\nend\n    return\nend"
  /lua/items-and-shop/useitemonpokemon:
    post:
      tags:
      - Items and shop
      operationId: useItemOnPokemon
      summary: useItemOnPokemon()
      description: "**Lua global function**\n\n```lua\nresult = useItemOnPokemon(itemName, pokemonIndex)\n\
        ```\n\nUses the specified item on the specified pokémon.\n\n**Practical scenario**\n\nCheck inventory/shop\
        \ state first, perform this action once, then return so the server can update state.\n\n```lua\n\
        function onPathAction()\n    function onPathAction()\n    local result = useItemOnPokemon(\"Potion\"\
        , 1)\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  description: Exact item name as shown in the inventory.
                pokemonIndex:
                  type: integer
                  description: One-based Pokémon index in the current team.
              required:
              - itemName
              - pokemonIndex
            example:
              itemName: Potion
              pokemonIndex: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = useItemOnPokemon(itemName, pokemonIndex)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = useItemOnPokemon(\"\
          Potion\", 1)\n    return\nend\n    return\nend"
  /lua/battle-actions/attack:
    post:
      tags:
      - Battle actions
      operationId: attack
      summary: attack()
      description: "**Lua global function**\n\n```lua\nresult = attack()\n```\n\nUses the most effective\
        \ offensive move available.\n\n**Practical scenario**\n\nChoose this action in `onBattleAction()`\
        \ and return immediately so only one battle action is sent in the frame.\n\n```lua\nfunction onBattleAction()\n\
        \    function onBattleAction()\n    local result = attack()\n    return\nend\n    return\nend\n\
        ```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = attack()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = attack()\n\
          \    return\nend\n    return\nend"
  /lua/battle-actions/weakattack:
    post:
      tags:
      - Battle actions
      operationId: weakAttack
      summary: weakAttack()
      description: "**Lua global function**\n\n```lua\nresult = weakAttack()\n```\n\nUses the least effective\
        \ offensive move available.\n\n**Practical scenario**\n\nChoose this action in `onBattleAction()`\
        \ and return immediately so only one battle action is sent in the frame.\n\n```lua\nfunction onBattleAction()\n\
        \    function onBattleAction()\n    local result = weakAttack()\n    return\nend\n    return\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = weakAttack()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = weakAttack()\n\
          \    return\nend\n    return\nend"
  /lua/battle-actions/run:
    post:
      tags:
      - Battle actions
      operationId: run
      summary: run()
      description: "**Lua global function**\n\n```lua\nresult = run()\n```\n\nTries to escape from the\
        \ current wild battle.\n\n**Practical scenario**\n\nChoose this action in `onBattleAction()` and\
        \ return immediately so only one battle action is sent in the frame.\n\n```lua\nfunction onBattleAction()\n\
        \    function onBattleAction()\n    local result = run()\n    return\nend\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = run()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = run()\n\
          \    return\nend\n    return\nend"
  /lua/battle-actions/sendusablepokemon:
    post:
      tags:
      - Battle actions
      operationId: sendUsablePokemon
      summary: sendUsablePokemon()
      description: "**Lua global function**\n\n```lua\nresult = sendUsablePokemon()\n```\n\nSends the\
        \ first usable pokemon different from the active one.\n\n**Practical scenario**\n\nChoose this\
        \ action in `onBattleAction()` and return immediately so only one battle action is sent in the\
        \ frame.\n\n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result\
        \ = sendUsablePokemon()\n    return\nend\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendUsablePokemon()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = sendUsablePokemon()\n\
          \    return\nend\n    return\nend"
  /lua/battle-actions/sendanypokemon:
    post:
      tags:
      - Battle actions
      operationId: sendAnyPokemon
      summary: sendAnyPokemon()
      description: "**Lua global function**\n\n```lua\nresult = sendAnyPokemon()\n```\n\nSends the first\
        \ available pokemon different from the active one.\n\n**Practical scenario**\n\nChoose this action\
        \ in `onBattleAction()` and return immediately so only one battle action is sent in the frame.\n\
        \n```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result = sendAnyPokemon()\n\
        \    return\nend\n    return\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendAnyPokemon()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = sendAnyPokemon()\n\
          \    return\nend\n    return\nend"
  /lua/battle-actions/sendpokemon:
    post:
      tags:
      - Battle actions
      operationId: sendPokemon
      summary: sendPokemon()
      description: "**Lua global function**\n\n```lua\nresult = sendPokemon(index)\n```\n\nSends the specified\
        \ pokemon to battle.\n\n**Practical scenario**\n\nChoose this action in `onBattleAction()` and\
        \ return immediately so only one battle action is sent in the frame.\n\n```lua\nfunction onBattleAction()\n\
        \    function onBattleAction()\n    local result = sendPokemon(1)\n    return\nend\n    return\n\
        end\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendPokemon(index)
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = sendPokemon(1)\n\
          \    return\nend\n    return\nend"
  /lua/battle-actions/usemove:
    post:
      tags:
      - Battle actions
      operationId: useMove
      summary: useMove()
      description: "**Lua global function**\n\n```lua\nresult = useMove(moveName)\n```\n\nUses the specified\
        \ move in the current battle if available.\n\n**Practical scenario**\n\nChoose this action in\
        \ `onBattleAction()` and return immediately so only one battle action is sent in the frame.\n\n\
        ```lua\nfunction onBattleAction()\n    function onBattleAction()\n    local result = useMove(\"\
        Tackle\")\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                moveName:
                  type: string
                  description: Exact move name as shown by the game.
              required:
              - moveName
            example:
              moveName: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = useMove(moveName)
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = useMove(\"\
          Tackle\")\n    return\nend\n    return\nend"
  /lua/battle-actions/useanymove:
    post:
      tags:
      - Battle actions
      operationId: useAnyMove
      summary: useAnyMove()
      description: "**Lua global function**\n\n```lua\nresult = useAnyMove()\n```\n\nUses the first available\
        \ move or struggle if out of PP.\n\n**Practical scenario**\n\nChoose this action in `onBattleAction()`\
        \ and return immediately so only one battle action is sent in the frame.\n\n```lua\nfunction onBattleAction()\n\
        \    function onBattleAction()\n    local result = useAnyMove()\n    return\nend\n    return\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = useAnyMove()
      x-codeSamples:
      - lang: Lua
        source: "function onBattleAction()\n    function onBattleAction()\n    local result = useAnyMove()\n\
          \    return\nend\n    return\nend"
  /lua/bot-configuration/setafk:
    post:
      tags:
      - Bot configuration
      operationId: setAfk
      summary: setAfk()
      description: "**Lua global function**\n\n```lua\nresult = setAfk(value)\n```\n\nSets afk timeout\
        \ for BOT\n\n**Practical scenario**\n\nSet this during startup or when changing modes, rather\
        \ than writing it every frame.\n\n```lua\nfunction onStart()\n    function onStart()\n    local\
        \ result = setAfk(1)\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: integer
                  description: Value to store or send.
              required:
              - value
            example:
              value: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = setAfk(value)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    local result = setAfk(1)\nend\nend"
  /lua/move-learning-actions/forgetmove:
    post:
      tags:
      - Move learning actions
      operationId: forgetMove
      summary: forgetMove()
      description: "**Lua global function**\n\n```lua\nresult = forgetMove(moveName)\n```\n\nForgets the\
        \ specified move, if existing, in order to learn a new one.\n\n**Practical scenario**\n\nCall\
        \ this from `onLearningMove()` and choose exactly one move-learning action.\n\n```lua\nfunction\
        \ onLearningMove(moveName, pokemonIndex)\n    function onLearningMove(moveName, pokemonIndex)\n\
        \    local result = forgetMove(\"Tackle\")\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                moveName:
                  type: string
                  description: Exact move name as shown by the game.
              required:
              - moveName
            example:
              moveName: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = forgetMove(moveName)
      x-codeSamples:
      - lang: Lua
        source: "function onLearningMove(moveName, pokemonIndex)\n    function onLearningMove(moveName,\
          \ pokemonIndex)\n    local result = forgetMove(\"Tackle\")\nend\nend"
  /lua/move-learning-actions/forgetanymoveexcept:
    post:
      tags:
      - Move learning actions
      operationId: forgetAnyMoveExcept
      summary: forgetAnyMoveExcept()
      description: "**Lua global function**\n\n```lua\nresult = forgetAnyMoveExcept(...)\n```\n\nForgets\
        \ the first move that is not one of the specified moves.\n\n**Practical scenario**\n\nPass move\
        \ names that must be preserved. The tool forgets the first current move not in that list.\n\n\
        ```lua\nfunction onLearningMove(moveName, pokemonIndex)\n    forgetAnyMoveExcept(\"Thunderbolt\"\
        , \"Volt Tackle\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                moveNames:
                  type: array
                  items:
                    description: Any Lua value.
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: object
                    - type: array
                      items: {}
                  description: Value passed to the `moveNames` parameter.
              required:
              - moveNames
            example:
              moveNames: Tackle
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = forgetAnyMoveExcept(...)
      x-codeSamples:
      - lang: Lua
        source: "function onLearningMove(moveName, pokemonIndex)\n    forgetAnyMoveExcept(\"Thunderbolt\"\
          , \"Volt Tackle\")\nend"
  /lua/custom-options/setoption:
    post:
      tags:
      - Custom options
      operationId: setOption
      summary: setOption()
      description: "**Lua global function**\n\n```lua\nsetOption(index, value)\n```\n\nSets the option\
        \ at a particular index, or creates it if it doesn't exist\n\n**Practical scenario**\n\nDefine\
        \ or update script options during startup so the user can configure behavior from the UI.\n\n\
        ```lua\nfunction onStart()\n    function onStart()\n    setOption(1, true)\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                value:
                  type: boolean
                  description: Value to store or send.
              required:
              - index
              - value
            example:
              index: 1
              value: true
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: setOption(index, value)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    setOption(1, true)\nend\nend"
  /lua/custom-options/getoption:
    post:
      tags:
      - Custom options
      operationId: getOption
      summary: getOption()
      description: "**Lua global function**\n\n```lua\nresult = getOption(index)\n```\n\nGets the option\
        \ at a particular index, or creates it if it doesn't exist\n\n**Practical scenario**\n\nRead the\
        \ user-selected option when deciding what action the script should take.\n\n```lua\nfunction onPathAction()\n\
        \    function onPathAction()\n    local result = getOption(1)\n    log(\"getOption: \" .. tostring(result))\n\
        end\n    log(\"getOption: \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = getOption(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getOption(1)\n\
          \    log(\"getOption: \" .. tostring(result))\nend\n    log(\"getOption: \" .. tostring(result))\n\
          end"
  /lua/custom-options/setoptionname:
    post:
      tags:
      - Custom options
      operationId: setOptionName
      summary: setOptionName()
      description: "**Lua global function**\n\n```lua\nsetOptionName(index, content)\n```\n\nSets the\
        \ name of the option at a particular index, or creates it if it doesn't exist\n\n**Practical scenario**\n\
        \nGive a boolean option a user-facing label during script startup.\n\n```lua\nfunction onStart()\n\
        \    setOption(1, true)\n    setOptionName(1, \"Catch uncaught Pokémon\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                content:
                  type: string
                  description: Value passed to the `content` parameter.
              required:
              - index
              - content
            example:
              index: 1
              content: value
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: setOptionName(index, content)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    setOption(1, true)\n    setOptionName(1, \"Catch uncaught Pokémon\"\
          )\nend"
  /lua/custom-options/setoptiondescription:
    post:
      tags:
      - Custom options
      operationId: setOptionDescription
      summary: setOptionDescription()
      description: "**Lua global function**\n\n```lua\nsetOptionDescription(index, content)\n```\n\nSets\
        \ the tooltip description of the option at a particular index, or creates it if it doesn't exist\n\
        \n**Practical scenario**\n\nExplain exactly what a boolean option changes so the user can configure\
        \ the script safely.\n\n```lua\nfunction onStart()\n    setOptionDescription(1, \"When enabled,\
        \ the script weakens and catches species not yet owned.\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                content:
                  type: string
                  description: Value passed to the `content` parameter.
              required:
              - index
              - content
            example:
              index: 1
              content: value
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: setOptionDescription(index, content)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    setOptionDescription(1, \"When enabled, the script weakens and\
          \ catches species not yet owned.\")\nend"
  /lua/custom-options/removeoption:
    post:
      tags:
      - Custom options
      operationId: removeOption
      summary: removeOption()
      description: "**Lua global function**\n\n```lua\nremoveOption(index)\n```\n\nRemoves the slider\
        \ option at the specified index\n\n**Practical scenario**\n\nDefine or update script options during\
        \ startup so the user can configure behavior from the UI.\n\n```lua\nfunction onStart()\n    function\
        \ onStart()\n    removeOption(1)\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: removeOption(index)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    removeOption(1)\nend\nend"
  /lua/custom-options/settextoption:
    post:
      tags:
      - Custom options
      operationId: setTextOption
      summary: setTextOption()
      description: "**Lua global function**\n\n```lua\nsetTextOption(index, content)\n```\n\nSets the\
        \ text of the TextOption at a particular index, or creates it if it doesn't exist\n\n**Practical\
        \ scenario**\n\nCreate a text option with a meaningful default value.\n\n```lua\nfunction onStart()\n\
        \    setTextOption(1, \"Pikachu\")\n    setTextOptionName(1, \"Target Pokémon\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                content:
                  type: string
                  description: Value passed to the `content` parameter.
              required:
              - index
              - content
            example:
              index: 1
              content: value
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: setTextOption(index, content)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    setTextOption(1, \"Pikachu\")\n    setTextOptionName(1, \"Target\
          \ Pokémon\")\nend"
  /lua/custom-options/gettextoption:
    post:
      tags:
      - Custom options
      operationId: getTextOption
      summary: getTextOption()
      description: "**Lua global function**\n\n```lua\nresult = getTextOption(index)\n```\n\nReturns the\
        \ text content of the TextOption at a particular index, or an empty string if it doesn't exist\n\
        \n**Practical scenario**\n\nRead the user-selected option when deciding what action the script\
        \ should take.\n\n```lua\nfunction onPathAction()\n    function onPathAction()\n    local result\
        \ = getTextOption(1)\n    log(\"getTextOption: \" .. tostring(result))\nend\n    log(\"getTextOption:\
        \ \" .. tostring(result))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: string
              example: value
      x-lua-signature: result = getTextOption(index)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    function onPathAction()\n    local result = getTextOption(1)\n\
          \    log(\"getTextOption: \" .. tostring(result))\nend\n    log(\"getTextOption: \" .. tostring(result))\n\
          end"
  /lua/custom-options/settextoptionname:
    post:
      tags:
      - Custom options
      operationId: setTextOptionName
      summary: setTextOptionName()
      description: "**Lua global function**\n\n```lua\nsetTextOptionName(index, content)\n```\n\nSets\
        \ the name of the TextOption at a particular index, or creates it if it doesn't exist\n\n**Practical\
        \ scenario**\n\nGive a text option a concise user-facing label.\n\n```lua\nfunction onStart()\n\
        \    setTextOptionName(1, \"Target Pokémon\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                content:
                  type: string
                  description: Value passed to the `content` parameter.
              required:
              - index
              - content
            example:
              index: 1
              content: value
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: setTextOptionName(index, content)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    setTextOptionName(1, \"Target Pokémon\")\nend"
  /lua/custom-options/settextoptiondescription:
    post:
      tags:
      - Custom options
      operationId: setTextOptionDescription
      summary: setTextOptionDescription()
      description: "**Lua global function**\n\n```lua\nsetTextOptionDescription(index, content)\n```\n\
        \nSets the tooltip description of the TextOption at a particular index, or creates it if it doesn't\
        \ exist\n\n**Practical scenario**\n\nDescribe the accepted text format and provide an example.\n\
        \n```lua\nfunction onStart()\n    setTextOptionDescription(1, \"Exact species name, for example\
        \ Pikachu or Eevee.\")\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
                content:
                  type: string
                  description: Value passed to the `content` parameter.
              required:
              - index
              - content
            example:
              index: 1
              content: value
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: setTextOptionDescription(index, content)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    setTextOptionDescription(1, \"Exact species name, for example\
          \ Pikachu or Eevee.\")\nend"
  /lua/custom-options/removetextoption:
    post:
      tags:
      - Custom options
      operationId: removeTextOption
      summary: removeTextOption()
      description: "**Lua global function**\n\n```lua\nremoveTextOption(index)\n```\n\nRemoves the text\
        \ option at the specified index\n\n**Practical scenario**\n\nDefine or update script options during\
        \ startup so the user can configure behavior from the UI.\n\n```lua\nfunction onStart()\n    function\
        \ onStart()\n    removeTextOption(1)\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                index:
                  type: integer
                  description: One-based index in the current team or option list, depending on the API.
              required:
              - index
            example:
              index: 1
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: removeTextOption(index)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    removeTextOption(1)\nend\nend"
  /lua/file-apis/writetofile:
    post:
      tags:
      - File APIs
      operationId: writeToFile
      summary: writeToFile()
      description: "**Lua global function**\n\n```lua\nwriteToFile(filename, text, false)\n```\n\nWrites\
        \ a string to file overwrite is an optional parameter, and will append the line(s) if absent\n\
        \n**Practical scenario**\n\nPersist a small state snapshot. Set the third argument to `true` to\
        \ overwrite or `false` to append.\n\n```lua\nfunction onStop()\n    writeToFile(\"state/last-map.txt\"\
        , getMapName(), true)\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  description: Value passed to the `filename` parameter.
                text:
                  type: string
                  description: Value passed to the `text` parameter.
                'false':
                  type: boolean
                  description: Value passed to the `false` parameter.
              required:
              - filename
              - text
              - 'false'
            example:
              filename: logs/script.txt
              text: value
              'false': true
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: writeToFile(filename, text, false)
      x-codeSamples:
      - lang: Lua
        source: "function onStop()\n    writeToFile(\"state/last-map.txt\", getMapName(), true)\nend"
  /lua/file-apis/logtofile:
    post:
      tags:
      - File APIs
      operationId: logToFile
      summary: logToFile()
      description: "**Lua global function**\n\n```lua\nlogToFile(file, text, false)\n```\n\nWrites a string,\
        \ a number, or a table of strings and/or numbers to file overwrite is an optional parameter, and\
        \ will append the line(s) if absent\n\n**Practical scenario**\n\nAppend structured diagnostic\
        \ values without relying only on the visible message log.\n\n```lua\nfunction onWarningMessage(differentMap,\
        \ distance)\n    logToFile(\"logs/warnings.txt\", {\n        map = getMapName(),\n        differentMap\
        \ = differentMap,\n        distance = distance\n    }, false)\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: Path relative to the script/tool data directory.
                text:
                  description: Any Lua value.
                  oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: object
                  - type: array
                    items: {}
                'false':
                  type: boolean
                  description: Value passed to the `false` parameter.
              required:
              - file
              - text
              - 'false'
            example:
              file: logs/script.txt
              text: {}
              'false': true
      responses:
        '204':
          description: No Lua return value.
      x-lua-signature: logToFile(file, text, false)
      x-codeSamples:
      - lang: Lua
        source: "function onWarningMessage(differentMap, distance)\n    logToFile(\"logs/warnings.txt\"\
          , {\n        map = getMapName(),\n        differentMap = differentMap,\n        distance = distance\n\
          \    }, false)\nend"
  /lua/file-apis/readlinesfromfile:
    post:
      tags:
      - File APIs
      operationId: readLinesFromFile
      summary: readLinesFromFile()
      description: "**Lua global function**\n\n```lua\nresult = readLinesFromFile(file)\n```\n\nReturns\
        \ a table of every line in file\n\n**Practical scenario**\n\nUse script-local files for small\
        \ persistent state or diagnostics. Handle missing/empty data before indexing returned lines.\n\
        \n```lua\nfunction onStart()\n    function onStart()\n    local result = readLinesFromFile(\"\
        logs/script.txt\")\n    if result ~= nil then\n        log(\"File API completed.\")\n    end\n\
        end\n    if result ~= nil then\n        log(\"File API completed.\")\n    end\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: Path relative to the script/tool data directory.
              required:
              - file
            example:
              file: logs/script.txt
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example: []
      x-lua-signature: result = readLinesFromFile(file)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    local result = readLinesFromFile(\"logs/script.txt\"\
          )\n    if result ~= nil then\n        log(\"File API completed.\")\n    end\nend\n    if result\
          \ ~= nil then\n        log(\"File API completed.\")\n    end\nend"
  /lua/pc-storage/refreshpcbox:
    post:
      tags:
      - PC storage
      operationId: refreshPCBox
      summary: refreshPCBox()
      description: "**Lua global function**\n\n```lua\nresult = refreshPCBox(boxId)\n```\n\nRequest a\
        \ refresh for the specified PC box. The response can be a full box snapshot, a metadata-only update,\
        \ or a delta update. Use `isCurrentPCBoxRefreshed()` before reading the refreshed contents immediately\
        \ after this call.\n\n**Practical scenario**\n\nPC actions are asynchronous. Issue one operation,\
        \ return, and wait for the next server refresh before making a dependent change.\n\n```lua\nfunction\
        \ onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n    end\n\n   \
        \ function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n    end\n\
        \n    local result = refreshPCBox(1)\n    return\nend\n    return\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boxId:
                  type: integer
                  description: One-based PC box number.
              required:
              - boxId
            example:
              boxId: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = refreshPCBox(boxId)
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isPCOpen() then\n        usePC()\n        return\n\
          \    end\n\n    function onPathAction()\n    if not isPCOpen() then\n        usePC()\n     \
          \   return\n    end\n\n    local result = refreshPCBox(1)\n    return\nend\n    return\nend"
  /lua/file-apis/tradegivemoney:
    post:
      tags:
      - File APIs
      operationId: tradeGiveMoney
      summary: tradeGiveMoney()
      description: "**Lua global function**\n\n```lua\nresult = tradeGiveMoney(username, money)\n```\n\
        \nUsed to trade money With Parameters Username and Money\n\n**Practical scenario**\n\nUse only\
        \ inside the intended trade flow and validate the recipient and amount.\n\n```lua\nfunction prepareTrade()\n\
        \    local ok = tradeGiveMoney(\"TrustedPlayer\", 15000)\n    log(\"Money offer prepared: \" ..\
        \ tostring(ok))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: Value passed to the `username` parameter.
                money:
                  type: integer
                  description: Value passed to the `money` parameter.
              required:
              - username
              - money
            example:
              username: value
              money: 15
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = tradeGiveMoney(username, money)
      x-codeSamples:
      - lang: Lua
        source: "function prepareTrade()\n    local ok = tradeGiveMoney(\"TrustedPlayer\", 15000)\n  \
          \  log(\"Money offer prepared: \" .. tostring(ok))\nend"
  /lua/file-apis/tradeacceptmoney:
    post:
      tags:
      - File APIs
      operationId: tradeAcceptMoney
      summary: tradeAcceptMoney()
      description: "**Lua global function**\n\n```lua\nresult = tradeAcceptMoney()\n```\n\nLua function\
        \ `tradeAcceptMoney`.\n\n**Practical scenario**\n\nUse script-local files for small persistent\
        \ state or diagnostics. Handle missing/empty data before indexing returned lines.\n\n```lua\n\
        function onStart()\n    function onStart()\n    local result = tradeAcceptMoney()\n    if result\
        \ ~= nil then\n        log(\"File API completed.\")\n    end\nend\n    if result ~= nil then\n\
        \        log(\"File API completed.\")\n    end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = tradeAcceptMoney()
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    local result = tradeAcceptMoney()\n \
          \   if result ~= nil then\n        log(\"File API completed.\")\n    end\nend\n    if result\
          \ ~= nil then\n        log(\"File API completed.\")\n    end\nend"
  /lua/bot-configuration/setafktimeout:
    post:
      tags:
      - Bot configuration
      operationId: setAfkTimeout
      summary: setAfkTimeout()
      description: "**Lua global function**\n\n```lua\nresult = setAfkTimeout(value)\n```\n\nSets afk\
        \ timeout for BOT\n\n**Practical scenario**\n\nSet this during startup or when changing modes,\
        \ rather than writing it every frame.\n\n```lua\nfunction onStart()\n    function onStart()\n\
        \    local result = setAfkTimeout(1)\nend\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: integer
                  description: Value to store or send.
              required:
              - value
            example:
              value: 1
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = setAfkTimeout(value)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    function onStart()\n    local result = setAfkTimeout(1)\nend\n\
          end"
  /lua/chat/closechannel:
    post:
      tags:
      - Chat
      operationId: closeChannel
      summary: closeChannel()
      description: "**Lua global function**\n\n```lua\nresult = closeChannel(name)\n```\n\nClose channel\
        \ chat by name\n\n**Practical scenario**\n\nClose a channel by its visible name when the script\
        \ no longer needs it.\n\n```lua\nfunction onStart()\n    local closed = closeChannel(\"Trade\"\
        )\n    log(\"Trade channel closed: \" .. tostring(closed))\nend\n```"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the option, hook, variable, or resource.
              required:
              - name
            example:
              name: value
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = closeChannel(name)
      x-codeSamples:
      - lang: Lua
        source: "function onStart()\n    local closed = closeChannel(\"Trade\")\n    log(\"Trade channel\
          \ closed: \" .. tostring(closed))\nend"
  /lua/notifications/sendnotification:
    post:
      tags:
      - Notifications
      operationId: sendNotification
      summary: sendNotification()
      description: "**Lua global function**\n\n```lua\nresult = sendNotification(templateName)\n```\n\n\
        Send a configured notification template by name or id. Built-in variables such as `{player}`,\
        \ `{map}`, `{x}`, `{y}`, `{account}`, `{server}`, `{bot}`, `{time}`, `{date}`, and `{datetime}`\
        \ are filled automatically when available. The template's configured target controls whether it\
        \ goes to personal Discord, the built-in PROCatchem Discord channel, Telegram, or all enabled\
        \ channels. Returns `false` only when notifications are disabled or the template cannot be found;\
        \ network delivery is asynchronous.\n\n**Practical scenario**\n\nSend notifications only for meaningful\
        \ events to avoid duplicate alerts from callbacks that run repeatedly.\n\n```lua\nfunction onSystemMessage(message)\n\
        \    if stringContains(message, \"Caught\") then\n        function onSystemMessage(message)\n\
        \    if stringContains(message, \"Caught\") then\n        local ok = sendNotification(\"Shiny\
        \ found\")\n    end\nend\n    end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendNotification(templateName)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        local ok = sendNotification(\"Shiny found\")\n    end\nend\n    end\nend"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateName:
                  type: string
                  description: Template display name or stable template id.
              required:
              - templateName
            example:
              templateName: Shiny found
  /lua/notifications/sendnotificationwith:
    post:
      tags:
      - Notifications
      operationId: sendNotificationWith
      summary: sendNotificationWith()
      description: "**Lua global function**\n\n```lua\nresult = sendNotificationWith(templateName, values)\n\
        ```\n\nSend a configured notification template and override/add template variables using a Lua\
        \ table. Table keys should match template variables without braces. Per-call values override built-ins,\
        \ runtime variables set by `setNotifyVar`, global variables, and template defaults.\n\n**Practical\
        \ scenario**\n\nSend notifications only for meaningful events to avoid duplicate alerts from callbacks\
        \ that run repeatedly.\n\n```lua\nfunction onSystemMessage(message)\n    if stringContains(message,\
        \ \"Caught\") then\n        function onSystemMessage(message)\n    if stringContains(message,\
        \ \"Caught\") then\n        local ok = sendNotificationWith(\"Shiny found\", { pokemon = \"Gyarados\"\
        , level = \"30\" })\n    end\nend\n    end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendNotificationWith(templateName, values)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        local ok = sendNotificationWith(\"Shiny found\", { pokemon = \"Gyarados\", level =\
          \ \"30\" })\n    end\nend\n    end\nend"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateName:
                  type: string
                  description: Template display name or stable template id.
                values:
                  $ref: '#/components/schemas/NotificationVariables'
                  description: Lua table containing template variables.
              required:
              - templateName
              - values
            example:
              templateName: Shiny found
              values:
                pokemon: Gyarados
                level: '30'
                map: Route 22
  /lua/notifications/sendnotificationto:
    post:
      tags:
      - Notifications
      operationId: sendNotificationTo
      summary: sendNotificationTo()
      description: "**Lua global function**\n\n```lua\nresult = sendNotificationTo(templateName, target)\n\
        ```\n\nSend a configured notification template while overriding its delivery target for this one\
        \ call. Accepted targets are `personal`, `discord`, `procatchem`, `telegram`, and `all`. `all`\
        \ falls back to the template's configured target, which defaults to all enabled channels.\n\n\
        **Practical scenario**\n\nSend notifications only for meaningful events to avoid duplicate alerts\
        \ from callbacks that run repeatedly.\n\n```lua\nfunction onSystemMessage(message)\n    if stringContains(message,\
        \ \"Caught\") then\n        function onSystemMessage(message)\n    if stringContains(message,\
        \ \"Caught\") then\n        local ok = sendNotificationTo(\"Bot stopped\", \"personal\")\n   \
        \ end\nend\n    end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendNotificationTo(templateName, target)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        local ok = sendNotificationTo(\"Bot stopped\", \"personal\")\n    end\nend\n    end\n\
          end"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateName:
                  type: string
                  description: Template display name or stable template id.
                target:
                  $ref: '#/components/schemas/NotificationTarget'
                  description: Notification delivery target.
              required:
              - templateName
              - target
            example:
              templateName: Bot stopped
              target: procatchem
  /lua/notifications/sendnotificationwithto:
    post:
      tags:
      - Notifications
      operationId: sendNotificationWithTo
      summary: sendNotificationWithTo()
      description: "**Lua global function**\n\n```lua\nresult = sendNotificationWithTo(templateName, values,\
        \ target)\n```\n\nSend a configured notification template, pass template variables, and override\
        \ the delivery target for this one call. This is the most explicit notification helper for scripts\
        \ that need to route different alerts to different channels.\n\n**Practical scenario**\n\nSend\
        \ notifications only for meaningful events to avoid duplicate alerts from callbacks that run repeatedly.\n\
        \n```lua\nfunction onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
        \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
        \        local ok = sendNotificationWithTo(\"Shiny found\", { pokemon = \"Gyarados\", level =\
        \ \"30\" }, \"procatchem\")\n    end\nend\n    end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = sendNotificationWithTo(templateName, values, target)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        local ok = sendNotificationWithTo(\"Shiny found\", { pokemon = \"Gyarados\", level\
          \ = \"30\" }, \"procatchem\")\n    end\nend\n    end\nend"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateName:
                  type: string
                  description: Template display name or stable template id.
                values:
                  $ref: '#/components/schemas/NotificationVariables'
                  description: Lua table containing template variables.
                target:
                  $ref: '#/components/schemas/NotificationTarget'
                  description: Notification delivery target.
              required:
              - templateName
              - values
              - target
            example:
              templateName: Shiny found
              values:
                pokemon: Gyarados
                level: '30'
              target: procatchem
  /lua/notifications/notify:
    post:
      tags:
      - Notifications
      operationId: notify
      summary: notify()
      description: "**Lua global function**\n\n```lua\nresult = notify(message)\n```\n\nSend a quick plain-text\
        \ notification without using a configured template. Use this for simple alerts where you do not\
        \ need title/body formatting or template variables. Returns immediately after queueing the asynchronous\
        \ send.\n\n**Practical scenario**\n\nSend notifications only for meaningful events to avoid duplicate\
        \ alerts from callbacks that run repeatedly.\n\n```lua\nfunction onSystemMessage(message)\n  \
        \  if stringContains(message, \"Caught\") then\n        function onSystemMessage(message)\n  \
        \  if stringContains(message, \"Caught\") then\n        local ok = notify(\"PROCatchem: script\
        \ reached Cerulean City.\")\n    end\nend\n    end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = notify(message)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        local ok = notify(\"PROCatchem: script reached Cerulean City.\")\n    end\nend\n  \
          \  end\nend"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Plain text message to send.
              required:
              - message
            example:
              message: 'PROCatchem: script reached Cerulean City.'
  /lua/notifications/setnotifyvar:
    post:
      tags:
      - Notifications
      operationId: setNotifyVar
      summary: setNotifyVar()
      description: "**Lua global function**\n\n```lua\nsetNotifyVar(name, value)\n```\n\nSet a runtime\
        \ notification variable. The variable can be used in any template as `{name}` until it is overwritten\
        \ or cleared with `clearNotifyVars()`. Values are converted to strings.\n\n**Practical scenario**\n\
        \nSend notifications only for meaningful events to avoid duplicate alerts from callbacks that\
        \ run repeatedly.\n\n```lua\nfunction onSystemMessage(message)\n    if stringContains(message,\
        \ \"Caught\") then\n        function onSystemMessage(message)\n    if stringContains(message,\
        \ \"Caught\") then\n        setNotifyVar(\"hunt\", \"Shiny Magikarp\")\n    end\nend\n    end\n\
        end\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: 'null'
                description: No return value.
              example: null
      x-lua-signature: setNotifyVar(name, value)
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        setNotifyVar(\"hunt\", \"Shiny Magikarp\")\n    end\nend\n    end\nend"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Variable name without braces.
                value:
                  $ref: '#/components/schemas/LuaValue'
                  description: Value to store or send.
              required:
              - name
              - value
            example:
              name: hunt
              value: Shiny Magikarp
  /lua/notifications/clearnotifyvars:
    post:
      tags:
      - Notifications
      operationId: clearNotifyVars
      summary: clearNotifyVars()
      description: "**Lua global function**\n\n```lua\nclearNotifyVars()\n```\n\nClear all runtime notification\
        \ variables previously set with `setNotifyVar`. Built-in variables and configured template/default\
        \ variables are not removed.\n\n**Practical scenario**\n\nSend notifications only for meaningful\
        \ events to avoid duplicate alerts from callbacks that run repeatedly.\n\n```lua\nfunction onSystemMessage(message)\n\
        \    if stringContains(message, \"Caught\") then\n        function onSystemMessage(message)\n\
        \    if stringContains(message, \"Caught\") then\n        clearNotifyVars()\n    end\nend\n  \
        \  end\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: 'null'
                description: No return value.
              example: null
      x-lua-signature: clearNotifyVars()
      x-codeSamples:
      - lang: Lua
        source: "function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        function onSystemMessage(message)\n    if stringContains(message, \"Caught\") then\n\
          \        clearNotifyVars()\n    end\nend\n    end\nend"
  /lua/legacy-special-actions/usesurf:
    post:
      tags:
      - Legacy special actions
      operationId: useSurf
      summary: useSurf()
      description: "**Lua global function**\n\n```lua\nresult = useSurf()\n```\n\nStart surfing from the\
        \ current position. If `setWaterMount()` configured a water mount, the tool uses that mount item;\
        \ otherwise it sends the normal `/surf` action. Pathfinding also calls this automatically when\
        \ a route transitions from ground to water.\n\n**Practical scenario**\n\nCall this at the shoreline\
        \ when a scripted route needs to enter water. Pathfinding may also trigger it automatically.\n\
        \n```lua\nfunction onPathAction()\n    if not isSurfing() then\n        useSurf()\n        return\n\
        \    end\n\n    moveToWater()\nend\n```"
      responses:
        '200':
          description: Lua return value.
          content:
            application/json:
              schema:
                type: boolean
              example: true
      x-lua-signature: result = useSurf()
      x-codeSamples:
      - lang: Lua
        source: "function onPathAction()\n    if not isSurfing() then\n        useSurf()\n        return\n\
          \    end\n\n    moveToWater()\nend"
