> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: Ragebot
icon: crosshair
sidebar_position: 4
---

# <ApiPageIcon icon="crosshair" />Ragebot

<ApiExposes data="[{&#x22;k&#x22;:&#x22;NAMESPACE&#x22;,&#x22;c&#x22;:&#x22;fn&#x22;,&#x22;s&#x22;:&#x22;ragebot&#x22;,&#x22;h&#x22;:&#x22;#ragebot-1&#x22;},{&#x22;k&#x22;:&#x22;OBJECT&#x22;,&#x22;c&#x22;:&#x22;method&#x22;,&#x22;s&#x22;:&#x22;ragebot.QuickPeekState&#x22;,&#x22;h&#x22;:&#x22;#ragebotquickpeekstate&#x22;},{&#x22;k&#x22;:&#x22;OBJECT&#x22;,&#x22;c&#x22;:&#x22;method&#x22;,&#x22;s&#x22;:&#x22;ragebot.Shot&#x22;,&#x22;h&#x22;:&#x22;#ragebotshot&#x22;}]" />

<Heading level={2} id="ragebot-1">
  ragebot

  <ApiTag label="global table" />
</Heading>

Provides the ragebot shot information, the state of the anti-aim mouse override, and the state
of the quick peek assist.

<ApiMembers>
  <ApiMember kind="fn" name="ragebot.IsMouseOverrideActive" summary="Returns true if the anti-aim mouse override has a yaw selected." args="" sig="[{&#x22;s&#x22;:&#x22;ragebot.IsMouseOverrideActive&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" nodiscard>
    <ApiNotes>
      Holding the hotkey while the mouse is inside the deadzone does not select a yaw. A selected yaw
      can stay active after the hotkey is released.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="ragebot.GetQuickPeekState" summary="Returns the state of the quick peek assist for the last processed command." args="" sig="[{&#x22;s&#x22;:&#x22;ragebot.GetQuickPeekState&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;ragebot.QuickPeekState&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/input/ragebot#ragebotquickpeekstate&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;ragebot.QuickPeekState&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/input/ragebot#ragebotquickpeekstate&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]" nodiscard>
    <ApiNotes>
      In the `pre_movement` event, this is the state of the previous command, because quick peek runs
      after the event returns. In the `post_movement` and `createmove` events, this is the state of
      the current command.

      Returns nil if the quick peek assist is not active or the local player is dead.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="type" name="ragebot.QuickPeekPhase" summary="The phase of the quick peek assist, returned in `ragebot.GetQuickPeekState`." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]">
    <ApiEnum name="ragebot.QuickPeekPhase" values="[[&#x22;kArmed&#x22;,&#x22;0&#x22;,&#x22;The retreat point is set and the player is not returning to it. If a maximum distance is set in the menu, the point can follow the player.&#x22;],[&#x22;kReturning&#x22;,&#x22;1&#x22;,&#x22;The player is walking back to the retreat point.&#x22;],[&#x22;kHolding&#x22;,&#x22;2&#x22;,&#x22;The player is back at the retreat point and stays there until the weapon can fire again.&#x22;]]" />
  </ApiMember>
</ApiMembers>

## ragebot.QuickPeekState<ApiTag label="object type" />

The state of the quick peek assist, returned by `ragebot.GetQuickPeekState`.

<ApiMembers>
  <ApiMember kind="prop" name="ragebot.QuickPeekState.interpolated_position" summary="The retreat point, smoothed between commands. The built-in circle is drawn at this point. Use it when you draw." ret="[[{&#x22;s&#x22;:&#x22;Vector&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector#vector-1&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.QuickPeekState.phase" summary="The current phase of the quick peek assist." ret="[[{&#x22;s&#x22;:&#x22;ragebot.QuickPeekPhase&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/input/ragebot#ragebot-QuickPeekPhase&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.QuickPeekState.position" summary="The retreat point in world space. It is updated once per command." ret="[[{&#x22;s&#x22;:&#x22;Vector&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector#vector-1&#x22;}]]" />
</ApiMembers>

## ragebot.Shot<ApiTag label="object type" />

A shot record, passed to `events.aim_fire` and `events.aim_ack`. All fields are read-only.
Reading an unknown field throws an error.

<ApiMembers>
  <ApiMember kind="prop" name="ragebot.Shot.aim_point" summary="The chosen point on the target, in world space." ret="[[{&#x22;s&#x22;:&#x22;Vector&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector#vector-1&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.command_number" summary="The command number of the shot." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.damage" summary="The damage registered on the target. It is `-1` if the shot missed and `0` if a damage rejection was detected." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.estimated_damage" summary="The predicted damage at the chosen aim point." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.force_shot" summary="True if the shot was fired with force shot active at perfect accuracy." ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.health_left" summary="The health of the target after the matching hurt event, or `-1` if it is not known." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.hitchance" summary="The estimated hit chance, from 0 to 1. Multiply it by 100 to get a percentage." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.hitgroup" summary="The hitgroup that the server reported, or `-1` if the shot missed." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.manual_shot" summary="True if the user forced the shot with a manual attack." ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.minimum_damage" summary="The minimum damage required for this target and shot." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.result" summary="The result of the shot, or the reason for the miss." ret="[[{&#x22;s&#x22;:&#x22;ragebot.Shot.Result&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/input/ragebot#ragebot-Shot-Result&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.server_shoot_position" summary="The most likely shoot position that the server used for the shot. It can be inaccurate." ret="[[{&#x22;s&#x22;:&#x22;Vector&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector#vector-1&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.shoot_position" summary="The predicted position in world space from which the shot was aimed." ret="[[{&#x22;s&#x22;:&#x22;Vector&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector#vector-1&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.simulation_time" summary="The simulation tick and fraction of the lag compensation record of the target." ret="[[{&#x22;s&#x22;:&#x22;TickAndInterpolationAmount_t&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/input/cmd#tickandinterpolationamount_t&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.target" summary="The entity index of the player controller of the target." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.tickcount" summary="The tick count of the local player when the shot was fired." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.wanted_hitgroup" summary="The hitgroup of the chosen hitbox of the target." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="ragebot.Shot.weapon" summary="A handle to the weapon. It is not a weapon entity and it is not an entity index." ret="[[{&#x22;s&#x22;:&#x22;userdata&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#userdata&#x22;}]]" />

  <ApiMember kind="type" name="ragebot.Shot.Result" summary="The result of a shot, returned in `ragebot.Shot.result`. A shot that deals damage can still be counted as a miss if the damage is less than the minimum damage of the ragebot." ret="[[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}]]" expand="[{&#x22;n&#x22;:&#x22;&#x22;,&#x22;values&#x22;:[[&#x22;\&#x22;hit\&#x22;&#x22;,&#x22;&#x22;,&#x22;The shot dealt the required damage.&#x22;],[&#x22;\&#x22;death\&#x22;&#x22;,&#x22;&#x22;,&#x22;The local player died before the shot was processed.&#x22;],[&#x22;\&#x22;player death\&#x22;&#x22;,&#x22;&#x22;,&#x22;Another player killed the target before the shot was processed.&#x22;],[&#x22;\&#x22;timeout\&#x22;&#x22;,&#x22;&#x22;,&#x22;The server did not confirm the command of the shot in time.&#x22;],[&#x22;\&#x22;damage rejection\&#x22;&#x22;,&#x22;&#x22;,&#x22;A hit was detected, but the server did not register any damage.&#x22;],[&#x22;\&#x22;unregistered shot\&#x22;&#x22;,&#x22;&#x22;,&#x22;The server did not report a matching shot in time.&#x22;],[&#x22;\&#x22;prediction error\&#x22;&#x22;,&#x22;&#x22;,&#x22;The shot missed because of an engine prediction error. This usually happens in situations that cannot be predicted, for example when the player is slowed down by damage.&#x22;],[&#x22;\&#x22;shootpos misprediction\&#x22;&#x22;,&#x22;&#x22;,&#x22;The shoot position was calculated incorrectly.&#x22;],[&#x22;\&#x22;hitchance misprediction\&#x22;&#x22;,&#x22;&#x22;,&#x22;The hit chance was estimated incorrectly.&#x22;],[&#x22;\&#x22;spread\&#x22;&#x22;,&#x22;&#x22;,&#x22;The shot missed because of spread.&#x22;],[&#x22;\&#x22;lagcomp misprediction\&#x22;&#x22;,&#x22;&#x22;,&#x22;The position of the enemy was predicted incorrectly, so the lag compensation state on the server was different from the prediction.&#x22;],[&#x22;\&#x22;lagcomp failure\&#x22;&#x22;,&#x22;&#x22;,&#x22;A prediction error caused wrong timing, so lag compensation failed.&#x22;],[&#x22;\&#x22;occlusion\&#x22;&#x22;,&#x22;&#x22;,&#x22;The penetration simulation was wrong.&#x22;],[&#x22;\&#x22;extrapolation\&#x22;&#x22;,&#x22;&#x22;,&#x22;The position of the enemy was extrapolated incorrectly.&#x22;],[&#x22;\&#x22;unknown\&#x22;&#x22;,&#x22;&#x22;,&#x22;Everything was correct and the shot should have hit, but it did not.&#x22;]]}]" />
</ApiMembers>
