impersonate: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page impersonate to Impersonate without leaving a redirect: Converting page title to first-letter uppercase)
m (Conversion script moved page Impersonate to impersonate: Converting page titles to lowercase)
(No difference)

Revision as of 23:39, 9 February 2023

impersonate() Function

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

Introduced in version 1.7.0
Last checked for compatibility with version 1.7.0
Impersonate changes the impersonated token for the client running the function, replacing any current impersonation. Rather than being used like switchToken() to aid in macro execution, this function is the same as right-clicking a token and selecting 'Impersonate'. The function does not set the Current Token. Use switchToken() for that.

Usage

impersonate(id)

Parameters

  • id - The id or name of the token to impersonate.

Example

Calling impersonate() in a macro will cause the output to be as if from that token. The last call to impersonate() in a macro sets the "speaker" for the output of the whole macro.
[h: impersonate("Hero")]Hi!<br>
Nice weather, eh?<br>
Seen any dragons?

Output:

File:func impersonate example1.png

See Also

Version Changes

  • 1.7.0 - Introduced.