Difference between revisions of "Script:Marking Conditions"
From Roll20 Wiki
m (235259 moved page Script:Marking Conditions to Script:Marking Conditions) |
|||
Line 1: | Line 1: | ||
+ | {{script overview | ||
+ | |name=Marking Conditions | ||
+ | |author={{user profile|235259|Brian}} | ||
+ | |dependencies={{api repository link|splitArgs}} | ||
+ | |version=3.0 | ||
+ | |lastmodified=2015-01-09}} | ||
+ | |||
The following script creates the API commands <code>!mark</code>, <code>!unmark</code>, and <code>!clearmark</code> | The following script creates the API commands <code>!mark</code>, <code>!unmark</code>, and <code>!clearmark</code> | ||
+ | <br clear="all"> | ||
==== Syntax ==== | ==== Syntax ==== | ||
Line 35: | Line 43: | ||
The <code>!mark</code> command will set a marker, while the <code>!unmark</code> command will clear it. <code>!clearmark</code> will clear all markers from the token. | The <code>!mark</code> command will set a marker, while the <code>!unmark</code> command will clear it. <code>!clearmark</code> will clear all markers from the token. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Examples ==== | ==== Examples ==== | ||
Line 201: | Line 60: | ||
<blockquote>This will remove all markers from the selected token.</blockquote> | <blockquote>This will remove all markers from the selected token.</blockquote> | ||
− | |||
[[Category:API Commands|Marking Conditions]] | [[Category:API Commands|Marking Conditions]] |
Revision as of 06:41, 9 January 2015
API ScriptAuthor: Brian
Version: 3.0
Last Modified: 2015-01-09
Code: Marking Conditions
Dependencies: splitArgs
Conflicts: None
Version: 3.0
Last Modified: 2015-01-09
Code: Marking Conditions
Dependencies: splitArgs
Conflicts: None
The following script creates the API commands !mark
, !unmark
, and !clearmark
Syntax
!mark tokenid [status [type]]
!unmark tokenid [status [type]]
!clearmark tokenid
Parameter | Values |
---|---|
tokenid | The ID of the token to mark. Use @{target|token_id} or @{selected|token_id} to get this value.
|
status | (Optional) A D&D 4e status (except for dying, helpless, unconscious, insubstantial, or surprised) or the name of a statusmarker icon. The script has several aliases for the statuses. For example, immobilized, immobile, and immob all correspond to the same marker.
If status is not specified, the purple statusmarker will be used. |
type | (Optional) A D&D 4e damage type. Only used if status is ongoing, damage, or dam. One of:
If type is not specified, a statusmarker to represent untyped damage will be used. |
The !mark
command will set a marker, while the !unmark
command will clear it. !clearmark
will clear all markers from the token.
Examples
!mark @{target|token_id} brown
This will set the brown marker on the target token.
!mark @{target|token_id} immob
This will set the 'immobilize' icon to the target token.
!mark @{selected|token_id} ongoing fire
This will mark the selected token with ongoing fire damage.
!unmark @{selected|token_id}
This will remove the purple (default) statusmarker from the selected token.
!clearmark @{selected|token_id}
This will remove all markers from the selected token.