Skip to content

function setPlayerInstance

This function will set the player instance for all players. Instance describes the player attributes, like visual, stats, and more.. You can find more information about npc instances in daedalus scripts.
Original: setPlayerInstance

Declaration

async def setPlayerInstance(id : int, instance : str)

Parameters

int id: the player id.
str instance: the new player instance.

Source code in src/pyg2o/functions/player.py
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
async def setPlayerInstance(id : int, instance : str):
    """
    This function will set the player instance for all players. Instance describes the player attributes, like visual, stats, and more.. You can find more information about npc instances in daedalus scripts.
    Original: [setPlayerInstance](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerInstance/)

    ## Declaration
    ```python
    async def setPlayerInstance(id : int, instance : str)
    ```
    ## Parameters
    `int` **id**: the player id.
    `str` **instance**: the new player instance.
    """
    data = f'return {get_call_repr()}'

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