Violet

Auto Farm

On this page

Reads and switches Auto Farm, the Rotation Builder's farmer. Auto Farm picks the best spot on the current map, goes there and attacks whatever is in reach, and follows the character to the next map. Its switch is saved with your settings, so Auto Farm left on starts again after you log in, reconnect or restart the game.

Keys and scripts while it farms

Your own keys still reach the game while Auto Farm farms, and so do scripts' key presses: core.input.press_key(), hold_key(), release_key(), use_item(), use_skill() and call_wndproc() work as usual. Calls that move the character, such as core.input.teleport(), move_x() or core.nav.path_to(), are refused with Rotation Builder owns the input while Auto Farm is active.

Functions

core.farm.is_enabled() -> boolean

Returns true while Auto Farm is switched on, including while it waits to get into the game or for a map where monsters spawn.


core.farm.is_active() -> boolean

Returns true while Auto Farm is moving the character and attacking on the current map. Returns false while it waits, while it changes maps or starts over, and while it is switched off.


core.farm.status() -> table

Returns what Auto Farm is doing right now:

FieldTypeDescription
enabledbooleanAuto Farm is switched on
activebooleanSame as is_active()
statestringWhat it is doing; see the table below
map_idnumberThe map it is farming or waiting on; 0 when it is off
killsnumberMonsters killed since it last started on this map
run_secondsnumberSeconds since it last started on this map
StateMeaning
offAuto Farm is switched off
not_in_gameWaiting for the character to be in the game
busyWaiting while a loop or another feature uses the character
no_monstersWaiting for a map where monsters spawn
no_attack_keyWaiting: put an attack skill on a hotkey
no_jump_keyWaiting: put Jump on a hotkey
idleFarming, with nothing to hit from any spot it can reach
travellingHeading for the spot it chose
attackingAttacking from its spot
attack_refusedThe game is not taking the attack (MP, a cooldown or a status); it tries again every second
changing_mapThe map changed; it starts again once the next map has loaded
deadThe character died; it starts again once the character is back up
restartingStarting over; it carries on in a moment
pausedAnother feature is using the character (the map rusher, Evasion, the lie detector or an auto-sell trip); it starts again once that is done

core.farm.start()

Switches Auto Farm on, the same as Start on the Farm page. It starts once the character is in the game on a map where monsters spawn, and stays on, also after logging in again, until it is switched off.


core.farm.stop()

Switches Auto Farm off, the same as Stop on the Farm page. The switch is saved, so Auto Farm stays off at the next login too.

Example

lua
local was_active = false

function on_tick(stage)
    local active = core.farm.is_active()
    if active ~= was_active then
        was_active = active
        core.log(active and "Auto Farm is farming" or ("Auto Farm: " .. core.farm.status().state))
    end
end