Skip to content

function isNpcActionFinished

This function checks whether specified NPC action was finished.
Original: isNpcActionFinished

Declaration

async def isNpcActionFinished(npc_id : int, action_id : int) -> bool

Parameters

int npc_id: the identifier of npc.
int action_id: the unique action identifier.

Returns

bool: true if specified action identifier was already finished, otherwise false.

Source code in src/pyg2o/functions/npc.py
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
async def isNpcActionFinished(npc_id : int, action_id : int) -> bool:
    """
    This function checks whether specified NPC action was finished.
    Original: [isNpcActionFinished](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/isNpcActionFinished/)

    ## Declaration
    ```python
    async def isNpcActionFinished(npc_id : int, action_id : int) -> bool
    ```
    ## Parameters
    `int` **npc_id**: the identifier of npc.
    `int` **action_id**: the unique action identifier.
    ## Returns
    `bool`: `true` if specified action identifier was already finished, otherwise `false`.
    """
    data = f'return {get_call_repr()}'

    server = await PythonWebsocketServer.get_server()
    result = await server.make_request(data)
    return result