# packet

### `sendKeepAlive(key): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>key</code></td><td><code>Number</code></td><td>The keepalive key.</td></tr></tbody></table>

Sends a C00 KeepAlive.

### `sendMessage(msg): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>msg</code></td><td><code>String</code></td><td>The message to send.</td></tr></tbody></table>

Sends a C01 ChatMessage.

### `sendUseEntity(entity, action): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>entity</code></td><td><a href="/pages/wnxBMuEKnatIQ29KQ3mj"><code>Entity</code></a> <code>| Number</code></td><td>The entity.</td></tr><tr><td><code>action</code></td><td><code>string |</code> <a href="/pages/nG2WRgstZPIHX1Bp2bdi"><code>Vec3</code></a></td><td>The value of C02PacketUseEntity.Action <code>enum</code> if string, hitvec otherwise.</td></tr></tbody></table>

Sends a C02 UseEntity.

### `sendPosition(x, y, z, yaw, pitch, ground): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x?</code></td><td><code>Number</code></td><td>X position. <strong>Must be present alongside Y and Z parameters.</strong></td></tr><tr><td><code>y?</code></td><td><code>Number</code></td><td>Y position. <strong>Must be present alongside X and Z parameters.</strong></td></tr><tr><td><code>z?</code></td><td><code>Number</code></td><td>Z position. <strong>Must be present alongside X and Y parameters.</strong></td></tr><tr><td><code>yaw?</code></td><td><code>Number</code></td><td>Yaw angle rotation. <strong>Must be present alongside X, Y, Z and Pitch parameters.</strong></td></tr><tr><td><code>pitch?</code></td><td><code>Number</code></td><td>Pitch angle rotation. <strong>Must be present alongside X, Y, Z and Yaw parameters.</strong></td></tr><tr><td><code>ground</code></td><td><code>Boolean</code></td><td>Whether the player is on ground. <strong>Required parameter</strong></td></tr></tbody></table>

Sends a C03/C04/C06 Packet. The following method overloads exist: `sendPosition(x, y, z, ground); sendPosition(x, y, z, yaw, pitch, ground); sendPosition(ground)`

### `sendDigging(enumStatus, pos, enumFacing): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>enumStatus</code></td><td><code>string</code></td><td>The C07PacketPlayerDigging.Action <code>enum</code>.</td></tr><tr><td><code>pos</code></td><td><a href="/pages/nG2WRgstZPIHX1Bp2bdi"><code>Vec3</code></a></td><td>Block position.</td></tr><tr><td><code>enumFacing</code></td><td><code>string</code></td><td>The EnumFacing <code>enum</code> value</td></tr></tbody></table>

Sends a C07 PlayerDigging.

### `sendPlacement(pos, direction, x, y, z): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>pos</code></td><td><a href="/pages/nG2WRgstZPIHX1Bp2bdi"><code>Vec3</code></a></td><td>The placement position.</td></tr><tr><td><code>direction</code></td><td><code>Number</code></td><td>The EnumFacing index.</td></tr><tr><td><code>x</code></td><td><code>Number</code></td><td>Facing X.</td></tr><tr><td><code>y</code></td><td><code>Number</code></td><td>Facing Y.</td></tr><tr><td><code>z</code></td><td><code>Number</code></td><td>Facing Z.</td></tr></tbody></table>

Sends a C08 PlayerBlockPlacement.

### `sendChangeItem(slot): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>slot</code></td><td><code>Number</code></td><td>The new slot to switch to.</td></tr></tbody></table>

Sends a C09 HeldItemChange.

### `sendEntityAction(entityId, action): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>entityId</code></td><td><code>Number</code></td><td>The ID of an entity.</td></tr><tr><td><code>action</code></td><td><code>string</code></td><td>The value of C0BPacketEntityAction.Action <code>enum</code>.</td></tr></tbody></table>

Sends a C0B EntityAction.

### `sendInput(strafeSpeed, forwardSpeed, jumping, sneaking): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>strafeSpeed</code></td><td><code>Number</code></td><td>The player's strafe speed.</td></tr><tr><td><code>forwardSpeed</code></td><td><code>Number</code></td><td>The player's forward speed.</td></tr><tr><td><code>jumping</code></td><td><code>Boolean</code></td><td>Whether the player is jumping.</td></tr><tr><td><code>sneaking</code></td><td><code>Boolean</code></td><td>Whether the player is sneaking.</td></tr></tbody></table>

Sends a C0C Input.

### `sendCloseWindow(id): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>Number</code></td><td>The window ID. <strong>This parameter is optional</strong>.</td></tr></tbody></table>

Sends a C0D CloseWindow.

### `sendEnchantItem(window, enchantment): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>Number</code></td><td>The window ID. <strong>This parameter is optional</strong>.</td></tr><tr><td><code>enchantment</code></td><td><code>Number</code></td><td>The enchantment ID.</td></tr></tbody></table>

Sends a C11 EnchantItem.

### `sendTransaction(window, uid, accepted): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>window</code></td><td><code>Number</code></td><td>The window ID.</td></tr><tr><td><code>uid</code></td><td><code>Number</code></td><td>The transaction ID.</td></tr><tr><td><code>accepted</code></td><td><code>Boolean</code></td><td>The transaction's <code>accepted</code> field.</td></tr></tbody></table>

Sends a C0F ConfirmTransaction.

### `sendAbilities(flying, allowFlying, creativeMode): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>flying</code></td><td><code>Boolean</code></td><td>Whether the player is flying. <strong>This parameter is optional.</strong></td></tr><tr><td><code>allowFlying</code></td><td><code>Boolean</code></td><td>Whether the player can be flying. <strong>This parameter is optional.</strong></td></tr><tr><td><code>creativeMode</code></td><td><code>Boolean</code></td><td>Whether the player is in creative. <strong>This parameter is optional.</strong></td></tr></tbody></table>

Sends a C13 PlayerAbilities. With no parameters supplied, this will send the player's current abilities.

### `sendTabComplete(msg, pos): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>msg</code></td><td><code>string</code></td><td>The message.</td></tr><tr><td><code>pos</code></td><td><a href="/pages/nG2WRgstZPIHX1Bp2bdi"><code>Vec3</code></a></td><td>The position.</td></tr></tbody></table>

Sends a C14 TabComplete.

### `sendStatus(status): Undefined`

<table><thead><tr><th>Argument</th><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code></td><td><code>string</code></td><td>The value of C16PacketClientStatus.EnumState</td></tr></tbody></table>

Sends a C16 ClientStatus.

### `sendSettings(): Undefined`

Sends a C15 ClientSettings.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://riseclients-organization.gitbook.io/rise-6-scripting-api/api-documentation/global-namespaces/packet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
