Module api

API Contains all functions which are exposed to the open world

Info:

  • Author: Phenom

Message

API:SendMessage (type, targets) Send a message to the given players.

Placeholder

API:UpsertGlobalPlaceholder (placeholderType, name, characterNames, overwriteCharacterNames) Add a new global placeholder.
API:UpsertEncounterPlaceholder (encounterID, placeholderType, name, characterNames, overwriteCharacterNames) Add a new encounter placeholder.

Condition

API:TriggerCondition () Trigger the given condition.


Message

API:SendMessage (type, targets)
Send a message to the given players. The message will be sent to all players in `targets` and it will perform the corresponding action based on `type`.

Parameters:

  • type string type of the message you want to send
  • targets table table of targets which should receive the message

Returns:

    true

Usage:

  • local PRT = _G["PRT"]
  • PRT:SendMessage("advanced", {"Phenom"})

Placeholder

API:UpsertGlobalPlaceholder (placeholderType, name, characterNames, overwriteCharacterNames)
Add a new global placeholder. If a placeholder with this name already exists the character names will be merged when you set `overwriteCharacterNames` to true.

Parameters:

  • placeholderType string the type of the placeholder. Can either be `group` or `player`
  • name string the name of the placeholder. Can only be a name which is not already present
  • characterNames table table of the player names which should be used for the placeholder
  • overwriteCharacterNames boolean defines if the character names should be overwritten when a placeholder with this name already exists.

Returns:

    true

Usage:

  • local PRT = _G["PRT"]
  • PRT:UpsertGlobalPlaceholder("player", "test", {"Phenom"}, true)
API:UpsertEncounterPlaceholder (encounterID, placeholderType, name, characterNames, overwriteCharacterNames)
Add a new encounter placeholder. If a placeholder with this name already exists the charracter names will be merged when you set `overwriteCharacterNames` to true.

Parameters:

  • encounterID number the encounter id for which the placeholder should be added
  • placeholderType string the type of the placeholder. Can either be `group` or `player`
  • name string the name of the placeholder. Can only be a name which is not already present
  • characterNames table table of the player names which should be used for the placeholder
  • overwriteCharacterNames boolean defines if the character names should be overwritten when a placeholder with this name already exists.

Returns:

    true

Usage:

  • local PRT = _G["PRT"]
  • PRT:UpsertEncounterPlaceholder(1234, "player", "test", {"Phenom"}, true)

Condition

API:TriggerCondition ()
Trigger the given condition. Work in progress

Returns:

    WIP
generated by LDoc 1.4.6 Last updated 2021-06-21 17:18:50