Skip to content

function attackPlayer (client-side)

Available since version: 0.1.3


The victim will receive damage calculated damage by the game.

This function is used to force npc to melee attack the other npc.


bool attackPlayer(int attackerId, int victimId, int type)


  • int attackerId: the attacker id.
  • int victimId: the victim id.
  • int type: the id of the hit type. For more information see Attack constants.

Returns bool

true if attack was successfully executed, otherwise false.