js:MapTool.chat

From RPTools Wiki
Revision as of 04:59, 4 August 2021 by LPerkins (talk | contribs) (Created page with "Within the javascript environment used by {{code|js.eval}}, {{code|MapTool.chat}} is the entry point for sending chat messages. This page details the attributes and functions...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Within the javascript environment used by js.eval, MapTool.chat is the entry point for sending chat messages. This page details the attributes and functions available on the MapTool.chat object.


chat.broadcast() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Like the broadcast() macro.

Usage

MapTool.chat.broadcast(msg);
MapTool.chat.broadcast(lstOfPlayers, msg);

Parameters

  • msg String to send
  • lstOfPlayers An array containing the names of the players to include


chat.broadcastToGM;() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.9.4
Like chat.broadcast, but only includes GMs.

Usage

Maptool.chat.broadcastToGM(msg)

Parameters

  • msg String to send


See Also

JS: MapTool