Skip to content

function removeItem

This function is used to remove item from player.
Original: removeItem

Declaration

async def removeItem(id : int, instance : str, amount : int)

Parameters

int id: the player id.
str instance: the item instance from Daedalus scripts.
int amount: the amount of item, e.g: 1000 gold coins.

Source code in src/pyg2o/functions/player.py
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
async def removeItem(id : int, instance : str, amount : int):
    """
    This function is used to remove item from player.
    Original: [removeItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/removeItem/)

    ## Declaration
    ```python
    async def removeItem(id : int, instance : str, amount : int)
    ```
    ## Parameters
    `int` **id**: the player id.
    `str` **instance**: the item instance from Daedalus scripts.
    `int` **amount**: the amount of item, e.g: `1000` gold coins.
    """
    data = f'return {get_call_repr()}'

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