-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
script_commands.txt
232 lines (185 loc) · 12.7 KB
/
script_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
-- --------------------------
## Script processing
-- --------------------------
Copyright (c) 2010-2011 MaNGOS <http://getmangos.com/>
-- --------------------------
## id
-- --------------------------
creature_movement_scripts DB project self defined id
event_scripts Event id. Several sources: spell effect 61, taxi/transport nodes, gameobject_template data
gameobject_scripts Gameobject guid
gossip_scripts DB project self defined id
quest_end_scripts DB project self defined id (generally quest entry)
quest_start_scripts DB project self defined id (generally quest entry)
spell_scripts Spell id
-- --------------------------
## delay
-- --------------------------
Delay in seconds
The order of which each step are executed.
-- --------------------------
## command
-- --------------------------
The action to execute.
-- --------------------------
## datalong
-- --------------------------
4 multipurpose fields, store raw data as unsigned values
-- --------------------------
## data_flags
-- --------------------------
1 multipurpose field, generally intended for bitmask based data
-- --------------------------
## dataint
-- --------------------------
4 multipurpose fields, store raw data as signed values
Note: currently used only for text id
-- --------------------------
## x y z o
-- --------------------------
Map coordinates for commands that need it.
-- --------------------------
## origin of script and source/target in scripts
-- --------------------------
creature_movement_scripts
`creature_movement` `creature_movement_template`
Source: creature. Target: creature
event_scripts
Flight path
Source: player. Target: player
Transport path
Source: transport GO. Target: Transport GO
`gameobject_template`
Source: User (player/creature). Target: GO
Spell (effect 61)
Source: caster. Target: GO (spell focus)
gameobject_scripts
Gameobject use
Source: user: Target: GO (only type door/button)
gossip_scripts
`gossip_menu_option`
Source: creature. Target: player
Source: player. Target: GO
quest_end_scripts
`quest_template`
Source: quest taker (creature/GO). Target: player
quest_start_scripts
`quest_template`
Source: quest giver (creature/GO). Target: player
spell_scripts
Spell (effect 77)
Source: caster: Target: target of spell (Unit)
-- --------------------------
## Each command has different parameters, and are as follows:
-- --------------------------
0 SCRIPT_COMMAND_TALK source = WorldObject, target = any/none
* datalong (see enum ChatType for supported CHAT_TYPE_'s)
* datalong2 = creature entry (searching for a buddy, closest to source)
* datalong3 = creature search radius
* datalong4 = language
* data_flags = flag_target_player_as_source = 0x01
flag_original_source_as_target = 0x02
flag_buddy_as_target = 0x04
* dataint = text entry from db_script_string -table. dataint2-dataint4 optionally, for random selection of text
1 SCRIPT_COMMAND_EMOTE source = Unit (or WorldObject when creature entry defined), target = Unit (or none)
* datalong = emote_id
* datalong2 = creature entry (searching for a buddy, closest to source)
* datalong3 = creature search radius
* data_flags = flag_target_as_source = 0x01
2 SCRIPT_COMMAND_FIELD_SET source = any
* datalong = field_id
* datalong2 = field value
3 SCRIPT_COMMAND_MOVE_TO source = Creature
* datalong2 = travel time
* x/y/z
4 SCRIPT_COMMAND_FLAG_SET source = any
* datalong = field_id
* datalong2 = bitmask
5 SCRIPT_COMMAND_FLAG_REMOVE source = any
* datalong = field_id
* datalong2 = bitmask
6 SCRIPT_COMMAND_TELEPORT_TO source or target with Player
* datalong = map_id
* x/y/z
7 SCRIPT_COMMAND_QUEST_EXPLORED one from source or target must be Player, another GO/Creature
* datalong = quest_id
* datalong2 = distance or 0
8 SCRIPT_COMMAND_KILL_CREDIT source or target with Player
* datalong = creature entry
* datalong2 = bool (0=personal credit, 1=group credit)
9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT source = any (summoner)
* datalong=db_guid
* datalong2 = despawn_delay
10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE source = any (summoner)
* datalong = creature entry
* datalong2 = despawn_delay
* data_flags = summon_as_active_object = 0x01
11 SCRIPT_COMMAND_OPEN_DOOR source = unit
* datalong = db_guid
* datalong2 = reset_delay
12 SCRIPT_COMMAND_CLOSE_DOOR source = unit
* datalong = db_guid
* datalong2 = reset_delay
13 SCRIPT_COMMAND_ACTIVATE_OBJECT source = unit, target=GO
14 SCRIPT_COMMAND_REMOVE_AURA source (datalong2!=0) or target (datalong==0) unit
* datalong = spell_id
* datalong2 = bool source is target of action
15 SCRIPT_COMMAND_CAST_SPELL source/target cast spell at target/source
* datalong = spell id
* datalong2 = 0: s->t 1: s->s 2: t->t 3: t->s 4: cast triggered
16 SCRIPT_COMMAND_PLAY_SOUND source = any object, target=any/player
* datalong = sound_id
* datalong2 (bitmask: 0/1=anyone/target, 0/2=with distance dependent, so 1|2 = 3 is target with distance dependent)
17 SCRIPT_COMMAND_CREATE_ITEM source or target must be player
* datalong = item entry
* datalong2 = amount
18 SCRIPT_COMMAND_DESPAWN_SELF source or target must be creature
* datalong = despawn delay
19 SCRIPT_COMMAND_PLAY_MOVIE target can only be a player
* datalog = movie id
20 SCRIPT_COMMAND_MOVEMENT source or target must be creature
* datalong = MovementType (0:idle, 1:random or 2:waypoint)
* datalong2 = creature entry (searching for a buddy, closest to source)
* datalong3 = creature search radius
21 SCRIPT_COMMAND_SET_ACTIVEOBJECT source=worldobject, target=creature
* datalong=bool 0=off, 1=on
* datalong2=creature entry
* datalong3=search radius
22 SCRIPT_COMMAND_SET_FACTION source=worldobject, target=creature
* datalong=factionId OR 0 to restore original faction from creature_template
* datalong2=creature entry
* datalong3=search radius
* data_flags = enum TemporaryFactionFlags
TEMPFACTION_NONE = 0x00, // When no flag is used in temporary faction change, faction will be persistent. It will then require manual change back to default/another faction when changed once
TEMPFACTION_RESTORE_RESPAWN = 0x01, // Default faction will be restored at respawn
TEMPFACTION_RESTORE_COMBAT_STOP = 0x02, // ... at CombatStop() (happens at creature death, at evade or custom scripte among others)
TEMPFACTION_RESTORE_REACH_HOME = 0x04, // ... at reaching home in home movement (evade), if not already done at CombatStop()
23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL source=worldobject, target=creature
* datalong=creature entry/modelid (depend on data_flags) OR 0 to demorph
* datalong2=creature entry
* datalong3=search radius
* dataflags= 0x01 to use datalong value as modelid explicit
24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL source=worldobject, target=creature
* datalong=creature entry/modelid (depend on data_flags) OR 0 to dismount
* datalong2=creature entry
* datalong3=search radius
* dataflags= 0x01 to use datalong value as modelid explicit
25 SCRIPT_COMMAND_SET_RUN source=worldobject, target=creature
* datalong= bool 0=off, 1=on
* datalong2=creature entry
* datalong3=search radius
26 SCRIPT_COMMAND_ATTACK_START source = WorldObject (but Creature must be final source/attacker, set with datalong-fields where needed), target = Unit/none
* datalong2 = creature entry (searching for a buddy, closest to source)
* datalong3 = creature search radius
* data_flags = flag_original_source_as_target = 0x02
flag_buddy_as_target = 0x04 (When this flag is not set, buddy will be the attacker when buddy is defined)
27 SCRIPT_COMMAND_GO_LOCK_STATE source or target must be WorldObject
* datalong = flag_go_lock = 0x01, flag_go_unlock = 0x02,
flag_go_nonInteract = 0x04, flag_go_interact = 0x08
* datalong2 = go entry (searching closest to source (if worldobject) or target
* datalong3 = go search radius
28 SCRIPT_COMMAND_STAND_STATE source = Unit (or WorldObject when creature entry defined), target = Unit (or none)
* datalong = stand state (enum UnitStandStateType)
* datalong2 = creature entry (searching for a buddy, closest to source)
* datalong3 = creature search radius
* data_flags = flag_target_as_source = 0x01