Note
Combo is internal Gothic value. Its behaviour can be sometimes undefined. For example -1 value doesn't work for not humanoid NPCs.
This function enqueues attack melee action to the remote NPC action queue.
Original: npcAttackMelee
Declaration
async def npcAttackMelee(attacker_id : int, enemy_id : int, attack_type : int, combo : int)
Parameters
int attacker_id: the remote npc id.
int enemy_id: the remote npc or player id.
int attack_type: the type of attack.
int combol: the combo sequence. For -1 execute next command immediately.
Source code in src/pyg2o/functions/npc.py
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229 | async def npcAttackMelee(attacker_id : int, enemy_id : int, attack_type : int, combo : int):
"""
!!! note
Combo is internal Gothic value. Its behaviour can be sometimes undefined. For example -1 value doesn't work for not humanoid NPCs.
This function enqueues attack melee action to the remote NPC action queue.
Original: [npcAttackMelee](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcAttackMelee/)
## Declaration
```python
async def npcAttackMelee(attacker_id : int, enemy_id : int, attack_type : int, combo : int)
```
## Parameters
`int` **attacker_id**: the remote npc id.
`int` **enemy_id**: the remote npc or player id.
`int` **attack_type**: the type of attack.
`int` **combol**: the combo sequence. For `-1` execute next command immediately.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|