Skip to main content

Events

nexSys relies on eventStream as the backend event handler. nexSys provides a variety of events that users may tap into for their own packages and uses.

Events List

Here's a table of our events:

Event NameDescription
AffGotAny affliction is gained
AffLostAny affliction is lost
<affliction>GotAffEventSpecific affliction is gained
<affliction>LostAffEventSpecific affliction is lost
DefGotA defense is gained
DefLostA defense is lost
<defence>GotDefEventSpecific defense is gained
<defence>LostDefEventSpecific defense is lost
BalanceGotBalance has been regained
BalanceLostBalance has been lost
<balance>GotBalEventSpecific balance state has been regained
<balance>LostBalEventSpecific balance state has been lost
eqBalRecoveredEventBoth Balance and Equilibrium have returned
SystemPausednexSys system is paused
SystemUnpausednexSys system is unpaused
SystemSlowModeOnnexSys system slow mode is enabled
SystemSlowModeOffnexSys system slow mode is disabled
PromptEventNew prompt is received
RoomChangedEventThe player has moved to a different room
ItemAddedToRoomAn item has been added to the current room
ItemAddedToInvAn item has been added to the inventory
ItemRemovedFromRoomAn item has been removed from the current room
ItemRemoveFromInvAn item has been removed from the inventory
ItemUpdatedRoomAn item in the room has been updated
ItemUpdatedInvAn item in the inventory has been updated
ItemListForRoomThe list of items in the current room has been updated
ItemListForInvThe list of items in the inventory has been updated
TargetSetEventA new target has been set
TargetChangedThe current target has been changed
ClassChangedThe player’s class has changed
HealthUpdatedThe player’s health has been updated
ManaUpdatedThe player’s mana has been updated
RageUpdatedThe player’s rage has been updated

AffGot

Description: Triggered when any affliction is gained by the player.

Returns: nexSys Aff object, containing detailed information about the affliction.

Example:

const example = function (args) {
if (args.name === "aeon") {
nexusclient.display_notice("I guess this is the end");
}
};
eventStream.registerEvent("AffGot", example);

AffLost

Description: Triggered when any affliction is lost by the player.

Returns: nexSys Aff object, containing detailed information about the lost affliction.


<affliction>GotAffEvent

Description: Triggered when a specific affliction is gained by the player. Replace <affliction> with the actual affliction name.

Returns: Specific nexSys Aff object for the gained affliction.

Example:

const example = function (args) {
nexusclient.display_notice("I guess this is the end");
};
eventStream.registerEvent("aeonGotAffEvent", example);

<affliction>LostAffEvent

Description: Triggered when a specific affliction is lost by the player. Replace <affliction> with the actual affliction name.

Returns: Specific nexSys Aff object for the lost affliction.

Example:

const example = function (args) {
nexusclient.display_notice("I'm alive! Or maybe I'm dead...");
};
eventStream.registerEvent("aeonLostAffEvent", example);

DefGot

Description: Triggered when any defense is gained by the player.

Returns: nexSys Def object, detailing the gained defense.


DefLost

Description: Triggered when any defense is lost by the player.

Returns: nexSys Def object, detailing the lost defense.


<defence>GotDefEvent

Description: Triggered when a specific defense is gained by the player. Replace <defence> with the actual defense name.

Returns: Specific nexSys Def object for the gained defense.

Example:

const example = function () {
nexSys.sys.pause();
};
eventStream.registerEvent("prismaticGotDefEvent", example);

<defence>LostDefEvent

Description: Triggered when a specific defense is lost by the player. Replace <defence> with the actual defense name.

Returns: Specific nexSys Def object for the lost defense.

Example:

const example = function () {
nexSys.sys.unpause();
};
eventStream.registerEvent("prismaticLostDefEvent", example);

BalanceGot

Description: Triggered when balance is regained by the player.

Returns: Boolean value indicating the new balance state.


BalanceLost

Description: Triggered when balance is lost by the player.

Returns: Boolean value indicating the lost balance state.


<balance>GotBalEvent

Description: Triggered when a specific balance state is regained by the player. Replace <balance> with the actual balance type.

Returns: Boolean or specific balance state object, depending on the balance type.


<balance>LostBalEvent

Description: Triggered when a specific balance state is lost by the player. Replace <balance> with the actual balance type.

Returns: Boolean or specific balance state object, depending on the balance type.


eqBalRecoveredEvent

Description: Triggered when both balance and equilibrium have returned to the player.

Returns: Object indicating that both balance and equilibrium are recovered.


SystemPaused

Description: Triggered when the nexSys system is paused.

Returns: Boolean indicating the system's paused state.


SystemUnpaused

Description: Triggered when the nexSys system is unpaused.

Returns: Boolean indicating the system's unpaused state.


SystemSlowModeOn

Description: Triggered when the nexSys system slow mode is enabled.

Returns: Boolean indicating that slow mode is active.


SystemSlowModeOff

Description: Triggered when the nexSys system slow mode is disabled.

Returns: Boolean indicating that slow mode is inactive.


PromptEvent

Description: Triggered when a new prompt is received. Similar to the Nexus onBlock function.

Returns: Object containing the details of the new prompt.


RoomChangedEvent

Description: Triggered when the player has moved to a different room.

Returns: GMCP Room.Info object containing information about the new room, such as room ID and description.


ItemAddedToRoom

Description: Triggered when an item has been added to the current room.

Returns: GMCP item object with details of the added item.


ItemAddedToInv

Description: Triggered when an item has been added to the inventory.

Returns: GMCP item object with details of the added item.


ItemRemovedFromRoom

Description: Triggered when an item has been removed from the current room.

Returns: GMCP item object with details of the removed item.


ItemRemoveFromInv

Description: Triggered when an item has been removed from the inventory.

Returns: GMCP item object with details of the removed item.

Example: ItemRemovedFromInv Example


ItemUpdatedRoom

Description: Triggered when an item in the room has been updated.

Returns: GMCP item object with updated details of the item.


ItemUpdatedInv

Description: Triggered when an item in the inventory has been updated.

Returns: GMCP item object with updated details of the item.


ItemListForRoom

Description: Triggered when the list of items in the current room has been updated.

Returns: Array of GMCP item objects, representing the updated list of items.


ItemListForInv

Description: Triggered when the list of items in the inventory has been updated.

Returns: Array of GMCP item objects, representing the updated inventory.


TargetSetEvent

Description: Triggered when a new target is set.

Returns: String value of the new (current) target.


TargetChanged

Description: Triggered when the current target has been changed.

Returns: String value of the new (current) target.


ClassChanged

Description: Triggered when the player's class changes.

Returns: Object detailing the old and new class names.

{
old: string,
new: string
}

HealthUpdated

Description: Event is raised any time the player's health value changes.

Returns: Object with health details.

{
max: int,
current: int,
diff: int
}

Example:

const example = function (args) {
if (args.max / args.current < 0.5) {
nexusclient.send_commands("touch crystal|pt save me!");
}
};
eventStream.registerEvent("HealthUpdated", example);

ManaUpdated

Description: Event is raised any time the player's mana value changes.

Returns: Object with mana details.

{
max: int,
current: int,
diff: int
}

RageUpdated

Description: Event is raised any time the player's rage value changes.

Returns: Object with Rage details.

{
max: int,
current: int,
diff: int
}