Skip to content

function getPlayerShield

This function will get the equipped player shield.
Original: getPlayerShield

Declaration

async def getPlayerShield(id : int) -> str

Parameters

int id: the player id.

Returns

str: the item instance from Daedalus scripts.

Source code in src/pyg2o/functions/player.py
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
async def getPlayerShield(id : int) -> str:
    """
    This function will get the equipped player shield.
    Original: [getPlayerShield](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerShield/)

    ## Declaration
    ```python
    async def getPlayerShield(id : int) -> str
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `str`: the item instance from Daedalus scripts.
    """
    data = f'return {get_call_repr()}'

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