creature_text
This table holds all the speech text (whisper, say, yell, emote text in speech bubbles and in the chat window) and corresponding sounds or emote (if any) used within smart_scripts table and core scripts.
Structure
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| CreatureID | int | unsigned | PRI | NO | 0 | ||
| GroupID | tinyint | unsigned | PRI | NO | 0 | ||
| ID | tinyint | unsigned | PRI | NO | 0 | ||
| Text | longtext | YES | NULL | ||||
| Type | tinyint | unsigned | NO | 0 | |||
| Language | tinyint | signed | NO | 0 | |||
| Probability | float | NO | 0 | ||||
| Emote | int | unsigned | NO | 0 | |||
| Duration | int | unsigned | NO | 0 | |||
| Sound | int | unsigned | NO | 0 | |||
| BroadcastTextId | int | signed | NO | 0 | |||
| TextRange | tinyint | unsigned | NO | 0 | |||
| comment | varchar(255) | YES | '' | ||||
Description of fields
CreatureID
This is the creature_template.entry to which the script is linked to.
GroupID
If there is more than one of the same entry (more than one text the creature says), this column is used to choose if it is a random say or an ordered list. If a creature has got more than one say text to be shown in a given order, it must be incremented for each new matching entry (ex. 0, 1, 2, 3...). If there is only one entry or only one group, this value should be 0. If there are multiple groups of texts, this value stays the same within the group while the id increments within the same group.
ID
Entry for each group of texts. This is the unique identifier when entry (creature) is the same and GroupID is unchanged, it must be incremented (ex. 0, 1, 2, 3...). A creature say will be randomly selected from this list based on the groupid it belongs to.
Text
The text the creature will say.
Type
| Value | Old Value | Description | Example |
|---|---|---|---|
| 12 | 0 | Say | Creature says: Say |
| 14 | 1 | Yell | Creature yells: Yell |
| 16 | 2 | Emote | Creature gestures wildly |
| 41 | 3 | Boss Emote | Boss Emote |
| 15 | 4 | Whisper | Creature whispers: Whisper |
| 42 | 5 | Boss Whisper | Boss Whisper |
Language
A Language ID. When set to 0, the current default language will be used.
| ID | Language | ID | Language | |
|---|---|---|---|---|
| 1 | Orcish | 12 | Kalimag | |
| 2 | Darnassian | 13 | Gnomish | |
| 3 | Taurahe | 14 | Troll | |
| 6 | Dwarvish | 33 | Gutterspeak | |
| 7 | Common | 35 | Draenei | |
| 8 | Demonic | 36 | Zombie | |
| 9 | Titan | 37 | Gnomish Binary | |
| 10 | Thalassian | 38 | Goblin Binary | |
| 11 | Draconic | |||
Probability
A value from 1–100 that represents the percentage chance that this text will be executed.
Emote
The Emote ID that the creature plays when the text is executed.
Duration
Time in milliseconds to see the text. 0 is default and calculated by core.
Sound
The SoundEntry ID this creature will play at the same time the text is executed.
BroadcastTextId
Id of the equivalent text found in broadcast_text.
TextRange
| Value | Range |
|---|---|
| 0 | Normal/Default |
| 1 | Area |
| 2 | Zone |
| 3 | Map |
| 4 | World |
comment
This field is for any comment you want to make. It is arbitrary text.
Example
The following snippets for the Stormwind City Guard are part of the Death Knight introduction questline.
CreatureText excerpt:
| CreatureID | GroupID | ID | Text | Type | Language | Probability | TextRange | BroadcastTextId |
|---|---|---|---|---|---|---|---|---|
| 68 | 2 | 0 | %s throws a rotten apple at $n. | 16 | 0 | 100 | 0 | 31671 |
| 68 | 3 | 0 | %s throws rotten banana on $n. | 16 | 0 | 100 | 0 | 31672 |
| 68 | 4 | 0 | %s spits on $n. | 16 | 0 | 100 | 0 | 31673 |
| 68 | 5 | 0 | Monster! | 12 | 0 | 100 | 0 | 31662 |
| 68 | 5 | 1 | Murderer! | 12 | 0 | 100 | 0 | 31679 |
| 68 | 5 | 2 | GET A ROPE! | 12 | 0 | 100 | 0 | 31669 |
| 68 | 5 | 3 | How dare you set foot in our city! | 12 | 0 | 100 | 0 | 31684 |
| 68 | 5 | 4 | You disgust me. | 12 | 0 | 100 | 0 | 31680 |
| 68 | 5 | 5 | Looks like we're going to have ourselves an execution. | 12 | 0 | 100 | 0 | 31682 |
| 68 | 5 | 6 | Traitorous dog. | 12 | 0 | 100 | 0 | 31665 |
| 68 | 5 | 7 | My family was wiped out by the Scourge! MONSTER! | 12 | 0 | 100 | 0 | 31667 |
SmartAI excerpt:
| entryorguid | source_type | id | event_type | event_param1 | action_type | action_param1 | action_param2 | action_param3 | action_param4 | comment |
|---|---|---|---|---|---|---|---|---|---|---|
| 68 | 0 | 11 | 8 | 58533 | 87 | 329600 | 329601 | 329602 | 329603 | Stormwind City Guard - On spell hit - Run Random Script |
| 329600 | 9 | 0 | 0 | 0 | 11 | 58509 | 0 | 0 | 0 | Stormwind City Guard - On Script - Cast ''Rotten Apple Toss' |
| 329600 | 9 | 1 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | Stormwind City Guard - On Script - Say Line 2 |
| 329601 | 9 | 0 | 0 | 0 | 11 | 58513 | 0 | 0 | 0 | Stormwind City Guard - On Script - Cast 'Rotten Banana Toss' |
| 329601 | 9 | 1 | 0 | 0 | 1 | 3 | 0 | 0 | 0 | Stormwind City Guard - On Script - Say Line 3 |
| 329602 | 9 | 0 | 0 | 0 | 11 | 58520 | 0 | 0 | 0 | Stormwind City Guard - On Script - Cast 'Spit' |
| 329602 | 9 | 1 | 0 | 0 | 1 | 4 | 0 | 0 | 0 | Stormwind City Guard - On Script - Say Line 4 |
| 329603 | 9 | 0 | 0 | 0 | 1 | 5 | 0 | 0 | 0 | Stormwind City Guard - On Script - Say Line 5 |
SMART_ACTION_TALK (1) accesses creature_text on with the current creatureID and provided GroupID as parameter. In the case of GroupID 5 a random text is picked with equal chance (all have Probability: 100) and said (Type: 12) in the vicinity (TextRange: 0) of the guard in its default tongue (Language: 0).
