This function gets information about element on specified index in NPC action queue.
Original: getNpcAction
Declaration
async def getNpcAction(npc_id : int, index : int) -> dict
Parameters
int npc_id: the identifier of npc.
int index: the index of element in the queue.
Returns
dict {type, id, status}: The table containing information about selected element.
Source code in src/pyg2o/functions/npc.py
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84 | async def getNpcAction(npc_id : int, index : int) -> dict:
"""
This function gets information about element on specified index in NPC action queue.
Original: [getNpcAction](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcAction/)
## Declaration
```python
async def getNpcAction(npc_id : int, index : int) -> dict
```
## Parameters
`int` **npc_id**: the identifier of npc.
`int` **index**: the index of element in the queue.
## Returns
`dict {type, id, status}`: The table containing information about selected element.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|