Waypoint scripts

From OregonCore Wiki
Revision as of 17:49, 6 January 2015 by Zaffy (Talk | contribs) (Created page with "{| align="right" | __TOC__ |} Category: OregonCore World database tables Back to world database list of tables. <big>'''The `waypoint_script...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back to world database list of tables.


The `waypoint_scripts` table

Schema Last Modified: TC1-1828 - Schema Verified: Rev 665


Structure

Field Type Attributes Key Null Default Extra Comment
id int(11) unsigned NO 0
delay int(11) unsigned NO 0
command int(11) unsigned NO 0
datalong int(11) unsigned NO 0
datalong2 int(11) unsigned NO 0
dataint int(11) unsigned NO 0
x float signed NO 0
y float signed NO 0
z float signed NO 0
o float signed NO 0
guid int(11) signed NO 0


Description of the fields

id

delay

Delay in seconds before this current step of the script activates. 0 = instant.

command

The type of action performed by the script after delay seconds have passed. The value of this field affects what other fields also need to be set.

The following commands can be used:

Command Name Description
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.
9 RESPAWN_GAMEOBJECT Spawns a despawned gameobject.
10 TEMP_SUMMON_CREATURE Temporarily summon 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 LOAD_PATH Load path to unit, then unit start waypoint movement.


OtherFields

Depending on what command was used, the meaning and use for the following fields varies.

  • SCRIPT_COMMAND_TALK = 0
    • dataint: The text the creature should say. From which table?
    • datalong: 0=say, 1=whisper, 2=yell, 3=text emote


  • SCRIPT_COMMAND_EMOTE = 1
    • datalong: The emote ID to play.


  • SCRIPT_COMMAND_FIELD_SET = 2
    • datalong: Index of the field.
    • datalong2: Value to place at the index.


  • SCRIPT_COMMAND_MOVE_TO = 3
    • datalong2: Length of the motion.
    • x: X position to move to.
    • y: Y position to move to.
    • z: Z position to move to.
    • o: Orientation to face.


  • SCRIPT_COMMAND_FLAG_SET = 4
    • datalong: Field index to be set.
    • datalong2: Flag bit(s) to set.


  • SCRIPT_COMMAND_FLAG_REMOVE = 5
    • datalong: Field index to be unset.
    • datalong2: Flag bit(s) to unset.


  • SCRIPT_COMMAND_TELEPORT_TO = 6
    • datalong: Target Map ID. See Maps.dbc
    • x: Teleport target x coordinate.
    • y: Teleport target y coordinate.
    • z: Teleport target z coordinate.
    • o: Teleport target orientation.


  • SCRIPT_COMMAND_QUEST_EXPLORED = 7
    • datalong: Quest ID whose external status should be satisfied
    • datalong2: Distance away from the NPC/object that the player can be and have the script still take effect


  • SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9
    • datalong: Guid of the gameobject to respawn. See gameobject.guid.
    • datalong2: Despawn time in seconds. If the value is < 5 seconds: 5 is used instead.


  • SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10
    • datalong: Entry of the summoned creature from creature_template.entry.
    • datalong2: Despawn time in ms.
    • x: Summon target x coordinate.
    • y: Summon target y coordinate.
    • z: Summon target z coordinate.
    • o: Summon target orientation.


  • SCRIPT_COMMAND_OPEN_DOOR = 11
    • datalong: Guid of the activated door. It's a gameobject.guid.
    • datalong2: Delay before closing again the door. If the value is < 5 seconds: 5 is used instead.


  • SCRIPT_COMMAND_CLOSE_DOOR = 12
    • datalong: Guid of the activated door. It's a gameobject.guid.
    • datalong2: Delay before opening again the door. If the value is < 5 seconds: 5 is used instead.


  • SCRIPT_COMMAND_ACTIVATE_OBJECT = 13
    • The source must be a unit and the target a game object.


  • SCRIPT_COMMAND_REMOVE_AURA = 14
    • datalong: Spell ID.
    • datalong2: If value > 0, then cast on the source; otherwise cast on the target.


  • SCRIPT_COMMAND_CAST_SPELL = 15
    • datalong: Spell ID.
    • datalong2: If value > 0, then cast on the source; otherwise cast on the target.


  • SCRIPT_COMMAND_LOAD_PATH = 16
    • datalong: PathID from waypoint_data table.
    • datalong2: If value > 0, means waypoint movement is repeatable.

guid