mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10497] Add a crude documentation of script command processing
It is mostly copied from source files and should be subject for further improvement. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
cb877e1281
commit
167b7bfeac
2 changed files with 180 additions and 1 deletions
179
doc/script_commands.txt
Normal file
179
doc/script_commands.txt
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
-- --------------------------
|
||||
## Script processing
|
||||
-- --------------------------
|
||||
|
||||
-- --------------------------
|
||||
## 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
|
||||
-- --------------------------
|
||||
|
||||
1 multipurpose field, 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
|
||||
* 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
|
||||
|
||||
1 SCRIPT_COMMAND_EMOTE source = unit
|
||||
* datalong = emote_id
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10496"
|
||||
#define REVISION_NR "10497"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue