add PlayerisMoving/Swimming/Rooted functions

This commit is contained in:
avitasia
2026-02-15 10:36:21 -08:00
parent f4a4ce5bb4
commit 13b2bd0d3c
9 changed files with 10074 additions and 9893 deletions
+55
View File
@@ -47,6 +47,10 @@ For custom events, see [EVENTS.md](EVENTS.md). For installation, configuration,
- [GetTrinkets](#gettrinketscopy)
- [GetTrinketCooldown](#gettrinketcooldownslotitemidorname)
- [UseTrinket](#usetrinketslotitemidorname-target)
- [Player State](#player-state)
- [PlayerIsMoving](#playerismoving)
- [PlayerIsRooted](#playerisrooted)
- [PlayerIsSwimming](#playerisswimming)
- [Utility Functions](#utility-functions)
- [DisenchantAll](#disenchantallitemidorname-includesoulbound-or-disenchantallquality-includesoulbound)
---
@@ -1068,6 +1072,57 @@ Will stop channeling early on the next tick if you have queue channeling spells
---
### Player State
#### PlayerIsMoving()
Returns whether the active player is currently moving.
**Returns:**
- `1` if the player is moving (forward, backward, strafing, jumping, falling, pitching, or on spline elevation)
- `nil` if the player is stationary
**Examples:**
```lua
-- Check if player is moving
if PlayerIsMoving() == 1 then
print("Player is moving")
else
print("Player is stationary")
end
```
#### PlayerIsRooted()
Returns whether the active player is currently rooted (unable to move).
**Returns:**
- `1` if the player is rooted
- `nil` if the player is not rooted
**Examples:**
```lua
-- Check if player is rooted
if PlayerIsRooted() == 1 then
print("Player is rooted!")
end
```
#### PlayerIsSwimming()
Returns whether the active player is currently swimming.
**Returns:**
- `1` if the player is swimming
- `nil` if the player is not swimming
**Examples:**
```lua
-- Check if player is swimming
if PlayerIsSwimming() == 1 then
print("Player is swimming")
end
```
---
### Utility Functions
#### DisenchantAll(itemIdOrName, [includeSoulbound]) or DisenchantAll(quality, [includeSoulbound])