From 3dadcd2f56bab9ccab5c9924ef7111053f0832d2 Mon Sep 17 00:00:00 2001 From: Stoabrogga <38475780+Stoabrogga@users.noreply.github.com> Date: Tue, 30 Jul 2019 13:12:41 +0200 Subject: Update waypoints and scripts documentation (#102) --- docs/smart_scripts.md | 149 +++++++++++++++++++++++++------------------------- 1 file changed, 75 insertions(+), 74 deletions(-) (limited to 'docs/smart_scripts.md') diff --git a/docs/smart_scripts.md b/docs/smart_scripts.md index e3cf150..76f401e 100644 --- a/docs/smart_scripts.md +++ b/docs/smart_scripts.md @@ -1,3 +1,5 @@ +[Database Structure](Database-Structure) > [World-Database](World-Database) > [smart_scripts](smart_scripts) + # smart\_scripts **Table Structure** @@ -868,7 +870,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_EVENT_RECEIVE_EMOTE
22
CooldownMin
CooldownMax
SMART_EVENT_TEXT_OVER
52
creature.id (0 any)
creature.id (0 any)
@@ -1428,15 +1430,15 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_EVENT_GOSSIP_SELECT
62
SMART_EVENT_JUST_CREATED
SMART_EVENT_GAME_EVENT_START
68
@@ -1527,12 +1529,12 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_EVENT_GAME_EVENT_END
69
@@ -1541,7 +1543,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_EVENT_GO_STATE_CHANGED
SMART_ACTION_TALK
1
Duration to wait before SMART_EVENT_TEXT_OVER is triggered.
1 Set target as talk target (used for $vars in texts and whisper target)
SMART_ACTION_SET_FACTION
2
FactionID (or 0 for default)
FactionID (or 0 for default)
@@ -1720,8 +1722,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.modelidx(param2)
creature_template.entry(param1)
creature_template.modelidx(param2)
@@ -1750,7 +1752,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_PLAY_EMOTE
5
@@ -1782,7 +1784,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_OFFER_QUEST
7
directAdd (0/1)
SMART_ACTION_RANDOM_EMOTE
10
Play Random Emote
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS
15
@@ -1931,7 +1933,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SET_EMOTE_STATE
17
@@ -1949,8 +1951,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
If false set creature_template.unit_flags
+If true set creature_template.unit_flags2
@@ -1966,8 +1968,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
If false set creature_template.unit_flags
+If true set creature_template.unit_flags2
@@ -2077,7 +2079,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_CALL_GROUPEVENTHAPPENS
26
@@ -2130,7 +2132,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
29
Distance (0 = Default value)
Angle (0 = Default value)
credit
creditType (0 monsterkill, 1 event)
@@ -2185,7 +2187,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_CALL_KILLEDMONSTER
33
@@ -2196,7 +2198,7 @@ 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
SMART_ACTION_UPDATE_TEMPLATE
36
Update Level
SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL
43
creature_template.entry
@@ -2360,7 +2362,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SET_INGAME_PHASE_MASK
44
mask
SMART_ACTION_SUMMON_GO
50
De-spawn time in seconds.
targetSummon (0/1)
@@ -2504,12 +2506,12 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_WP_START
53
0 = walk / 1 = run
canRepeat
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
fail (0/1)
SMART_ACTION_ADD_ITEM
56
count
SMART_ACTION_REMOVE_ITEM
57
count
SMART_ACTION_TELEPORT
62
@@ -2780,11 +2782,11 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_EQUIP
71
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_SET_NPC_FLAG
81
@@ -2960,7 +2962,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_ADD_NPC_FLAG
82
@@ -2977,7 +2979,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_REMOVE_NPC_FLAG
83
@@ -2994,7 +2996,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SIMPLE_TALK
84
@@ -3140,7 +3142,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SET_DYNAMIC_FLAG
94
@@ -3157,7 +3159,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_ADD_DYNAMIC_FLAG
95
@@ -3174,7 +3176,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_REMOVE_DYNAMIC_FLAG
96
@@ -3205,9 +3207,9 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SEND_GOSSIP_MENU
98
gossip_menu.text_id
-(same value as npc_text.ID)
gossip_menu.text_id
+(same value as npc_text.ID)
@@ -3304,7 +3306,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SET_GO_FLAG
104
@@ -3320,7 +3322,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_ADD_GO_FLAG
105
@@ -3336,7 +3338,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_REMOVE_GO_FLAG
106
@@ -3352,7 +3354,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_SUMMON_CREATURE_GROUP
107
attackInvoker (0/1)
attackScriptOwner (0/1)
@@ -3414,7 +3416,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_GAME_EVENT_STOP
111
@@ -3431,7 +3433,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_ACTION_GAME_EVENT_START
112
@@ -4370,7 +4372,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_TARGET_CREATURE_RANGE
9
creature_template.entry (0 any)
creature_template.entry (0 any)
minDist
maxDist
alive state (1 alive, 2 dead, 0 both)
SMART_TARGET_CREATURE_GUID
10
getFromHashMap (0/1, this does not work in instances!)
SMART_TARGET_CREATURE_DISTANCE
11
creature_template.entry (0 any)
creature_template.entry (0 any)
maxDist
alive state (1 alive, 2 dead, 0 both)
@@ -4443,7 +4445,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_TARGET_GAMEOBJECT_RANGE
13
gameobject_template.entry (0 any)
gameobject_template.entry (0 any)
minDist
maxDist
@@ -4461,8 +4463,8 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_TARGET_GAMEOBJECT_GUID
14
getFromHashMap (0/1, this does not work in instances!)
SMART_TARGET_GAMEOBJECT_DISTANCE
15
gameobject_template.entry (0 any)
gameobject_template.entry (0 any)
maxDist
SMART_TARGET_CLOSEST_CREATURE
19
creature_template.entry (0 any)
creature_template.entry (0 any)
maxDist (Can be from 0-100 yards)
dead? (0/1)
@@ -4575,7 +4577,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
SMART_TARGET_CLOSEST_GAMEOBJECT
20
gameobject_template.entry (0 any)
gameobject_template.entry (0 any)
maxDist (Can be from 0-100 yards)