“dbscripts_on_spell” table¶
The dbscripts_on_spell
table holds holds scripts which are executed
upon casting a spell.
Table structure¶
Field | Type | Null | Key | Default | Extra |
---|---|---|---|---|---|
id | mediumint(8) unsigned | NO | 0 | ||
delay | int(10) unsigned | NO | 0 | ||
command | mediumint(8) unsigned | NO | 0 | ||
datalong | mediumint(8) unsigned | NO | 0 | ||
datalong2 | int(10) unsigned | NO | 0 | ||
buddy_entry | mediumint(8) unsigned | NO | 0 | ||
search_radius | mediumint(8) unsigned | NO | 0 | ||
data_flags | tinyint(3) unsigned | NO | 0 | ||
dataint | int(11) | NO | 0 | ||
dataint2 | int(11) | NO | 0 | ||
dataint3 | int(11) | NO | 0 | ||
dataint4 | int(11) | NO | 0 | ||
x | float | NO | 0 | ||
y | float | NO | 0 | ||
z | float | NO | 0 | ||
o | float | NO | 0 | ||
comments | varchar(255) | NO | NULL |
Fields¶
delay¶
The delay in seconds to apply before starting the script command.
Setting the value to 0
will instantly execute the command.
Note
Delay is accumulated over all events with identical id
values.
command¶
The action to execute once the delay
defined has been reached. The
following list shows all available actions.
Value | Command | Description |
---|---|---|
0 | SCRIPT_COMMAND_TALK | Creature will send a text emote (say, yell, whisper) |
1 | SCRIPT_COMMAND_EMOTE | Creature/character will play an emote |
2 | SCRIPT_COMMAND_FIELD_SET | Modifies a character variable |
3 | SCRIPT_COMMAND_MOVE_TO | Moves a creature to a new location |
4 | SCRIPT_COMMAND_FLAG_SET | Turns on bits on character variable |
5 | SCRIPT_COMMAND_FLAG_REMOVE | Turns off bits on character variable |
6 | SCRIPT_COMMAND_TELEPORT_TO | Teleports a character to a new location |
7 | SCRIPT_COMMAND_QUEST_EXPLORED | Marks a quest exploration requirement as done |
8 | SCRIPT_COMMAND_KILL_CREDIT | Marks a quest kill requirement as done |
9 | SCRIPT_COMMAND_RESPAWN_GAMEOBJECT | Respawns a despawned game object |
10 | SCRIPT_COMMAND_TEMP_SUMMON_CREATURE | Summons one/multiple temporary creature(s) |
11 | SCRIPT_COMMAND_OPEN_DOOR | Opens a game object of type 0 (aka. a door) |
12 | SCRIPT_COMMAND_CLOSE_DOOR | Closes a game object of type 0 (aka. a door) |
13 | SCRIPT_COMMAND_ACTIVATE_OBJECT | Uses a game object |
14 | SCRIPT_COMMAND_REMOVE_AURA | Removes an aura using a spell |
15 | SCRIPT_COMMAND_CAST_SPELL | Cast a spell |
16 | SCRIPT_COMMAND_PLAY_SOUND | Play a sound entry |
17 | SCRIPT_COMMAND_CREATE_ITEM | Create an item |
18 | SCRIPT_COMMAND_DESPAWN_SELF | Despawns a creature using an optional delay |
19 | SCRIPT_COMMAND_PLAY_MOVIE | Play a move for the targeted character |
20 | SCRIPT_COMMAND_MOVEMENT | Change the movement type of a creature |
21 | SCRIPT_COMMAND_SET_ACTIVEOBJECT | Set a creature as active object |
22 | SCRIPT_COMMAND_SET_FACTION | Change the faction of a creature |
23 | SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL | Changes a creature model displayed |
24 | SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL | Mounts a creature with the given model |
25 | SCRIPT_COMMAND_SET_RUN | Let a creature walk or run |
26 | SCRIPT_COMMAND_ATTACK_START | Makes a creature attack within a given radius |
27 | SCRIPT_COMMAND_GO_LOCK_STATE | Changes the lock/interaction state of a game object |
28 | SCRIPT_COMMAND_STAND_STATE | Changes the stand state of a creature |
29 | SCRIPT_COMMAND_MODIFY_NPC_FLAGS | Change the npcflag settings of a creature |
30 | SCRIPT_COMMAND_SEND_TAXI_PATH | Puts a character on a given taxi path |
31 | SCRIPT_COMMAND_TERMINATE_SCRIPT | Stops script execution on a creature if it meets a condition |
32 | SCRIPT_COMMAND_PAUSE_WAYPOINTS | Pause or continue waypoint movement of a creature |
33 | SCRIPT_COMMAND_RESERVED_1 | Reserved for later usage |
34 | SCRIPT_COMMAND_TERMINATE_COND | Stops script execution if a condition is met |
35 | SCRIPT_COMMAND_TURN_TO | Change a creature orientation towards a target |
datalong¶
A multi-purpose field storing raw data as unsigned integer value.
datalong2¶
A multi-purpose field storing raw data as unsigned integer value.
buddy_entry¶
If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “creature_template” table table.
search_radius¶
The range in which the buddy’s entry will be search for.
Note
If data_flags
has SCRIPT_FLAG_BUDDY_BY_GUID
set, this
references an entry in the “gameobject” table or
“creature” table table.
data_flags¶
Holds a flag or a combination for flags for the script command. The following table contains all valid flags
Value | Name |
---|---|
1 | SCRIPT_FLAG_BUDDY_AS_TARGET |
2 | SCRIPT_FLAG_REVERSE_DIRECTION |
4 | SCRIPT_FLAG_SOURCE_TARGETS_SELF |
8 | SCRIPT_FLAG_COMMAND_ADDITIONAL |
16 | SCRIPT_FLAG_BUDDY_BY_GUID |
32 | SCRIPT_FLAG_BUDDY_IS_PET |
dataint¶
A multi-purpose data field storing signed integer values.
Note
Currently these fields are only used as text identifiers for
the SCRIPT_COMMAND_TALK
and SCRIPT_COMMAND_TERMINATE_SCRIPT
commands.
dataint2¶
A multi-purpose data field storing signed integer values.
Note
Currently these fields are only used as text identifiers for
the SCRIPT_COMMAND_TALK
and SCRIPT_COMMAND_TERMINATE_SCRIPT
commands.
dataint3¶
A multi-purpose data field storing signed integer values.
Note
Currently these fields are only used as text identifiers for
the SCRIPT_COMMAND_TALK
and SCRIPT_COMMAND_TERMINATE_SCRIPT
commands.
dataint4¶
A multi-purpose data field storing signed integer values.
Note
Currently these fields are only used as text identifiers for
the SCRIPT_COMMAND_TALK
and SCRIPT_COMMAND_TERMINATE_SCRIPT
commands.
x¶
A X position on the map which the command needs.
y¶
A Y position on the map which the command needs.
z¶
A Z position on the map which the command needs.
o¶
An orientation on the map which the command needs.
comments¶
A comment describing the purpose of the script.