Skip to content

function unequipItem

Note

If you want to unequip weapon/shield, first make sure that player is in WEAPONMODE_NONE.

This function is used to unequip item from player for all players.
Original: unequipItem

Declaration

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

Parameters

int id: the player id.
str instance: the item instance from Daedalus scripts.

Source code in src/pyg2o/functions/player.py
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
async def unequipItem(id : int, instance : str):
    """
    !!! note
        If you want to unequip weapon/shield, first make sure that player is in `WEAPONMODE_NONE`.
    This function is used to unequip item from player for all players.
    Original: [unequipItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/unequipItem/)

    ## Declaration
    ```python
    async def unequipItem(id : int, instance : str)
    ```
    ## Parameters
    `int` **id**: the player id.
    `str` **instance**: 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