From 5898b8a8ba79d7d2c1dd210876d2c6c4e1b0d192 Mon Sep 17 00:00:00 2001 From: Stoabrogga <38475780+Stoabrogga@users.noreply.github.com> Date: Fri, 26 Jul 2019 10:05:26 +0200 Subject: Update smart_scripts documentation (#100) --- docs/smart_scripts.md | 2539 ++++++++++++++++++++++++------------------------- 1 file changed, 1252 insertions(+), 1287 deletions(-) diff --git a/docs/smart_scripts.md b/docs/smart_scripts.md index f1ff56c..e3cf150 100644 --- a/docs/smart_scripts.md +++ b/docs/smart_scripts.md @@ -2,7 +2,7 @@ **Table Structure** - +
@@ -16,11 +16,11 @@ - + - + - + @@ -103,7 +103,7 @@ - + @@ -115,7 +115,7 @@

- + - + - + - + - - - - - - - - + + + + + + + + @@ -193,7 +193,7 @@

- + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - + @@ -349,9 +350,10 @@

- + - + @@ -362,9 +364,10 @@

- + - + @@ -375,9 +378,10 @@

- + - + @@ -390,12 +394,12 @@ - - + + @@ -405,7 +409,7 @@ **Description of the fields** -Please note: ![](attachments/2130108/2130327.png) means that the feature/option is not (yet) implemented. +Please note: ❌ means that the feature/option is not (yet) implemented. ### entryorguid @@ -428,12 +432,12 @@ Please note: ![](attachments/2130108/2130327.png) means that the feature/option | SMART\_SCRIPT\_TYPE\_CREATURE | 0 | | SMART\_SCRIPT\_TYPE\_GAMEOBJECT | 1 | | SMART\_SCRIPT\_TYPE\_AREATRIGGER | 2 | - | ![](attachments/2130108/2130327.png) SMART\_SCRIPT\_TYPE\_EVENT | 3 | - | ![](attachments/2130108/2130327.png) SMART\_SCRIPT\_TYPE\_GOSSIP | 4 | - | ![](attachments/2130108/2130327.png) SMART\_SCRIPT\_TYPE\_QUEST | 5 | - | ![](attachments/2130108/2130327.png) SMART\_SCRIPT\_TYPE\_SPELL | 6 | - | ![](attachments/2130108/2130327.png) SMART\_SCRIPT\_TYPE\_TRANSPORT | 7 | - | ![](attachments/2130108/2130327.png) SMART\_SCRIPT\_TYPE\_INSTANCE | 8 | + | ❌ SMART\_SCRIPT\_TYPE\_EVENT | 3 | + | ❌ SMART\_SCRIPT\_TYPE\_GOSSIP | 4 | + | ❌ SMART\_SCRIPT\_TYPE\_QUEST | 5 | + | ❌ SMART\_SCRIPT\_TYPE\_SPELL | 6 | + | ❌ SMART\_SCRIPT\_TYPE\_TRANSPORT | 7 | + | ❌ SMART\_SCRIPT\_TYPE\_INSTANCE | 8 | | SMART\_SCRIPT\_TYPE\_TIMED\_ACTIONLIST | 9 | ### id @@ -446,7 +450,7 @@ Please note: ![](attachments/2130108/2130327.png) means that the feature/option -- Example: if id = 0 and link = 1; id 1 will only be able to occur if id = 0 was triggered. +- Example: if id = 0 and link = 1; id 1 will only be able to occur if id = 0 was triggered (id 1 has to use event\_type SMART\_EVENT\_LINK). @@ -454,9 +458,9 @@ Please note: ![](attachments/2130108/2130327.png) means that the feature/option ### event\_phase\_mask -When dealing with phases, *phase IDs* have to be used. There are 10 (9+1) different phases: 1, 2, ... 9 and the default 0. +When dealing with phases, *phase IDs* have to be used. There are 13 (12+1) different phases: 1, 2, ... 12 and the default 0. -**Example:** The script is in phase 0 by default - If we want it to go to phase 1, we got two choices: +**Example:** The script is in phase 0 by default - If we want it to go to phase 1, we got two choices: - SMART\_ACTION\_INC\_PHASE by 1 or SMART\_ACTION\_SET\_PHASE 1 @@ -468,18 +472,21 @@ If the script is in phase 1 and want to skip to phase 2: - SMART\_ACTION\_INC\_PHASE by 1 or SMART\_ACTION\_SET\_PHASE 2 -| Name | Flag | Hex | Comment | -|----------------------------------|------|-------|----------------------------| -| SMART\_EVENT\_PHASE\_ALWAYS\_BIT | 0 | 0x000 | Means all phases (1 ... 9) | -| SMART\_EVENT\_PHASE\_1 | 1 | 0x001 | Phase 1 only. | -| SMART\_EVENT\_PHASE\_2 | 2 | 0x002 | Phase 2 only. | -| SMART\_EVENT\_PHASE\_3 | 4 | 0x004 | Phase 3 only. | -| SMART\_EVENT\_PHASE\_4 | 8 | 0x008 | Phase 4 only. | -| SMART\_EVENT\_PHASE\_5 | 16 | 0x010 | Phase 5 only. | -| SMART\_EVENT\_PHASE\_6 | 32 | 0x020 | Phase 6 only. | -| SMART\_EVENT\_PHASE\_7 | 64 | 0x040 | Phase 7 only. | -| SMART\_EVENT\_PHASE\_8 | 128 | 0x080 | Phase 8 only. | -| SMART\_EVENT\_PHASE\_9 | 256 | 0x100 | Phase 9 only. | +| Name | Flag | Hex | Comment | +|----------------------------------|------|-------|-----------------------------| +| SMART\_EVENT\_PHASE\_ALWAYS\_BIT | 0 | 0x000 | Means all phases (1 ... 12) | +| SMART\_EVENT\_PHASE\_1 | 1 | 0x001 | Phase 1 only. | +| SMART\_EVENT\_PHASE\_2 | 2 | 0x002 | Phase 2 only. | +| SMART\_EVENT\_PHASE\_3 | 4 | 0x004 | Phase 3 only. | +| SMART\_EVENT\_PHASE\_4 | 8 | 0x008 | Phase 4 only. | +| SMART\_EVENT\_PHASE\_5 | 16 | 0x010 | Phase 5 only. | +| SMART\_EVENT\_PHASE\_6 | 32 | 0x020 | Phase 6 only. | +| SMART\_EVENT\_PHASE\_7 | 64 | 0x040 | Phase 7 only. | +| SMART\_EVENT\_PHASE\_8 | 128 | 0x080 | Phase 8 only. | +| SMART\_EVENT\_PHASE\_9 | 256 | 0x100 | Phase 9 only. | +| SMART\_EVENT\_PHASE\_10 | 512 | 0x200 | Phase 10 only. | +| SMART\_EVENT\_PHASE\_11 | 1024 | 0x400 | Phase 11 only. | +| SMART\_EVENT\_PHASE\_12 | 2048 | 0x800 | Phase 12 only. | - Event will only be able to occur if creature/GO is in this phase. @@ -487,13 +494,9 @@ If the script is in phase 1 and want to skip to phase 2: - Example: If we want an event to only be able to occure in phase 1 and 4, **event\_phase\_mask** = 1+8 = 9 - - -- (Inverse of EAI: event\_inverse\_phase\_mask). - ### event\_chance -This is the probability of the event to occur as a percentage from 0-100. So, if you want the event to occur roughly half of the time, then set this to 50.  +This is the probability of the event to occur as a percentage from 0-100. So, if you want the event to occur roughly half of the time, then set this to 50. ### event\_flags @@ -538,18 +541,18 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - - - + + + + - - - - + + + + @@ -558,23 +561,20 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - - - + + + + - - - - + + + +

Field

entryorguid

bigint(20)

int(11)

signed

PRI

NO

0

NULL



@@ -77,7 +77,7 @@

event_phase_mask

tinyint(3)

smallint(5)

unsigned


event_flags

tinyint(3)

smallint(5)

unsigned


event_param1

event_param1

int(10)

unsigned


@@ -128,7 +128,7 @@

event_param2

event_param2

int(10)

unsigned


@@ -141,7 +141,7 @@

event_param3

event_param3

int(10)

unsigned


@@ -154,7 +154,7 @@

event_param4

event_param4

int(10)

unsigned


@@ -167,17 +167,17 @@

event_param5int(10)unsigned
-
NO0
-

-

event_param5

int(10)

unsigned


+

NO

0


+


+

action_type

action_param1

action_param1

int(10)

unsigned


@@ -206,7 +206,7 @@

action_param2

action_param2

int(10)

unsigned


@@ -219,7 +219,7 @@

action_param3

action_param3

int(10)

unsigned


@@ -232,7 +232,7 @@

action_param4

action_param4

int(10)

unsigned


@@ -245,7 +245,7 @@

action_param5

action_param5

int(10)

unsigned


@@ -258,7 +258,7 @@

action_param6

action_param6

int(10)

unsigned


@@ -284,7 +284,7 @@

target_param1

target_param1

int(10)

unsigned


@@ -297,7 +297,7 @@

target_param2

target_param2

int(10)

unsigned


@@ -310,35 +310,36 @@

target_param3

target_param3

int(10)

unsigned


NO

NO

0



target_param4int(10)unsigned
-
NONO
-

-

target_param4

int(10)

unsigned


+

NO

0


+


+

target_x

target_x

float

signed


+


NO

target_y

target_y

float

signed


+


NO

target_z

target_z

float

signed


+


NO

target_o

target_o

float

signed


+


NO

comment

text

signed


NO


NO

NULL


Event Comment

Event only occurs in heroic raid

SMART_EVENT_FLAG_RESERVED_5320x20
-

SMART_EVENT_FLAG_RESERVED_5

32

0x20


+

SMART_EVENT_FLAG_RESERVED_6640x40
-

SMART_EVENT_FLAG_RESERVED_6

64

0x40


+

SMART_EVENT_FLAG_DEBUG_ONLY

Event only occurs in debug build

SMART_EVENT_FLAG_DONT_RESET2560x100Event will not reset in SmartScript::OnReset()

SMART_EVENT_FLAG_DONT_RESET

256

0x100

Event will not reset in SmartScript::OnReset()

SMART_EVENT_FLAG_WHILE_CHARMED5120x200Event can occur while player controlled

❌ SMART_EVENT_FLAG_WHILE_CHARMED

512

0x200

Event can occur while player controlled (not yet implemented, see https://github.com/azerothcore/azerothcore-wotlk/pull/1431)

-** -** - - Sets if the event should not repeat or should only happen in a given instance/dungeon difficulty (if applicable); @@ -583,7 +583,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if ### event\_type - +
@@ -604,8 +604,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -615,19 +615,19 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - + @@ -637,8 +637,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -652,8 +652,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -663,8 +663,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -678,8 +678,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -693,8 +693,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -704,8 +704,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -715,8 +715,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -732,13 +732,13 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + @@ -748,8 +748,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -760,8 +760,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -771,8 +771,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -783,10 +783,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - + + @@ -795,8 +795,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -807,8 +807,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -818,8 +818,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -832,8 +832,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -846,8 +846,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -861,19 +861,19 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + - + - - + + @@ -883,8 +883,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -894,8 +894,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -909,8 +909,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -932,10 +932,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -946,23 +946,24 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + - - + + @@ -976,8 +977,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -987,8 +988,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -998,8 +999,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1009,8 +1010,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1022,9 +1023,9 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1034,8 +1035,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1049,8 +1050,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1064,10 +1065,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1076,8 +1077,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1089,8 +1090,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1102,13 +1103,13 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + - - + + @@ -1136,14 +1137,14 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + - - + + @@ -1171,14 +1172,14 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1186,10 +1187,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - + + @@ -1201,14 +1202,14 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + - + - + - + - + - + - - + + + - @@ -1311,8 +1312,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1326,8 +1327,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1339,8 +1340,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1352,8 +1353,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1365,8 +1366,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1378,8 +1379,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1392,10 +1393,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1404,10 +1405,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - + + @@ -1420,22 +1421,22 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + - - + + - - + + @@ -1448,10 +1449,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1464,8 +1465,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + @@ -1479,26 +1480,27 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + - - - + + + @@ -1509,37 +1511,37 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- + - + + - - + - + - - + + @@ -1551,10 +1553,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1566,10 +1568,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + @@ -1581,38 +1583,38 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

- - + + - - - - - - + + + + + + - - - + + + - - + + @@ -1621,8 +1623,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1632,8 +1634,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -1643,16 +1645,16 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - + +

Name

InitialMax

RepeatMin

RepeatMax


-


+

In combat.

InitialMax

RepeatMin

RepeatMax


-


+

Out of combat.

SMART_EVENT_HEALT_PCT

SMART_EVENT_HEALTH_PCT

2

HPMin%

HPMax%

RepeatMin

RepeatMax


-


+

Health Percentage

ManaMax%

RepeatMin

RepeatMax


-


+

Mana Percentage



-


+

On Creature Aggro

CooldownMax

Player only (0/1)

Creature entry (if param3 is 0)


-


+

On Creature Kill



-


+

On Creature Death



-


+

On Creature Evade Attack

School

CooldownMin

CooldownMax


-


+

On Creature/Gameobject Spell Hit

MaxDist

RepeatMin

RepeatMax


-


+

On Target In Range

SMART_EVENT_RESPAWN

11

type (None= 0, Map = 1, Area = 2)

type (None = 0, Map = 1, Area = 2)

MapId

ZoneId



-


+

On Creature/Gameobject Respawn

HPMax%

RepeatMin

RepeatMax


-


+

On Target Health Percentage

Spell id (0 any)



-


+

On Target Casting Spell

Radius

RepeatMin

RepeatMax


-


+

On Friendly Health Deficit

RepeatMax



-

-


+


+

SMART_EVENT_FRIENDLY_MISSING_BUFF

Radius

RepeatMin

RepeatMax


-


+

On Friendly Lost Buff

CooldownMax



-


+

On Creature/Gameobject Summoned Unit

ManaMax%

RepeatMin

RepeatMax


-


+

On Target Mana Percentage



-


+

On Target Accepted Quest



-


+

On Target Rewarded Quest



-


+

On Creature Reached Home

SMART_EVENT_RECEIVE_EMOTE

22

EmoteId

EmoteId

CooldownMin

CooldownMax

condition


-


+

On Receive Emote.

Stacks

RepeatMin

RepeatMax


-


+

On Creature Has Aura

Stacks

RepeatMin

RepeatMax


-


+

On Target Buffed With Spell



-


+

After Combat, On Respawn or Spawn



-

-


+


+

SMART_EVENT_PASSENGER_REMOVED



-

-


+


+

SMART_EVENT_CHARMED

29

0 (on charm apply) / 1 (on charm remove)





-


+


+

On Creature Charmed



-


+

On Target Charmed

School

RepeatMin

RepeatMax


-


+

On Target Spell Hit

MaxDmg

RepeatMin

RepeatMax


-


+

On Creature Damaged

MaxDmg

RepeatMin

RepeatMax


-


+

On Target Damaged



-
WAYPOINT_MOTION_TYPE = 2,  POINT_MOTION_TYPE = 8


+

ESCORT_MOTION_TYPE = 17, POINT_MOTION_TYPE = 8

SMART_EVENT_SUMMON_DESPAWNED

CooldownMax



-


+

On Summoned Unit Despawned



-


+

On Creature Corpse Removed



-

-


+


+

SMART_EVENT_DATA_SET

Value

CooldownMin

CooldownMax


-


+

On Creature/Gameobject Data Set, Can be used with SMART_ACTION_SET_DATA



-


+

On Creature Waypoint ID Started



-


+

On Creature Waypoint ID Reached
-

SMART_EVENT_TRANSPORT_ADDPLAYER

+

❌ SMART_EVENT_TRANSPORT_ADDPLAYER

41


@@ -1119,14 +1120,14 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-

-


+


+

-

SMART_EVENT_TRANSPORT_ADDCREATURE

+

❌ SMART_EVENT_TRANSPORT_ADDCREATURE

42

Entry (0 any)



-

-


+


+

-

SMART_EVENT_TRANSPORT_REMOVE_PLAYER

+

❌ SMART_EVENT_TRANSPORT_REMOVE_PLAYER

43


@@ -1154,14 +1155,14 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-

-


+


+

-

SMART_EVENT_TRANSPORT_RELOCATE

+

❌ SMART_EVENT_TRANSPORT_RELOCATE

44

PointId



-

-


+


+

-

SMART_EVENT_INSTANCE_PLAYER_ENTER

+

❌ SMART_EVENT_INSTANCE_PLAYER_ENTER

45

Team (0 any)

CooldownMax



-

-


+


+

SMART_EVENT_AREATRIGGER_ONTRIGGER



-

-


+


+

-

SMART_EVENT_QUEST_ACCEPTED

+

❌ SMART_EVENT_QUEST_ACCEPTED

47


@@ -1219,13 +1220,13 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-


+

On Target Quest Accepted
-

SMART_EVENT_QUEST_OBJ_COMPLETION

+

❌ SMART_EVENT_QUEST_OBJ_COMPLETION

48


@@ -1236,13 +1237,13 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-


+

On Target Quest Objective Completed
-

SMART_EVENT_QUEST_COMPLETION

+

❌ SMART_EVENT_QUEST_COMPLETION

49


@@ -1253,13 +1254,13 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-


+

On Target Quest Completed
-

SMART_EVENT_QUEST_REWARDED

+

❌ SMART_EVENT_QUEST_REWARDED

50


@@ -1270,13 +1271,13 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-


+

On Target Quest Rewarded
-

SMART_EVENT_QUEST_FAIL

+

❌ SMART_EVENT_QUEST_FAIL

51


@@ -1287,21 +1288,21 @@ This is the probability of the event to occur as a percentage from 0-100. So, if



-


+

On Target Quest Field

SMART_EVENT_TEXT_OVER

52

GroupId (from creature_text)

Creature.Id (0 any)

creature_text.GroupID

creature.id (0 any)


+




-
On TEXT_OVER Event Triggered After SMART_ACTION_TALK

MaxHeal

CooldownMin

CooldownMax


-


+

On Creature Received Healing



-


+

On Creature Just spawned



-


+

On Creature Paused at Waypoint ID



-


+

On Creature Resumed after Waypoint ID



-


+

On Creature Stopped On Waypoint ID



-


+

On Creature Waypoint Path Ended



-

-


+


+

SMART_EVENT_UPDATE

InitialMax

RepeatMin

RepeatMax


-

-


+


+

SMART_EVENT_LINK



-


+

Used to link together multiple events as a chain of events.

SMART_EVENT_GOSSIP_SELECT

62

menu_id

id

gossip_menu_option.MenuID

gossip_menu_option.OptionID




-
On gossip clicked (gossip_menu_option).


+

On gossip clicked (gossip_menu_option).

SMART_EVENT_JUST_CREATED



-

-


+


+

SMART_EVENT_GOSSIP_HELLO



-


+

On Right-Click Creature/Gameobject that have gossip enabled.



-

-


+


+

-

SMART_EVENT_EVENT_PHASE_CHANGE

+

SMART_EVENT_UNUSED_66

66

event phase mask





-
On event phase mask set


+


+

UNUSED

SMART_EVENT_IS_BEHIND_TARGET



-


+

On Creature is behind target.

SMART_EVENT_GAME_EVENT_START

68

game_event.eventEntry

game_event.eventEntry


+





-
On game_event started.On game_event started.

SMART_EVENT_GAME_EVENT_END

69

game_event.eventEntry

game_event.eventEntry





-
On game_event ended.


+

On game_event ended.

SMART_EVENT_GO_STATE_CHANGED



-

-


+


+

SMART_EVENT_GO_EVENT_INFORM



-

-


+


+

SMART_EVENT_ACTION_DONE



-

-


+


+

SMART_EVENT_ON_SPELLCLICK 73
-

-

-

-

-

-


+


+


+


+


+


+

SMART_EVENT_FRIENDLY_HEALTH_PCT 74minHpPctmaxHpPctrepeatMin

minHpPct

maxHpPct

repeatMin

repeatMax


-

-


+


+

SMART_EVENT_DISTANCE_CREATUREdatabase entry distance repeat interval (ms)
-


+

On creature guid OR any instance of creature entry is within distance.

database entry distance repeat interval (ms)
-


+

On gameobject guid OR any instance of gameobject entry is within distance.

value cooldownMin cooldownMax
-
If the value of specified counterID is equal to a specified value


+

If the value of specified counterID is equal to a specified value
### action\_type - +
@@ -1687,8 +1689,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - + + - + - - + + - - + + - + - + @@ -1794,7 +1797,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - - - - - - + + + + + + - - + + - + - + - - + + - + @@ -1895,7 +1897,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - - + + - + +

If false set creature_template.unit_flags

+

If true set creature_template.unit_flags2

+

If false set creature_template.unit_flags

+

If true set creature_template.unit_flags2

- + - + @@ -2073,7 +2077,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - + + - - + - + @@ -2136,20 +2140,20 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - - - - - - + + + + + + - - + + - + - + - + - + @@ -2341,7 +2346,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - - + + - + @@ -2453,17 +2456,16 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - + @@ -2502,12 +2504,12 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - + @@ -2529,7 +2531,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -2542,7 +2544,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -2557,7 +2559,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -2572,7 +2574,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - + - + - - - + + + @@ -2925,7 +2927,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + @@ -2941,7 +2943,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if - + - + - +

Name

SMART_ACTION_TALK

1

Creature_text.groupid

Duration to wait before SMART_EVENT_TEXT_OVER is triggered.

creature_text.GroupID

Duration to wait before SMART_EVENT_TEXT_OVER is triggered.

0 It will try to trigger talk of the target

1 Set target as talk target (used for $vars in texts and whisper target)


@@ -1702,7 +1704,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_SET_FACTION

2

FactionID (or 0 for default)

FactionID (or 0 for default)



@@ -1718,8 +1720,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL

3

Creature_template.entry(param1)

Creature_template.modelID(param2)

creature_template.entry(param1)

creature_template.modelidx(param2)



@@ -1735,19 +1737,20 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

4

SoundId

onlySelf (0/1)

Distant Sound (0/1)




Play Sound; TextRange = 0 only sends sound to self, TextRange = 1 sends sound to everyone in visibility range


+

Play Sound; onlySelf = 1 only sends sound to self, onlySelf = 0 sends sound to everyone in visibility range

SMART_ACTION_PLAY_EMOTE

5

EmoteId

EmoteId



@@ -1779,7 +1782,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_OFFER_QUEST

7

QuestID

quest_template.id

directAdd (0/1)


SMART_ACTION_SET_REACT_STATE

8

State

ReactState



@@ -1827,40 +1830,39 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_RANDOM_EMOTE

10

EmoteId1

EmoteId2

EmoteId3

Emote4

Emote5

Emote6

EmoteId1

EmoteId2

EmoteId3

EmoteId4

EmoteId5

EmoteId6

Play Random Emote

SMART_ACTION_CAST

11

SpellId

castFlags

triggeredFlags

castFlags

limitTargets (0 = all targets)




Cast Spell ID at Target

Cast Spell ID at Target(s)

SMART_ACTION_SUMMON_CREATURE

12

creature_template.entry

Summon type

Summon type

duration in ms

attackInvoker


-

attackInvoker (0/1/2)

attackScriptOwner (0/1)


Summon Unit

Summon Unit; attackInvoker 1: attack target; attackInvoker 2: attack actual invoker

SMART_ACTION_THREAT_SINGLE_PCT

SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS

15

QuestID

quest_template.id



@@ -1910,10 +1912,12 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_SET_INGAME_PHASE_ID

SMART_ACTION_RESERVED_16

16

phaseId

apply/remove (1/0)


+


+



@@ -1927,7 +1931,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_SET_EMOTE_STATE

17

EmoteId

EmoteId



@@ -1945,8 +1949,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

18

(may be more than one field OR'd together)

type

-

If false set creature_template.unit_flags

-

If true set creature_template.unit_flags2



@@ -1962,8 +1966,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

19

(may be more than one field OR'd together)

type

-

If false set  creature_template.unit_flags

-

If true set creature_template.unit_flags2



@@ -2009,7 +2013,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_SET_EVENT_PHASE

22

smart_scripts.event_phase_mask

event_phase_mask



@@ -2020,7 +2024,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if


Set event phase 0-9 (the actual values, no bit mask!)

Set event phase 0-12 (the actual values, no bit mask!)

SMART_ACTION_INC_EVENT_PHASE

SMART_ACTION_CALL_GROUPEVENTHAPPENS

26

QuestID

quest_template.id



@@ -2090,8 +2094,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_COMBAT_STOP

27


-


+



@@ -2108,7 +2112,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_REMOVEAURASFROMSPELL

28

Spellid

Spellid (0 removes all auras)

charges (0 removes aura)



@@ -2119,16 +2124,15 @@ This is the probability of the event to occur as a percentage from 0-100. So, if


0 removes all auras

SMART_ACTION_FOLLOW

29

Distance (0 = Default value)

Angle (0 = Default value)

End creature_template.entry

End creature_template.entry

credit

creditType (0monsterkill, 1event)

creditType (0 monsterkill, 1 event)


Follow Target

SMART_ACTION_RANDOM_PHASE

30

smart_scripts.event_phase_mask1

smart_scripts.event_phase_mask2

smart_scripts.event_phase_mask 3

smart_scripts.event_phase_mask 4

smart_scripts.event_phase_mask 5

smart_scripts.event_phase_mask6

event_phase_mask 1

event_phase_mask 2

event_phase_mask 3

event_phase_mask 4

event_phase_mask 5

event_phase_mask 6


SMART_ACTION_RANDOM_PHASE_RANGE

31

smart_scripts.event_phase_mask minimum

smart_scripts.event_phase_mask maximum

event_phase_mask minimum

event_phase_mask maximum



@@ -2181,7 +2185,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_CALL_KILLEDMONSTER

33

Creature_template.entry

creature_template.entry



@@ -2192,14 +2196,15 @@ This is the probability of the event to occur as a percentage from 0-100. So, if


This is the ID from quest_template.RequiredNpcOrGo

This is the ID from quest_template.RequiredNpcOrGo

SMART_ACTION_SET_INST_DATA

34

Field

Data

Type (0 = SetData, 1 = SetBossState)


+



@@ -2227,7 +2232,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_UPDATE_TEMPLATE

36

Creature_template.entry

creature_template.entry

Update Level


SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL

43

creature_template.entry

creature_template.modelID

creature_template.modelidx



@@ -2353,12 +2358,10 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

Mount to Creature Entry (param1) OR Mount to Creature Display (param2) Or both = 0 for Unmount

SMART_ACTION_SET_INGAME_PHASE_MASK (for 3.3.5)

-

SMART_ACTION_SET_INGAME_PHASE_GROUP (for 4.3.4 +)

SMART_ACTION_SET_INGAME_PHASE_MASK

44

creature.phasemask (3.3.5)

-

creature.phasegroup (4.3.4 +)

0 = remove / 1 = add (4.3.4+ only)

creature.phaseMask

mask



@@ -2415,7 +2418,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if


Makes creature Visible = 1  or  Invisible = 0

Makes creature Visible = 1 or Invisible = 0

SMART_ACTION_SET_ACTIVE

SMART_ACTION_SUMMON_GO

50

gameobject_template.entry

gameobject_template.entry

De-spawn time in seconds.

0 - For despawn when the summoner despawn or time runs out

-

1 - For despawn when time runs out

targetSummon (0/1)




Spawns Gameobject, use target_type to set spawn position.

Spawns Gameobject, use target_type to set spawn position; if an entity is specified as target and also coordinates are set (target x,y,z) those coordinates are handled as offset from the target's position; if targetSummon is 1 then the target will summon the GO on the position of the actor

SMART_ACTION_KILL_UNIT

SMART_ACTION_WP_START

53

0 = walk / 1 = run

waypoints.entry

waypoints.entry

canRepeat

quest_template.id

quest_template.id

despawntime

reactState

Creature starts Waypoint Movement. Use waypoints table to create movement.

Creature starts Waypoint Movement. Use waypoints table to create movement.

SMART_ACTION_WP_PAUSE

SMART_ACTION_WP_STOP

55

despawnTime

quest_template.id

quest_template.id

fail (0/1)


SMART_ACTION_ADD_ITEM

56

item_template.entry

item_template.entry

count


SMART_ACTION_REMOVE_ITEM

57

item_template.entry

item_template.entry

count


SMART_ACTION_INSTALL_AI_TEMPLATE

58

TemplateID (see Predefined SAI templates below)

TemplateID (see Predefined SAI templates below)



@@ -2637,7 +2639,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_TELEPORT

62

MapID

MapID



@@ -2702,7 +2704,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_SET_ORIENTATION

66

Depends on the script target.if SMART_TARGET_SELF, facing will be the same as in HomePosition, For SMART_TARGET_POSITION you need to set target_o : 0 = North, West = 1.5, South = 3, East = 4.5

Depends on the script target. If SMART_TARGET_SELF, facing will be the same as in HomePosition, For SMART_TARGET_POSITION you need to set target_o : 0 = North, West = 1.5, South = 3, East = 4.5



@@ -2778,11 +2780,11 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_EQUIP

71

creature_equip_template.CreatureID

creature_equip_template.CreatureID

Slotmask

Slot1 (item_template.entry)

Slot2 (item_template.entry)

Slot3 (item_template.entry)

Slot1 (item_template.entry)

Slot2 (item_template.entry)

Slot3 (item_template.entry)


only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), Slots1-3 are only used if no Param1 is set

SMART_ACTION_CALL_TIMED_ACTIONLIST

80

EntryOrGuid * 100 (smart_scripts.entryorguid with 00 added after the entry, or 01, 02, 03 etc. for multiple action lists)

EntryOrGuid * 100 (entryorguid with 00 added after the entry, or 01, 02, 03 etc. for multiple action lists)

timer update type(0 OOC, 1 IC, 2 ALWAYS)


SMART_ACTION_SET_NPC_FLAG

81

Creature_template.npcflag

creature_template.npcflag



@@ -2958,7 +2960,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_ADD_NPC_FLAG

82

Creature_template.npcflag

creature_template.npcflag



@@ -2975,7 +2977,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_ACTION_REMOVE_NPC_FLAG

83

Creature_template.npcflag

creature_template.npcflag



@@ -2992,7 +2994,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if

SMART_A