Flame
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.
| Field | Type | Description |
|---|---|---|
slot | number | Positive Equip inventory slot, an integer from 1 to 32767. Required if no slot is configured. Equipped items cannot be targeted. |
source | string | "inventory" or "mesos". Default configuration is "inventory"; omission preserves the selected source. |
item_id | number | Flame 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_flames | number | Maximum 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_mesos | number | Total 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.
local ok, err = core.flame.start({
slot = 5,
source = "mesos",
max_flames = 20,
max_mesos = 30000000,
})
if not ok then core.log_error(err) endAt the current cost, this budget allows at most ten meso rolls even though the roll cap is twenty.
local ok, err = core.flame.start({
slot = 5,
source = "inventory",
item_id = 0,
max_flames = 50,
})
if not ok then core.log_error(err) endcore.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.
| Field | Type | Description |
|---|---|---|
running | boolean | Whether enabled or settling an outstanding operation. |
state | string | "idle", "waiting_result", "evaluating_roll", "waiting_commit", "checking_result", "awaiting_choice", "paused" or "stopping". |
source | string | "inventory" or "mesos" for this run. |
slot | number | Equip inventory slot for this run. |
flames_used | number | Rolls confirmed by a matching server result. |
run_start_cp | number | Target's combat-power score at run start. |
current_cp | number | Latest confirmed score of the target. |
baseline_cp | number | Run-start score used to judge improvement. |
mesos_spent | number | Confirmed meso rolls multiplied by the game's per-roll cost; 0 in inventory mode. |
meso_cost | number | Cost per meso roll reported for this run. |
max_mesos | number | This run's meso budget. |
result | table | Detailed 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.status | Meaning |
|---|---|
flaming | Waiting for a requested roll. |
rolling | Evaluating a roll or preparing another. |
selecting | Settling a selected result. |
stopping | Stop requested; settling the outstanding operation. |
waiting | The character is busy; the next roll is sent once it is free. |
retrying | The last request produced no roll and spent nothing; it is being sent again. |
awaiting_choice | A better roll is waiting for the player to choose Before or After. Only web menu runs set to Ask me first pause here. |
paused | The player made their pick; nothing rolls until they continue or stop the run from the web menu. |
done | A confirmed result improved over the run-start score. |
stopped | Stopped without requesting another roll. |
max_reached | The roll cap prevents another attempt. Never reported when max_flames is 0. |
budget_reached | The remaining meso budget cannot cover another roll. |
insufficient_meso | The character cannot afford another meso roll. |
no_flames | Inventory mode has no matching usable flame. |
item_not_found | The target item is unavailable. |
item_equipped | The target is equipped; use a positive inventory slot. |
invalid_config | The configured target, source or limits are invalid. |
native_unavailable | The game's flame operation or cost is unavailable. |
request_rejected | The client kept refusing the request after several retries. |
response_rejected | The server response did not accept the operation, including after retries. |
timeout | The 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_selection | A result selection needs attention before another run can begin. |
target_changed | The target changed during the run. |
character_changed | The active character changed. |
disconnected | The 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.
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