This function enqueues use closest mob action to the remote NPC action queue.
Original: npcUseClosestMob
Declaration
async def npcUseClosestMob(npc_id : int, sceme : str, target_state : int)
Parameters
int npc_id: the npc identifier.
str sceme: the animation sceme name, e.g: "BENCH" when you want to interact with bench.
int target_state: the target state, use 1 if you want to start interaction and -1 to end it.
Source code in src/pyg2o/functions/npc.py
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287 | async def npcUseClosestMob(npc_id : int, sceme : str, target_state : int):
"""
This function enqueues use closest mob action to the remote NPC action queue.
Original: [npcUseClosestMob](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcUseClosestMob/)
## Declaration
```python
async def npcUseClosestMob(npc_id : int, sceme : str, target_state : int)
```
## Parameters
`int` **npc_id**: the npc identifier.
`str` **sceme**: the animation sceme name, e.g: `"BENCH"` when you want to interact with bench.
`int` **target_state**: the target state, use `1` if you want to start interaction and `-1` to end it.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|