Lua API
On this page

ACCombat

Inherits from

Combat stuff. This is an experimental api and may change / move in the future.

Fields:

AttackHeight AttackHeight

Your current attack height. You can set this value to change the height future attacks use.

AttackInProgress boolean

read only

Wether or not you are currrently attacking something with melee or missile attacks

AttackPower number

Your current attack power / accuracy for melee / missile attacks. You can set this value to change the power / accuracy future attacks use. 0 is minimum, 1 is maximum.

RepeatAttacks boolean

Returns true if the client is set to automatically repeat attacks.

Constructors:

New() :

Methods:

Attack(objectId: number, options?: ActionOptions = nil, callback?: fun(ACAttackAction) : nil = nil) : ACAttackAction

Turn your character to the specified heading, in degrees.

Parameters:
NameTypeDefaultSummary
objectIdnumber

The id of the object to attack

optionsActionOptionsnil

Action options

callbackfun(ACAttackAction) : nil nil

Called when the action completes

CancelAttack(options?: ActionOptions = nil, callback?: fun(ACCancelAttackAction) : nil = nil) : ACCancelAttackAction

Cancel your current attack.

Parameters:
NameTypeDefaultSummary
optionsActionOptionsnil

Action options

callbackfun(ACCancelAttackAction) : nil nil

Called when the action completes

GetPropertyKeys() : string[]

Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts

Returns:string[]

IsAttackable(objectId: number) : boolean

Check if the specified object is attackable.

Parameters:
NameTypeDefaultSummary
objectIdnumber

The id of the object to check

Returns:boolean

ToString() : string

Returns a string that represents the current object.

Returns:string