Violet

Flame

On this page

core.flame controls Auto Flame through the same settings as the web menu. It rerolls additional options until the item's combat-power score improves over its score at the start of the run, or a limit or failure stops the run. Put the target in a positive slot in your Equip inventory before starting.

Choose source = "inventory" to spend flame items, or source = "mesos" to pay mesos directly. Mesos mode does not require flame items. Each meso roll currently costs 3,000,000 mesos; the run checks the game's cost and your balance before requesting another roll. Both modes obey max_flames; mesos mode also obeys max_mesos. Auto Flame never switches payment source when the selected source runs out.

While the character is busy with another action, Auto Flame waits and sends the next roll once it is free, so a run can continue while you farm. A request that produced no roll and spent nothing is sent again a few times before the run gives up.

The target, payment source and limits are fixed for an active run. Stop the run and wait for is_running() to become false before starting another. An accepted start or a sent request does not mean the server accepted a roll; check the final result.

Functions

core.flame.start([opts: table]) -> boolean, string?

Available on GMS

Starts Auto Flame with optional slot, source ("inventory" or "mesos"), item_id, max_flames and max_mesos. Omitted fields keep their configured values. All options are validated before any setting changes; returns false, error for invalid options or an active/stopping run. A run started from a script always keeps a better roll automatically, whatever the web menu's When a roll is better choice is.

FieldTypeDescription
slotnumberPositive Equip inventory slot, an integer from 1 to 32767. Required if no slot is configured. Equipped items cannot be targeted.
sourcestring"inventory" or "mesos". Default configuration is "inventory"; omission preserves the selected source.
item_idnumberFlame item ID for inventory mode; 0 uses any available supported flame. An integer from 0 to 5100000; nonzero IDs must be supported flames in inventory mode. Ignored for payment in mesos mode.
max_flamesnumberMaximum rolls in either mode, an integer from 0 to 999999; default 10. 0 means no roll limit: the run ends on its other stop conditions, such as running out of flames or reaching max_mesos.
max_mesosnumberTotal budget in full mesos, an integer from 3000000 to 29997000000; default 30000000. A budget need not be a multiple of the roll cost; the unused remainder is not spent.

Numeric strings, fractions, non-finite numbers, unknown options and non-table opts are rejected. nil or an omitted options table uses the current configuration. A valid item ID may still have no matching usable item; that is reported through the run result.

true means the run was enabled. Item eligibility, available funds/items and the roll outcome are checked as it executes.

lua
local ok, err = core.flame.start({
    slot = 5,
    source = "mesos",
    max_flames = 20,
    max_mesos = 30000000,
})
if not ok then core.log_error(err) end

At the current cost, this budget allows at most ten meso rolls even though the roll cap is twenty.

lua
local ok, err = core.flame.start({
    slot = 5,
    source = "inventory",
    item_id = 0,
    max_flames = 50,
})
if not ok then core.log_error(err) end

core.flame.stop() -> boolean

Available on GMS

Requests a stop without another paid roll. An outstanding request may still finish; is_running() stays true while it is being settled. Auto Flame chooses the strongest eligible offered result when settling a selection, including the original when available. Returns false if Auto Flame is unavailable; safe when already stopped. Final counters and the result remain available.

core.flame.is_running() -> boolean

Available on GMS

Returns true while enabled or settling an outstanding operation after a stop request. Wait for false before starting another run.

core.flame.get_status() -> table | nil

Available on GMS

Returns the current run snapshot, including source, mesos_spent, meso_cost, max_mesos and retained final counters/result. Returns nil if Auto Flame is unavailable. Read the final result even when running is false.

FieldTypeDescription
runningbooleanWhether enabled or settling an outstanding operation.
statestring"idle", "waiting_result", "evaluating_roll", "waiting_commit", "checking_result", "awaiting_choice", "paused" or "stopping".
sourcestring"inventory" or "mesos" for this run.
slotnumberEquip inventory slot for this run.
flames_usednumberRolls confirmed by a matching server result.
run_start_cpnumberTarget's combat-power score at run start.
current_cpnumberLatest confirmed score of the target.
baseline_cpnumberRun-start score used to judge improvement.
mesos_spentnumberConfirmed meso rolls multiplied by the game's per-roll cost; 0 in inventory mode.
meso_costnumberCost per meso roll reported for this run.
max_mesosnumberThis run's meso budget.
resulttableDetailed live or final result, shared with the web menu.

result uses camelCase fields: status, running, state, source, slot, flamesUsed, oldCp, newCp, baselineCp, mesosSpent, mesoCost, maxMesos, and maxFlames. Unavailable fields may be absent. Final run values remain available after it stops.

While status is awaiting_choice, result.choiceOldCp gives the current item's score for the Before/After choice, including after you continue from an earlier pick. Compare it with newCp; oldCp remains the run-start comparison score. Older cores may omit choiceOldCp.

result.statusMeaning
flamingWaiting for a requested roll.
rollingEvaluating a roll or preparing another.
selectingSettling a selected result.
stoppingStop requested; settling the outstanding operation.
waitingThe character is busy; the next roll is sent once it is free.
retryingThe last request produced no roll and spent nothing; it is being sent again.
awaiting_choiceA better roll is waiting for the player to choose Before or After. Only web menu runs set to Ask me first pause here.
pausedThe player made their pick; nothing rolls until they continue or stop the run from the web menu.
doneA confirmed result improved over the run-start score.
stoppedStopped without requesting another roll.
max_reachedThe roll cap prevents another attempt. Never reported when max_flames is 0.
budget_reachedThe remaining meso budget cannot cover another roll.
insufficient_mesoThe character cannot afford another meso roll.
no_flamesInventory mode has no matching usable flame.
item_not_foundThe target item is unavailable.
item_equippedThe target is equipped; use a positive inventory slot.
invalid_configThe configured target, source or limits are invalid.
native_unavailableThe game's flame operation or cost is unavailable.
request_rejectedThe client kept refusing the request after several retries.
response_rejectedThe server response did not accept the operation, including after retries.
timeoutThe outcome could not be confirmed in time. A retry is sent only while no roll is pending and the flame or mesos for that request are still unspent.
pending_selectionA result selection needs attention before another run can begin.
target_changedThe target changed during the run.
character_changedThe active character changed.
disconnectedThe game left the run's valid play state.

After timeout or pending_selection, inspect the item and any open flame result before starting again. Counters include confirmed results only: a timeout does not prove that the roll failed or that its currency was refunded, even if mesos_spent remains zero.

Example: report a meso run's final result

The example checks completion after starting and reports the retained result when the run is no longer active.

lua
plugin = {
    name = "Flame Watchdog",
    version = "2.0.0",
    author = "you",
    description = "Runs Auto Flame with a meso budget and reports completion",
    load = true,
}

local started = false
local reported = false

function on_tick(stage)
    if reported then return end

    if not started then
        if stage ~= core.stage.FIELD then return end
        local ok, err = core.flame.start({
            slot = 5,
            source = "mesos",
            max_flames = 10,
            max_mesos = 30000000,
        })
        if not ok then
            core.log_error(err)
            reported = true
            return
        end
        started = true
    end

    local s = core.flame.get_status()
    if not s or s.running then return end

    reported = true
    local outcome = s.result and s.result.status or "unknown"
    core.log(string.format("Auto Flame %s: confirmed rolls=%d, mesos=%.0f, CP %.0f -> %.0f",
        outcome, s.flames_used, s.mesos_spent, s.run_start_cp, s.current_cp))
end