You type a rule expression in the Rule editor. If it becomes true, AutoReflex triggers the rule's configured key.
- Cooldown: how often a key can trigger (e.g.
1.0s= at most once per second) - Animation wait: small delay after a keypress to avoid interrupting the action
1) Cast when an enemy is near your cursor
monsterCount.nearCursor(200) > 02) Only when the enemy has a buff
monsterCount.nearCursor(200).hasBuff("contagion") > 03) Buff value / stacks example (exactly 3)
monsterCount.nearCursor(200).hasBuffValue("contagion", 3) > 0-
monsterCount— hostile monsters (default). -
friendlyMonsterCount— friendly monsters (minions, etc). Same fluent filters asmonsterCount.Defaults to hostile (
e_Reaction == 0), alive (e_CurrentHP > 0), awake (e_IsSleeping == 0), within200px of cursor. No implicite_EntityStatefilter — use rawe_EntityStatein advanced rules if you need it (most mobs are0=Nonein the SDK).
Important: the DSL is case-sensitive. Type the keywords exactly as shown.
Add these after the root, like: monsterCount.nearCursor(150) > 0
.nearCursor(N): only count enemies withinNpixels of your cursor (overrides the default of200).type(any|normal|magic|rare|unique|atleastmagic|atleastrare|atleastunique).hasBuff("buff_prefix").notHasBuff("buff_prefix").hasBuffValue("buff_prefix", N): buff charges/stacks value equalsN.hasName("text"): case-insensitive substring match on monster metadata path ("skeleton", etc.)
80–150= very near cursor150–250= near cursor250+= loose
monsterCount.type(magic|rare).nearCursor(200) > 0monsterCount.type(atleastrare).nearCursor(200) > 0You can combine checks using:
and/or/not- Parentheses
()for grouping
Example:
(monsterCount.nearCursor(200).hasBuff("contagion") > 0)
and
(monsterCount.type(atleastrare).nearCursor(120) > 0)If you need player vitals (flasks, defensive skills), use p_* variables:
p_HPPercent,p_ESPercent,p_MPPercent— 0–100p_CurrentHP,p_MaxHP,p_CurrentES,p_MaxES,p_CurrentMP,p_MaxMP
Example — cast when energy shield is below 10%:
p_ESPercent < 10If you need to bypass the default monsterCount filters, use raw entity fields. Available per-entity variables:
e_Reaction—0hostile,2friendlye_CurrentHP,e_MaxHP,e_CurrentES,e_MaxESe_EntityState— SDK:0None,1Useless,2PlayerLeader,3MonsterFriendly,4PinnacleBossHidden (not used by implicitmonsterCount; add manually if needed)e_IsValid,e_IsSleepinge_Rarity—0normal,1magic,2rare,3uniquee_GridPositionX/Y/Z,e_WorldX/Y/Z
- Expression syntax error / Translated: the rule was converted internally and then failed to compile. The
Translated:text shows what AutoReflex actually tried to compile.
If you’re maintaining AutoReflex (performance/correctness), see:
docs/AutoReflex-Internals.md