Lua API
On this page

UtilityBelt Lua Globals

module

The UtilityBelt scripting api provides a number of classes / instances / enums / functions as lua globals.

Not all types are exposed and directly accessible as global lua variables. Some types are only returned by calling functions, or accessing class fields. For example, EventArg type classes are generally not ever directly exposed, because you'll never need to directly create them, they will always be provided to you as needed. Types that are not globally exposed won't be listed below, use the site navigation on the left to browser all defined types.

Tip

In most cases the name that a type is exposed as will match the type name, but there are some cases where the name has been changed to prevent conflicts.

In the tables below, you can see the types that are exposed directly, and the names they are expose as.

Instances:

Type
Description

Game

v1.0.0
Game
Game interface exposed to scripting environments as global game. A new game instance is created for each script to make event / hud cleanup easier in the case that a script doesn't clean up after itself.

Actions:

Type
Description

AllegianceBreakAction

v1.0.0
AllegianceBreakAction

AllegianceSwearAction

v1.0.0
AllegianceSwearAction

AttributeAddExperienceAction

v1.0.0
AttributeAddExperienceAction

BlankAction

v1.0.0
BlankAction

CastEquippedWandSpellAction

v2.1.6
CastEquippedWandSpellAction

CastSpellAction

v1.0.0
CastSpellAction

FellowCreateAction

v1.0.0
FellowCreateAction

FellowDisbandAction

v1.0.0
FellowDisbandAction

FellowDismissAction

v1.0.0
FellowDismissAction

FellowQuitAction

v1.0.0
FellowQuitAction

FellowRecruitAction

v1.0.0
FellowRecruitAction

FellowSetLeaderAction

v1.0.0
FellowSetLeaderAction

FellowSetOpenAction

v1.0.0
FellowSetOpenAction

InvokeChatAction

v1.0.0
InvokeChatAction

LoginAction

v1.0.0
LoginAction

LogoutAction

v1.0.0
LogoutAction

ObjectApplyAction

v1.0.0
ObjectApplyAction

ObjectAppraiseAction

v1.0.0
ObjectAppraiseAction

ObjectDropAction

v1.0.0
ObjectDropAction

ObjectGiveAction

v1.0.0
ObjectGiveAction

ObjectInscribeAction

v2.1.11
ObjectInscribeAction

ObjectMoveAction

v1.0.0
ObjectMoveAction

ObjectSelectAction

v1.0.0
ObjectSelectAction

ObjectSplitAction

v2.0.19
ObjectSplitAction

ObjectUseAction

v1.0.0
ObjectUseAction

ObjectWieldAction

v1.0.0
ObjectWieldAction

RunAllOrderedAction

v1.0.0
RunAllOrderedAction

SalvageAction

v1.0.0
SalvageAction

SalvageAddAction

v1.0.0
SalvageAddAction

SendTellByIdAction

v2.0.19
SendTellByIdAction
Send a tell to an object id. This is used for Spell Professors.

SetAutorunAction

v1.0.0
SetAutorunAction

SetCombatModeAction

v1.0.0
SetCombatModeAction

SkillAddExperienceAction

v1.0.0
SkillAddExperienceAction

SkillAdvanceAction

v1.0.0
SkillAdvanceAction

SleepAction

v2.0.23
SleepAction

TradeAcceptAction

v1.0.0
TradeAcceptAction

TradeAddAction

v1.0.0
TradeAddAction

TradeDeclineAction

v1.0.0
TradeDeclineAction

TradeEndAction

v1.0.0
TradeEndAction

TradeResetAction

v1.0.0
TradeResetAction

VendorAddToBuyListAction

v2.0.19
VendorAddToBuyListAction

VendorAddToSellListAction

v2.0.19
VendorAddToSellListAction

VendorBuyAction

v2.0.19
VendorBuyAction

VendorBuyAllAction

v2.0.19
VendorBuyAllAction

VendorClearBuyListAction

v2.0.19
VendorClearBuyListAction

VendorClearSellListAction

v2.0.19
VendorClearSellListAction

VendorSellAction

v2.0.19
VendorSellAction

VendorSellAllAction

v2.0.19
VendorSellAllAction

VitalAddExperienceAction

v1.0.0
VitalAddExperienceAction

Classes:

Type
Description

ActionOptions

v1.0.0
ActionOptions
Options for Queue Actions

DateTime

DateTime
Represents an instant in time, typically expressed as a date and time of day.

Regex

Regex
Represents an immutable regular expression.

TimeSpan

TimeSpan
Represents a time interval.

Vector2

Vector2
Represents a vector with two single-precision floating-point values.

Vector3

Vector3
Represents a vector with three single-precision floating-point values.

Vector4

Vector4
Represents a vector with four single-precision floating-point values.

Enums:

Type
Description

ActionError

v1.0.0
ActionError
Errors from actions

ActionType

v1.0.0
ActionType
Action Types, for use in the Queue system. These are ordered by default priority with higher numbers having higher priority.

AddRemoveEventType

v1.0.0
AddRemoveEventType

AllegianceHouseAction

v1.0.0
AllegianceHouseAction
Actions related to /allegiance house

AllegianceLockAction

v1.0.0
AllegianceLockAction
Actions related to /allegiance lock

AllegianceOfficerLevel

v1.0.0
AllegianceOfficerLevel
The permission levels that can be given to an allegiance officer

AllegianceRecordFlags

v1.0.0
AllegianceRecordFlags

AmmoType

v1.0.0
AmmoType
The AmmoType value describes the type of ammunition a missile weapon uses.

AnimationFlags

v1.0.0
AnimationFlags

AnimationHookDir

v1.0.0
AnimationHookDir

AnimationHookType

v1.0.0
AnimationHookType

ArmorHighlightMask

v1.0.0
ArmorHighlightMask
The ArmorHighlightMask selects which armor attributes highlighting is applied to.

AttackConditionsMask

v1.0.0
AttackConditionsMask
Additional attack information

AttackHeight

v1.0.0
AttackHeight
Height of the attack. TODO these need to be verified.

AttackType

v1.0.0
AttackType

AttributeId

v1.0.0
AttributeId
The AttributeID identifies a specific Character attribute.

AttributeMask

v1.0.0
AttributeMask
The AttributeMask selects which creature attributes highlighting is applied to.

BSPType

v1.0.0
BSPType

BoolId

v1.0.0
BoolId
The BooleanPropertyID identifies a specific Character or Object boolean property.

BusyAction

v1.0.0
BusyAction
The different actions a character can be busy doing. Only one action is allowed at a time.

CastEventType

v1.0.0
CastEventType

CellPortalFlags

v1.0.0
CellPortalFlags

CharGenResponseType

v1.0.0
CharGenResponseType
The type response to a chargen request

CharacterErrorType

v1.0.0
CharacterErrorType
The CharacterErrorType identifies the type of character error that has occured.

CharacterOptions1

v1.0.0
CharacterOptions1
The CharacterOptions1 word contains character options.

CharacterOptions2

v1.0.0
CharacterOptions2
The CharacterOptions2 word contains additional character options.

ChatChannel

v1.0.0
ChatChannel
Chat channels

ChatDisplayMask

v1.0.0
ChatDisplayMask
The ChatDisplayMask identifies that types of chat that are displayed in each chat window.

ChatMessageType

v1.0.0
ChatMessageType
The ChatMessageType categorizes chat window messages to control color and filtering.

ChessMoveResult

v1.0.0
ChessMoveResult
Identifies the chess move attempt result. Negative/0 values are failures.

ClientCapability

v1.0.2
ClientCapability

ClientConfirmationType

v2.0.19
ClientConfirmationType

ClientState

v1.0.0
ClientState
Represents the current state of the game client.

CombatBodyPart

v1.0.0
CombatBodyPart

CombatMode

v1.0.0
CombatMode
The combat mode for a character or monster.

CompressionType

v1.0.0
CompressionType
The CompressionType identifies the type of data compression used.

ConfirmationType

v1.0.0
ConfirmationType
The ConfirmationType identifies the specific confirmation panel to be displayed.

ContainerProperties

v1.0.0
ContainerProperties
Container properties of an item

ContractStage

v1.0.0
ContractStage
Stage a contract is in. Values 4+ appear to provide contract specific update messages

CoverageMask

v1.0.0
CoverageMask
The CoverageMask value describes what parts of the body an item protects.

CreatureType

v1.0.0
CreatureType

CullMode

v1.0.0
CullMode
Polygon culling mode

CurVitalID

v1.0.0
CurVitalID
The CurVitalID identifies a specific Character vital (secondary attribute).

DamageLocation

v1.0.0
DamageLocation
The DamageLocation indicates where damage was done.

DamageType

v1.0.0
DamageType
The DamageType identifies the type of damage.

DataId

v1.0.0
DataId
The DataPropertyId identifies a specific Character or Object data property.

DateTimeKind

DateTimeKind
Specifies whether a DateTime object represents a local time, a Coordinated Universal Time (UTC), or is not specified as either local time or UTC.

DestinationType

v1.0.0
DestinationType

DispelType

v1.0.0
DispelType
The type of spells to dispel

DistanceType

v2.0.19
DistanceType
A distance type used for checking distances between things. Can either be 2d or 2d

EmitterType

v1.0.0
EmitterType

EmoteCategory

v1.0.0
EmoteCategory
The EmoteCategory identifies the category of an emote.

EmoteType

v1.0.0
EmoteType
The EmoteType identifies the type of emote action

EnchantmentFlags

v1.0.0
EnchantmentFlags

EndTradeReason

v1.0.0
EndTradeReason
The EndTradeReason identifies the reason trading was ended.

EnvCellFlags

v1.0.0
EnvCellFlags

EnvironChangeType

v1.0.0
EnvironChangeType
The EnvrionChangeType identifies the environment option set.

EquipMask

v1.0.0
EquipMask
The EquipMask value describes the equipment slots an item uses.

EquipmentSet

v1.0.0
EquipmentSet
List of equipment sets for armor/weapons. Compiled from aclogview, and the client.

FellowUpdateType

v1.0.0
FellowUpdateType
Type of fellow update

FellowshipEventType

v1.0.0
FellowshipEventType

FloatId

v1.0.0
FloatId
The FloatPropertyID identifies a specific Character or Object float property.

FriendsUpdateType

v1.0.0
FriendsUpdateType
The type of the friend change event.

Gender

v1.0.0
Gender
Gender of a player

GfxObjFlags

v1.0.0
GfxObjFlags

HeritageGroup

v1.0.0
HeritageGroup
Heritage of a player

HookAppraisalFlags

v1.0.0
HookAppraisalFlags
The HookAppraisalFlags identifies various properties for an item hooked.

HookType

v1.0.0
HookType
The HookType identifies the types of dwelling hooks.

HouseType

v1.0.0
HouseType
The HouseType identifies the type of house.

IconHighlight

v1.0.0
IconHighlight
the type of highlight (outline) applied to the objects icon

InstanceId

v1.0.0
InstanceId
The InstancePropertyID identifies a specific Character or Object instance property.

Int64Id

v1.0.0
Int64Id
The Int64PropertyID identifies a specific Character or Object int64 property.

IntId

v1.0.0
IntId
The IntPropertyID identifies a specific Character or Object int property.

LogTextType

v1.0.0
LogTextType
The LogTextType indicates the kind of text going to the chat area.

MagicSchool

v1.0.0
MagicSchool
The schools of magic

MaterialType

v1.0.0
MaterialType
The MaterialType identifies the material an object is made of.

MessageDirection

v1.0.0
MessageDirection
Represents the direction of a network message

MessageType

v1.0.0
MessageType
All message types of game messages

MotionCommand

v1.0.0
MotionCommand
The movement (forward, side, turn) for a character or monster.

MotionCommandMask

v1.0.0
MotionCommandMask
Mask for MotionCommands

MotionDatCommand

v1.0.0
MotionDatCommand
TODO: Figure out what bitfield(s) these values map to and replace with OR's Note: These IDs are from the last version of the client. Earlier versions of the client had different values for some of the enums.

MotionDatStance

v1.0.0
MotionDatStance
The list of stances for players and creatures This is a subset of MotionCommand

MotionDataFlags

v1.0.0
MotionDataFlags

MotionStance

v1.0.0
MotionStance
The stance for a character or monster.

MovementOption

v1.0.0
MovementOption
Additional movement options

MovementType

v1.0.0
MovementType
The movement type defines the fields for the rest of the message

NumberingType

v1.0.0
NumberingType

ObjectClass

v1.0.0
ObjectClass
Decal object classes, for compatibility

ObjectDescriptionFlag

v1.0.0
ObjectDescriptionFlag
Flags related to the use of the item.

ObjectType

v1.0.0
ObjectType
The objects type information

OptionPropertyID

v1.0.0
OptionPropertyID
The OptionPropertyID identifies a specific character option.

ParticleType

v1.0.0
ParticleType

PhysicsDescriptionFlag

v1.0.0
PhysicsDescriptionFlag

PhysicsState

v1.0.0
PhysicsState
The state flags for an object

Placement

v1.0.0
Placement
Research provided by a fellow traveler, Thanks for your generosity and hard work!

PlayScript

v1.0.0
PlayScript

PositionFlags

v1.0.0
PositionFlags
The PositionFlags value defines the fields present in the Position structure.

PositionPropertyID

v1.0.0
PositionPropertyID
The PositionPropertyID identifies a specific Character or Object position property.

PropertyType

v1.0.0
PropertyType
The PropertyType value defines the structure and content of a property.

Queues

v1.0.0
Queues

RadarBehavior

v1.0.0
RadarBehavior

RadarColor

v1.0.0
RadarColor

RawMotionFlags

v1.0.0
RawMotionFlags

RegenLocationType

v1.0.0
RegenLocationType

RegenerationType

v1.0.0
RegenerationType

RegexOptions

RegexOptions
Provides enumerated values to use to set regular expression options.

ResistHighlightMask

v1.0.0
ResistHighlightMask
The ResistHighlightMask selects which wand attributes highlighting is applied to.

ResourceType

v1.0.0
ResourceType
The ResourceType identifies the dat file to be used.

ScriptStartupType

v1.0.2
ScriptStartupType

SetupFlags

v1.0.0
SetupFlags

SkillId

v1.0.0
SkillId
The SkillID identifies a specific Character skill.

SkillState

v1.0.0
SkillState
The SkillState identifies whether a skill is untrained, trained or specialized.

SkillTrainingType

v1.0.0
SkillTrainingType

Sound

v1.0.0
Sound

SpellBookFilterOptions

v1.0.0
SpellBookFilterOptions
The various options for filtering the spellbook

SpellCategory

v1.0.0
SpellCategory
Spell category

SpellFlags

v1.0.0
SpellFlags
Spell mask

SpellType

v1.0.0
SpellType
Spell type

StatusMessage

v1.0.0
StatusMessage
Set of predefined status messages, some of which take additional data as input

StipplingType

v1.0.0
StipplingType

StringId

v1.0.0
StringId
The StringPropertyID identifies a specific Character or Object string property.

SurfacePixelFormat

v1.0.0
SurfacePixelFormat
This is called PixelFormat in the client, but renaming it due to conflict with built in Enum PixelFormat. These are the different image formats that textures (RenderSurface) are stored in the dat files. While these are all defined, only a handful are actually used.

SurfaceType

v1.0.0
SurfaceType

TradeSide

v1.0.0
TradeSide
The TradeSide identifies the side of the trade window.

TransferFlags

v1.0.0
TransferFlags
Indicates the source and destination for life magic transfer spells

TurbineChatType

v1.0.0
TurbineChatType
The TurbineChatType identifies the type of Turbine Chat message.

UsableType

v1.0.0
UsableType
The useablilty flags of the object

UseActionType

v2.0.19
UseActionType
The type of interaction when calling a ObjectUse action. This is calculated automatically by the action.

VendorType

v1.0.0
VendorType
Verified against GDL, much <3 to you P.

Vital

v1.0.0
Vital

VitalId

v1.0.0
VitalId
The VitalID identifies a specific Character vital (secondary attribute).

WeaponHighlightMask

v1.0.0
WeaponHighlightMask
The WeaponHighlightMask selects which weapon attributes highlighting is applied to.

WeaponType

v1.0.0
WeaponType

WeenieError

v1.0.0
WeenieError
These were tested against the last available client version: 0.0.11.6096 The WeenieError identifies the specific message to be displayed in the chat window or top of the UI. Used with F7B0 028A: Game Event -> Display an error message in the chat window if necessary. WeenieError and WeenieErrorWithString are actually a single enum in the client. The enum is used in handling 0x028A and 0x028B messages and also some other messages like UseDone. We split the enum up into 2 enums because each function uses only a specific set of the enum values. There are cases where the value was used by multiple messages e.g. 0x0036 ActionCancelled. Client error messages: http://ac.yotesfan.com/client/errors.php

WeenieHeaderFlag

v1.0.0
WeenieHeaderFlag

WeenieHeaderFlag2

v1.0.0
WeenieHeaderFlag2

WeenieType

v1.0.0
WeenieType

WieldType

v1.0.0
WieldType
the type of wieldable item this is