impersonate: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=impersonate |trusted=true |version=1.7.0 |compatibility=1.7.0 |description= Impersonate changes the impersonated token for the client running the functio...")
 
mNo edit summary
Line 27: Line 27:


|also=
|also=
* {{func|hasImpersonated}}
* {{func|hasImpersonated}}
* {{func|getImpersonated}}
* {{func|getImpersonated}}
Line 32: Line 33:


|changes=
|changes=
* '''1.7.0''' - Introduced.
* '''1.7.0''' - Introduced.
}}
}}

Revision as of 17:56, 16 May 2020

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'.

Usage

impersonate(id)

Parameters

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

Example

You can use Impersonate to simulate multiple tokens speaking in turn:
[h: impersonate("Hero")]Hi!<br>
[h: impersonate("Elf")]Hi!<br>
[h: impersonate("Mystic")]Hi!<br>
[h: impersonate("Wolf")]Burp!

Output:

File:func impersonate example1.png

See Also

Version Changes

  • 1.7.0 - Introduced.