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

-

EmoteId

+

EmoteId

CooldownMin

CooldownMax

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

SMART_EVENT_TEXT_OVER

52

-

creature_text.GroupID

-

creature.id (0 any)

+

creature_text.GroupID

+

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

-

gossip_menu_option.MenuID

-

gossip_menu_option.OptionID

+

gossip_menu_option.MenuID

+

gossip_menu_option.OptionID




-On gossip clicked (gossip_menu_option). +On gossip clicked (gossip_menu_option).

SMART_EVENT_JUST_CREATED

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

SMART_EVENT_GAME_EVENT_START

68

-

game_event.eventEntry

+

game_event.eventEntry



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


-On game_event started. +On game_event started.

SMART_EVENT_GAME_EVENT_END

69

-

game_event.eventEntry

+

game_event.eventEntry



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


-On game_event ended. +On game_event ended.

SMART_EVENT_GO_STATE_CHANGED

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

SMART_ACTION_TALK

1

-

creature_text.GroupID

+

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)

@@ -1704,7 +1706,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)



@@ -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

-

EmoteId

+

EmoteId



@@ -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

-

quest_template.id

+

quest_template.id

directAdd (0/1)


@@ -1830,12 +1832,12 @@ 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

-

EmoteId4

-

EmoteId5

-

EmoteId6

+

EmoteId1

+

EmoteId2

+

EmoteId3

+

EmoteId4

+

EmoteId5

+

EmoteId6

Play Random Emote

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

SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS

15

-

quest_template.id

+

quest_template.id



@@ -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

-

EmoteId

+

EmoteId



@@ -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

-

quest_template.id

+

quest_template.id



@@ -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)

-

End creature_template.entry

+

End creature_template.entry

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

-

creature_template.entry

+

creature_template.entry



@@ -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

@@ -2232,7 +2234,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


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

SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL

43

creature_template.entry

-

creature_template.modelidx

+

creature_template.modelidx



@@ -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

-

creature.phaseMask

+

creature.phaseMask

mask


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

SMART_ACTION_SUMMON_GO

50

-

gameobject_template.entry

+

gameobject_template.entry

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

-

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

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

SMART_ACTION_WP_STOP

55

despawnTime

-

quest_template.id

+

quest_template.id

fail (0/1)


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

SMART_ACTION_ADD_ITEM

56

-

item_template.entry

+

item_template.entry

count


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

SMART_ACTION_REMOVE_ITEM

57

-

item_template.entry

+

item_template.entry

count


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

SMART_ACTION_TELEPORT

62

-

MapID

+

MapID



@@ -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

-

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

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

SMART_ACTION_SET_NPC_FLAG

81

-

creature_template.npcflag

+

creature_template.npcflag



@@ -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

-

creature_template.npcflag

+

creature_template.npcflag



@@ -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

-

creature_template.npcflag

+

creature_template.npcflag



@@ -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

-

creature_text.GroupID

+

creature_text.GroupID



@@ -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

-

creature_template.dynamicflags

+

creature_template.dynamicflags



@@ -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

-

creature_template.dynamicflags

+

creature_template.dynamicflags



@@ -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

-

creature_template.dynamicflags

+

creature_template.dynamicflags



@@ -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.entry

-

gossip_menu.text_id
-(same value as npc_text.ID)

+

gossip_menu.entry

+

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

-

gameobject_template_addon.flags

+

gameobject_template_addon.flags



@@ -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

-

gameobject_template_addon.flags

+

gameobject_template_addon.flags



@@ -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

-

gameobject_template_addon.flags

+

gameobject_template_addon.flags



@@ -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

-

creature_summon_groups.groupId

+

creature_summon_groups.groupId

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

-

game_event.eventEntry

+

game_event.eventEntry



@@ -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

-

game_event.eventEntry

+

game_event.eventEntry



@@ -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)

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

SMART_TARGET_CREATURE_GUID

10

-

creature.guid

-

creature_template.entry

+

creature.guid

+

creature_template.entry

getFromHashMap (0/1, this does not work in instances!)


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

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

-

gameobject.guid

-

gameobject_template.entry

+

gameobject.guid

+

gameobject_template.entry

getFromHashMap (0/1, this does not work in instances!)


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

SMART_TARGET_GAMEOBJECT_DISTANCE

15

-

gameobject_template.entry (0 any)

+

gameobject_template.entry (0 any)

maxDist


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

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)


@@ -4915,4 +4917,3 @@ SMART\_EVENT\_TRANSPORT\_ADDCREATURE SMART\_EVENT\_DATA\_SET - -- cgit