Skip to content

function npcAttackRanged

This function enqueues attack ranged action to the remote NPC action queue.
Original: npcAttackRanged

Declaration

async def npcAttackRanged(attacker_id : int, enemy_id : int)

Parameters

int attacker_id: the remote npc id.
int enemy_id: the remote npc or player id.

Source code in src/pyg2o/functions/npc.py
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
async def npcAttackRanged(attacker_id : int, enemy_id : int):
    """
    This function enqueues attack ranged action to the remote NPC action queue.
    Original: [npcAttackRanged](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcAttackRanged/)

    ## Declaration
    ```python
    async def npcAttackRanged(attacker_id : int, enemy_id : int)
    ```
    ## Parameters
    `int` **attacker_id**: the remote npc id.
    `int` **enemy_id**: the remote npc or player id.
    """
    data = f'return {get_call_repr()}'

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