MARS Client Scripting Library - MarsAction

From Multiverse

Jump to: navigation, search

MarsAction is a module in the Mars Client Scripting API used for interacting with the action system (such as the ActionBar).

Contents

Methods

GetActionInfo

actionInfoList  = GetActionInfo(slotId)

Gets information about the action in the specified slot.

Returns

A list containing information on the action:

  • actionInfoList[0]: action type, a string that is either ability or item.
  • actionInfoList[1]: action name, a string with either the item ID or the ability name.
  • actionInfoList[2]: action sub-type, a string that is currently the same as the action type.

Parameters

Parameter Datatype Default Value Description
slotId int None The index of the action we are checking (1 is the first entry).

GetActionText

actionText = GetActionText(slotId)

Get the name of the action in the slot specified.

Returns

A string containing the name of the ability or item in the specified slot.

Parameters

Parameter Datatype Default Value Description
slotId int None The index of the action we are checking (1 is the first entry).

GetActionTexture

textureName = GetActionTexture(slotId)

Get the texture that should be used for the specified action.

Returns

A string with the texture that should be used for the item or ability in the specified action slot.

Parameters

Parameter Datatype Default Value Description
slotId int None The index of the action we are checking (1 is the first entry).

HasAction

slotUsed = HasAction(slotId)

Checks whether there is an action in the specified slot.

Returns

True if the given slot contains an action, or False if it does not.

Parameters

Parameter Datatype Default Value Description
slotId int None The index of the action slot to check (1 is the first entry).

PickupAction

PickupAction(slotId)

Places the action that was in the specified slot in the cursor, and places the action that was in the cursor in the action slot. If the slot is empty, this method does nothing.

Returns

None

Parameters

Parameter Datatype Default Value Description
slotId int None The index of the action we are picking up (1 is the first entry).

PlaceAction

PlaceAction(slotId)

Places the cursor action in the specified action slot, and the places the action that was in the action slot in the cursor. If the cursor was empty, this method does not do anything.

Returns

None

Parameters

Parameter Datatype Default Value Description
slotId int None The slot in which we are placing the cursor's action.

UseAction

UseAction(slotId, checkCursor, onSelf)

Use the action in the specified slot. This sends the message to the server to use the corresponding ability or activate the corresponding item.

Returns

None

Parameters

Parameter Datatype Default Value Description
slotId int None The slot of the action that we are using.
checkCursor bool None This parameter is not currently used.
onSelf bool None If this parameter is true, we will activate the object on the player, rather than on the player's target.


Events

The MarsAction module does not generates any UI events.

Messages

The MarsAction module does not register for any message types

Personal tools