Skip to content

Total RP 3 : Extended custom events

Solanya edited this page Apr 3, 2021 · 6 revisions

In addition to World of Warcraft game events, Total RP 3 : Extended offers a couple of custom events to use for campaigns. This article explains how to use them.

Note : This article is written for Total RP 3 : Extended version 1.1 or later

TRP3_EMOTE

This event is triggered when the player executes an emote.

It has 1 argument:

  • 1 : The token for the emote used. See EmoteToken for a partial matching table of emotes to tokens.

TRP3_ITEM_USED

This event is triggered when the player uses an Extended item from his inventory.

It has 2 arguments :

  • 1 : The used item ID
  • 2 : The error message (if there was one)

TRP3_KILL

This event triggers every time you, or a member of your party (if you're in one), get a kill. It cannot detect kills made by raid members who aren't in your party. Its arguments depend on the type of entity killed, but the first five stay the same :

  • 1 : Unit Type ("Player", "Creature", "Pet", "Vehicle"...)
  • 2 : The GUID of the player who dealt the killing blow
  • 3 : The name of the player who dealt the killing blow
  • 4 : The GUID of the killed entity
  • 5 : The name of the killed entity

Non-Player

If the killed entity wasn't a player, there is only one additional argument.

  • 6 : The NPC ID of the killed entity

When it is relevant, it is better to use it to identify killed creatures, as it is language-independant. However, depending on the type, this info might not be useful. For instance, vignettes (for rare creatures) usually return 0 as the NPC ID.

Player

If the killed entity was a player, you have access to more info about it through additional arguments :

  • 6 : Player class ID (Fully capitalized English name, without spaces : WARRIOR, DEATHKNIGHT...)
  • 7 : Player class name
  • 8 : Player race ID (You can see the player race IDs here, under raceEn)
  • 9 : Player race name
  • 10 : Gender (2 is male, 3 is female)

As with NPC IDs, it's better to use class and race IDs instead of names if you care about players using clients in a different language than yours.

TRP3_ROLL

This event is triggered when the player rolls dice (using a "Roll dice" effect, or the /trp3 roll command line...).

It has 2 arguments :

  • 1 : The list of dice rolled separated by spaces (ex : "2d6 1d20")
  • 2 : The the dice roll result

TRP3_SIGNAL

This event is triggered when someone uses the "Send signal" effect in workflows with you as a target (works with self-targeting). Signals are especially useful to control the flow of someone else playing your campaign.

It has 3 arguments :

  • 1 : Signal ID
  • 2 : Signal value
  • 3 : The name of the player who sent the signal

The ID and value of the signal are defined in the "Send signal" effect.