This function gets elements count in NPC action queue.
Original: getNpcActionsCount
Declaration
async def getNpcActionsCount(npc_id : int) -> int
Parameters
int npc_id: the identifier of npc.
Returns
int: The count of elements inside queue, otherwise -1.
Source code in src/pyg2o/functions/npc.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124 | async def getNpcActionsCount(npc_id : int) -> int:
"""
This function gets elements count in NPC action queue.
Original: [getNpcActionsCount](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcActionsCount/)
## Declaration
```python
async def getNpcActionsCount(npc_id : int) -> int
```
## Parameters
`int` **npc_id**: the identifier of npc.
## Returns
`int`: The count of elements inside queue, otherwise `-1`.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|