Back to 'event_scripts' Return to world Go to 'spell_scripts'
This table format is used for 3 different tables to control possible scripts activated by different actions:
Note: An entry in this table may have more than one row as a script may do more than just one action. Also each action the script may make can have a separate delay attached to it. In that case, the core will activate the appropriate action after the correct delay.
Field | Type | Attributes | Key | Null | Default | Extra | Comment |
---|---|---|---|---|---|---|---|
id | mediumint | unsigned | NO | 0 | |||
effIndex [1] | tinyint | unsigned | NO | 0 | |||
delay | int | unsigned | NO | 0 | |||
command | mediumint | unsigned | NO | 0 | |||
datalong | mediumint | unsigned | NO | 0 | |||
datalong2 | int | unsigned | NO | 0 | |||
dataint | int | signed | NO | 0 | |||
x | float | NO | 0 | ||||
y | float | NO | 0 | ||||
z | float | NO | 0 | ||||
o | float | NO | 0 | ||||
guid [2] | int | signed | PRI | NO | 0 | Acts as primary key and is set automatically using the GM command 'wp event add' | |
Comment | varchar(255) | NO | '' |
1 present in spell_scripts table only.
2 present in waypoint_scripts table only.
spell_scripts
: Spell IDwaypoint_scripts
: action ID from waypoint_dataevent_scripts
: an event ID. There doesn't exist currently a full list of events. In any case, the event IDs are taken directly from gameobject WDB data or spell effect data. If both a gameobject and a spell activate the same event, the IDs will match.The effect index of the spell that this script is to be applied to.
Note: only present in spell_scripts
Delay in seconds before this current step of the script activates. 0 = instant.
The type of action performed by the script after delay has passed. The value of this field affects what other fields also need to be set.
The following commands can be used:
Value | Name | Comment |
---|---|---|
0 | TALK | Creature say/whisper/yell/textemote. |
1 | EMOTE | Play emote on creature. |
2 | FIELD_SET | Change the value at an index for the player. |
3 | MOVE_TO | Relocate creature to a destination. |
4 | FLAG_SET | Turns on bits on a flag field at an index for the player. |
5 | FLAG_REMOVE | Turns off bits on a flag field at an index for the player. |
6 | TELEPORT_TO | Teleports the player to a location. |
7 | QUEST_EXPLORED | Satisfies the explore requirement for a quest. |
8 | KILL_CREDIT | Gives kill credit to the player. |
9 | RESPAWN_GAMEOBJECT | Spawns a despawned gameobject. |
10 | TEMP_SUMMON_CREATURE | Temporarily summons a creature. |
11 | OPEN_DOOR | Opens a door gameobject (type 0). |
12 | CLOSE_DOOR | Closes a door gameobject (type 0). |
13 | ACTIVATE_OBJECT | Activates an object. |
14 | REMOVE_AURA | Removes an aura due to a spell. |
15 | CAST_SPELL | Casts a spell. |
16 | PLAY_SOUND | Plays a sound. |
17 | CREATE_ITEM | Creates specified amount of items for the player. |
18 | DESPAWN_SELF | Forces unit to despawn. |
20 | LOAD_PATH | Load path to unit, then unit starts waypoint movement. |
21 | CALLSCRIPT_TO_UNIT | Calls script from one of *_scripts table with given unit as source. |
22 | KILL | Changes state of the creature to dead and optionally removes its corpse. |
30 | ORIENTATION | Changes unit's orientation (Used in Waypoint Scripts) |
31 | EQUIP | Sets creature equipment. |
32 | MODEL | Sets creature model. |
33 | CLOSE_GOSSIP | Closes gossip window. This command is only used for Gossip Scripts. |
34 | PLAYMOVIE | Plays movie. |
35 | MOVEMENT | Updates creature movement. |
36 | PLAY_ANIMKIT | (NOT ON 3.3.5A, DON'T REUSE) |
command | datalong | datalong2 | dataint | World Position |
---|---|---|---|---|
0 | ChatType | talk source: 0 - creature; 1 - player | broadcast_text id | - |
1 | Emote ID | play emote as: 0 - oneshot; 1 - state | 0 | - |
2 | field index | value to be set | 0 | - |
3 | 0 | time for movement (in seconds?) | 0 | destination |
4 | field index | bitmask to be set | 0 | - |
5 | field index | bitmask to be unset | 0 | - |
6 | destination Map ID | target: 0 - player; 1 - creature | 0 | destination |
7 | quest ID to satisfy | min distance to target to satisfy (min.: 5m) | 0 | - |
8 | creature entry to credit | granted to: 0 - player; 1 - player+party | 0 | - |
9 | object guid to spawn | despawn delay in seconds (min.: 5s) | 0 | - |
10 | creature entry to spawn | despawn delay in seconds | 0 | destination |
11 | object guid to open | reset delay in milliseconds (min.: 15000ms) | 0 | - |
12 | object guid to close | reset delay in milliseconds (min.: 15000ms) | 0 | - |
13 | 0 | 0 | 0 | - |
14 | Spell ID to remove | remove from: 0 - target; 1 - source | 0 | - |
15 | Spell ID to cast | 0: Source -> Target 1: Source -> Source (self cast) 2: Target -> Target 3: Target -> Source (cast back) 4: creature entry from dataint |
cast type: 0 - normal; 1 - triggered creature entry |
- |
16 | SoundEntry ID to play | 0x1: play to everyone instead of player 0x2: play with distance dependancy instead of without |
0 | - |
17 | item entry to create | amount | 0 | - |
18 | despawn delay (in seconds?) | 0 | 0 | - |
20 | waypoint path id to load | repeatable: 0 - no; 1 - yes | 0 | - |
21 | creature entry or guid to load script on | script id | 3: use spell_scripts table 5: use event_scripts table 6: use waypoint_scripts table |
- |
22 | 0 | 0 | 0: leave corpse; 1: remove corpse | - |
30 | face: 0 - o value; 1 - target | 0 | 0 | 0, 0, 0, o (0 – 2π) |
31 | ID from creature_equip_template | 0 | 0 | - |
32 | CreatureDisplayInfo ID | 0 | 0 | - |
33 | 0 | 0 | 0 | - |
34 | Movie ID to play | 0 | 0 | - |
35 | MOTION_TYPE: 1 - RANDOM; 2 - WAYPOINT | distance in m for RANDOM_MOTION_TYPE | path id for WAYPOINT_MOTION_TYPE | - |
Acts as primary key for waypoint_scripts. It is set automatically using the GM command .wp event add
.
Note: only present in waypoint_scripts
This field is for any comment you want to make. It is arbitrary text.
Back to 'event_scripts' Return to world Go to 'spell_scripts'