Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.
Panel

Table Structure

...

Name

Value

Param1

Param2

Param3

Param4

Param5

Param6

Comment

SMART_ACTION_NONE

0







Do nothing

SMART_ACTION_TALK

1

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)




Param2 in Milliseconds.

SMART_ACTION_SET_FACTION

2

FactionID (or 0 for default)






Sets faction to creature.

SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL

3

Creature_template.entry(param1)

Creature_template.modelID(param2)





Take DisplayID of creature (param1) OR Turn to DisplayID (param2) OR Both = 0 for Demorph

SMART_ACTION_SOUND

4

SoundId

onlySelf





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

SMART_ACTION_PLAY_EMOTE

5

EmoteId






Play Emote

SMART_ACTION_FAIL_QUEST

6

QuestID






Fail Quest of Target

SMART_ACTION_OFFER_QUEST

7

QuestID

directAdd (0/1)





Add Quest to Target

SMART_ACTION_SET_REACT_STATE

8

State






React State. Can be Passive (0), Defensive (1), Aggressive (2), Assist (3).

SMART_ACTION_ACTIVATE_GOBJECT

9







Activate Object

SMART_ACTION_RANDOM_EMOTE

10

EmoteId1

EmoteId2

EmoteId3...




Play Random Emote

SMART_ACTION_CAST

11

SpellId

castFlags

triggeredFlags




Cast Spell ID at Target

SMART_ACTION_SUMMON_CREATURE

12

creature_template.entry

Summon type

duration in ms

attackInvoker



Summon Unit

SMART_ACTION_THREAT_SINGLE_PCT

13

Threat% inc

Threat% dec





Change Threat Percentage for Single Target

SMART_ACTION_THREAT_ALL_PCT

14

Threat% inc

Threat% dec





Change Threat Percentage for All Enemies

SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS

15

QuestID







SMART_ACTION_UNUSED_16

16








SMART_ACTION_SET_EMOTE_STATE

17

EmoteId






Play Emote Continuously

SMART_ACTION_SET_UNIT_FLAG

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





Can set Multi-able flags at once

SMART_ACTION_REMOVE_UNIT_FLAG

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





Can Remove Multi-able flags at once

SMART_ACTION_AUTO_ATTACK

20

AllowAttackState (0 = Stop attack, anything else means continue attacking)






Stop or Continue Automatic Attack.

SMART_ACTION_ALLOW_COMBAT_MOVEMENT

21

AllowCombatMovement (0 = Stop combat based movement, anything else continue attacking)






Allow or Disable Combat Movement

SMART_ACTION_SET_EVENT_PHASE

22

smart_scripts.event_phase_mask







SMART_ACTION_INC_EVENT_PHASE

23

Increment

Decrement





Set param1 OR param2 (not both). Value 0 has no effect.

SMART_ACTION_EVADE

24







Evade Incoming Attack

SMART_ACTION_FLEE_FOR_ASSIST

25

0/1 (If you want the fleeing NPC to say attempts to flee text on flee, use 1 on param1. For no message use 0.)






If you want the fleeing NPC to say '%s attempts to run away in fear' on flee, use 1 on param1. 0 for no message.

SMART_ACTION_CALL_GROUPEVENTHAPPENS

26

QuestID







SMART_ACTION_COMBAT_STOP

27








SMART_ACTION_REMOVEAURASFROMSPELL

28

Spellid






0 removes all auras

SMART_ACTION_FOLLOW

29

Distance (0 = Default value)

Angle (0 = Default value)

End creature_template.entry

credit

creditType (0monsterkill, 1event)


Follow Target

SMART_ACTION_RANDOM_PHASE

30

smart_scripts.event_phase_mask
1

smart_scripts.event_phase_mask
2

smart_scripts.event_phase_mask 3

smart_scripts.event_phase_mask 4

smart_scripts.event_phase_mask 5

smart_scripts.event_phase_mask
6


SMART_ACTION_RANDOM_PHASE_RANGE

31

smart_scripts.event_phase_mask minimum

smart_scripts.event_phase_mask maximum






SMART_ACTION_RESET_GOBJECT

32







Reset Gameobject

SMART_ACTION_CALL_KILLEDMONSTER

33

Creature_template.entry






This is the ID from quest_template.RequiredNpcOrGo

SMART_ACTION_SET_INST_DATA

34

Field

Data

Type (0 = SetData, 1 = SetBossState)




Set Instance Data

SMART_ACTION_SET_INST_DATA64

35

Field






Set Instance Data uint64

SMART_ACTION_UPDATE_TEMPLATE

36

Creature_template.entry

Update Level





Updates creature_template to given entry

SMART_ACTION_DIE

37







Kill Target

SMART_ACTION_SET_IN_COMBAT_WITH_ZONE

38








SMART_ACTION_CALL_FOR_HELP

39

Radius in yards that other creatures must be to acknowledge the cry for help.

0/1 (say calls for help text)





If you want the NPC to say '%s calls for help!'. Use 1 on param1, 0 for no message.

SMART_ACTION_SET_SHEATH

40

Sheath (0-unarmed, 1-melee, 2-ranged)







SMART_ACTION_FORCE_DESPAWN

41

timer






Despawn Target after param1 Milliseconds

SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL

42

flat hp value

percent hp value





If you use both params, only percent will be used.

SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL

43

creature_template.entry

creature_template.modelID





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

SMART_ACTION_SET_INGAME_PHASE_MASK

44

creature.phasemask

0 = remove / 1 = add






SMART_ACTION_SET_DATA

45

Field

Data





Set Data For Target, can be used with SMART_EVENT_DATA_SET

SMART_ACTION_UNUSED_46

46








SMART_ACTION_SET_VISIBILITY

47

0/1






Makes creature Visible = 1  or  Invisible = 0

SMART_ACTION_SET_ACTIVE

48

0/1







SMART_ACTION_ATTACK_START

49







Allows basic melee swings to creature.

SMART_ACTION_SUMMON_GO

50

gameobject_template.entry

De-spawn time in seconds.





Spawns Gameobject, use target_type to set spawn position.

SMART_ACTION_KILL_UNIT

51







Kills Creature.

SMART_ACTION_ACTIVATE_TAXI

52

TaxiID






Sends player to flight path. You have to be close to Flight Master, which gives Taxi ID you need.

SMART_ACTION_WP_START

53

0 = walk / 1 = run

waypoints.entry

canRepeat

quest_template.id

despawntime

reactState

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

SMART_ACTION_WP_PAUSE

54

time (in ms)






Creature pauses its Waypoint Movement for given time.

SMART_ACTION_WP_STOP

55

despawnTime

quest_template.id

fail (0/1)




Creature stops its Waypoint Movement.

SMART_ACTION_ADD_ITEM

56

item_template.entry

count





Adds item(s) to player.

SMART_ACTION_REMOVE_ITEM

57

item_template.entry

count





Removes item(s) from player.

SMART_ACTION_INSTALL_AI_TEMPLATE

58

TemplateID (see Predefined SAI templates below)







SMART_ACTION_SET_RUN

59

0 = Off / 1 = On







SMART_ACTION_SET_DISABLE_GRAVITY

60

0 = On / 1 = Off






Only works for creatures with inhabit air.

SMART_ACTION_SET_SWIM

61

0 = Off / 1 = On







SMART_ACTION_TELEPORT

62

MapID






Continue this action with the TARGET_TYPE column. Use any target_type (except 0), and use target_x, target_y, target_z, target_o as the coordinates

SMART_ACTION_SET_COUNTER

63

counterIDvalue

reset (0/1)





SMART_ACTION_STORE_TARGET_LIST

64

varID







SMART_ACTION_WP_RESUME

65







Creature continues in its Waypoint Movement.

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







SMART_ACTION_CREATE_TIMED_EVENT

67

id

InitialMin

InitialMax

RepeatMin(only if it repeats)

RepeatMax(only if it repeats)

chance


SMART_ACTION_PLAYMOVIE

68

entry







SMART_ACTION_MOVE_TO_POS

69

PointId

isTransport (0 or 1)

disablePathfinding (0 or 1)

ContactDistance



PointId is called by SMART_EVENT_MOVEMENTINFORM. Continue this action with the TARGET_TYPE column. Use any target_type, and use target_x, target_y, target_z, target_o as the coordinates

SMART_ACTION_RESPAWN_TARGET

70

Respawntime in seconds for gameobjects (parameter for gameobjects only)







SMART_ACTION_EQUIP

71

creature_equip_template.CreatureID

Slotmask

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_CLOSE_GOSSIP

72







Closes gossip window.

SMART_ACTION_TRIGGER_TIMED_EVENT

73

id(>1)







SMART_ACTION_REMOVE_TIMED_EVENT

74

id(>1)







SMART_ACTION_ADD_AURA

75

SpellId






Adds aura to player(s). Use target_type 17 to make AoE aura.

SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT

76







WARNING: CAN CRASH CORE, do not use if you dont know what you are doing

SMART_ACTION_RESET_SCRIPT_BASE_OBJECT

77








SMART_ACTION_CALL_SCRIPT_RESET

78








SMART_ACTION_SET_RANGED_MOVEMENT

79

attackDistance

attackAngle





Sets movement to follow at a specific range to the target.

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)

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






SMART_ACTION_SET_NPC_FLAG

81

Creature_template.npcflag







SMART_ACTION_ADD_NPC_FLAG

82

Creature_template.npcflag







SMART_ACTION_REMOVE_NPC_FLAG

83

Creature_template.npcflag







SMART_ACTION_SIMPLE_TALK

84

creature_text.groupid






Makes a player say text. SMART_EVENT_TEXT_OVER is not triggered and whispers can not be used.

SMART_ACTION_INVOKER_CAST

85

SpellID

castFlags

triggeredFlags




if avaliable, last used invoker will cast spellId with castFlags on targets

SMART_ACTION_CROSS_CAST

86

SpellID

castFlags

CasterTargetType (caster is selected here, use it as target_type)

CasterTarget (target_param1)

CasterTarget (target_param2)

CasterTarget (target_param3)

This action is used to make selected caster (in CasterTargetType) to cast spell. Actual target is entered in target_type as normally.

SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST

87

EntryOrGuid 1 (smart_scripts.entryorguid * 100 + n)

EntryOrGuid 2 (smart_scripts.entryorguid * 100 + n)

EntryOrGuid 3 (smart_scripts.entryorguid * 100 + n)

EntryOrGuid 4 (smart_scripts.entryorguid * 100 + n)

EntryOrGuid 5 (smart_scripts.entryorguid * 100 + n)

EntryOrGuid 6 (smart_scripts.entryorguid * 100 + n)

Will select one entry from the ones provided. 0 is ignored.

SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST

88

EntryOrGuid 1 (smart_scripts.entryorguid * 100 + n)

EntryOrGuid 2 (smart_scripts.entryorguid * 100 + n)





0 is ignored.

SMART_ACTION_RANDOM_MOVE

89

Radius






Creature moves to random position in given radius.

SMART_ACTION_SET_UNIT_FIELD_BYTES_1

90

Value

Type






SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1

91

Value

Type






SMART_ACTION_INTERRUPT_SPELL

92

With delay (0/1)

SpellId

Instant (0/1)




This action allows you to interrupt the current spell being cast. If you do not set the spellId, the core will find the current spell depending on the withDelay and the withInstant values.

SMART_ACTION_SEND_GO_CUSTOM_ANIM

93

animprogress (0-255)







SMART_ACTION_SET_DYNAMIC_FLAG

94

creature.dynamicflags







SMART_ACTION_ADD_DYNAMIC_FLAG

95

creature.dynamicflags







SMART_ACTION_REMOVE_DYNAMIC_FLAG

96

creature.dynamicflags







SMART_ACTION_JUMP_TO_POS

97

Speed XY

Speed Z






SMART_ACTION_SEND_GOSSIP_MENU

98

gossip_menu.entry

gossip_menu.text_id
(same value as npc_text.ID)





Can be used together with 'SMART_EVENT_GOSSIP_HELLO' to set custom gossip.

SMART_ACTION_GO_SET_LOOT_STATE

99

LootState (0 - Not ready, 1 - Ready, 2 - Activated, 3 - Just deactivated)







SMART_ACTION_SEND_TARGET_TO_TARGET

100

Id






Send targets previously stored with SMART_ACTION_STORE_TARGET, to another npc/go, the other npc/go can then access them as if it was its own stored list

SMART_ACTION_SET_HOME_POS

101







Use with SMART_TARGET_SELF or SMART_TARGET_POSITION

SMART_ACTION_SET_HEALTH_REGEN

102

0/1






Sets the current creatures health regen on or off.

SMART_ACTION_SET_ROOT1030/1




Enables or disables creature movement
SMART_ACTION_SET_GO_FLAG104gameobject_template_addon.flags




oldFlag = newFlag
SMART_ACTION_ADD_GO_FLAG105gameobject_template_addon.flags




oldFlag |= newFlag
SMART_ACTION_REMOVE_GO_FLAG106gameobject_template_addon.flags




oldFlag &= ~newFlag
SMART_ACTION_SUMMON_CREATURE_GROUP107creature_summon_groups.groupIdAttack invoker (0/1)



Use creature_summon_groups table. SAI target has no effect, use 0
SMART_ACTION_SET_POWER108Power typeNew power




SMART_ACTION_ADD_POWER109Power typePower to add




SMART_ACTION_REMOVE_POWER110Power typePower to remove




SMART_ACTION_GAME_EVENT_STOP111GameEventId





SMART_ACTION_GAME_EVENT_START112GameEventId





SMART_ACTION_START_CLOSEST_WAYPOINT113wp1wp2wp3wp4

wp5


wp6Make target follow closest waypoint to its location
SMART_ACTION_MOVE_OFFSET114





Makes the creature to fly up xx yards up to the sky (from current position)
SMART_ACTION_RANDOM_SOUND115soundId1soundId2soundId3soundId4soundId5onlySelf
SMART_ACTION_SET_CORPSE_DELAY116timer





SMART_ACTION_DISABLE_EVADE117disable evade (1) / re-enable (0)





SMART_ACTION_GO_SET_GO_STATE118state





SMART_ACTION_SET_CAN_FLY1190/1





SMART_ACTION_REMOVE_AURAS_BY_TYPE120Type





SMART_ACTION_SET_SIGHT_DIST121SightDistance





SMART_ACTION_FLEE122FleeTime





SMART_ACTION_ADD_THREAT123+threat-threat




SMART_ACTION_LOAD_EQUIPMENT124Id





SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT125id min rangeid max range




SMART_ACTION_REMOVE_ALL_GAMEOBJECTS126






SMART_ACTION_STOP_MOTION127StopMovingmovementExpired




...

Name

Value

target_param1

target_param2

target_param3

target_x

target_y

target_z

target_o

Comment

SMART_TARGET_NONE

0








None.

SMART_TARGET_SELF

1








Self cast.

SMART_TARGET_VICTIM

2








Our current target. (ie: highest aggro)

SMART_TARGET_HOSTILE_SECOND_AGGRO

3








Second highest aggro.

SMART_TARGET_HOSTILE_LAST_AGGRO

4








Dead last on aggro.

SMART_TARGET_HOSTILE_RANDOM

5








Just any random target on our threat list.

SMART_TARGET_HOSTILE_RANDOM_NOT_TOP

6








Any random target except top threat.

SMART_TARGET_ACTION_INVOKER

7








Unit who caused this Event to occur.

SMART_TARGET_POSITION

8




x

y

z

o

Use xyz from event params.

SMART_TARGET_CREATURE_RANGE

9

creature Entry (0 any)

minDist

maxDist





(Random?) creature with specified ID within specified range.

SMART_TARGET_CREATURE_GUID

10

guid

entry






Creature with specified GUID.

SMART_TARGET_CREATURE_DISTANCE

11

creature Entry (0 any)

maxDist






Creature with specified ID within distance. (Different from #9?)

SMART_TARGET_STORED

12

id







Uses pre-stored target(list)

SMART_TARGET_GAMEOBJECT_RANGE

13

GO Entry (0 any)

minDist

maxDist





(Random?) object with specified ID within specified range.

SMART_TARGET_GAMEOBJECT_GUID

14

guid

entry






Object with specified GUID.

SMART_TARGET_GAMEOBJECT_DISTANCE

15

GO Entry (0 any)

maxDist






Object with specified ID within distance. (Different from #13?)

SMART_TARGET_INVOKER_PARTY

16








Invoker's party members

SMART_TARGET_PLAYER_RANGE

17

minDist

maxDist






(Random?) player within specified range.

SMART_TARGET_PLAYER_DISTANCE

18

maxDist







(Random?) player within specified distance. (Different from #17?)

SMART_TARGET_CLOSEST_CREATURE

19

creature Entry (0 any)

maxDist (Can be from 0-100 yards)

dead? (0/1)





Closest creature with specified ID within specified range.

SMART_TARGET_CLOSEST_GAMEOBJECT

20

GO Entry (0 any)

maxDist (Can be from 0-100 yards)






Closest object with specified ID within specified range.

SMART_TARGET_CLOSEST_PLAYER

21

maxDist







Closest player within specified range.

SMART_TARGET_ACTION_INVOKER_VEHICLE

22








Unit's vehicle who caused this Event to occur

SMART_TARGET_OWNER_OR_SUMMONER

23








Unit's owner or summoner

SMART_TARGET_THREAT_LIST

24








All units on creature's threat list

SMART_TARGET_CLOSEST_ENEMY25maxDistplayerOnly (0/1)




Any attackable target (creature or player) within maxDist
SMART_TARGET_CLOSEST_FRIENDLY26maxDistplayerOnly (0/1)




Any friendly unit (creature, player or pet) within maxDist
SMART_TARGET_LOOT_RECIPIENTS27






All tagging players
SMART_TARGET_FARTHEST28maxDistplayerOnlyisInLos (0/1)



Farthest unit on the threat list

comment

Commenting on SAI uses a template which is the following: (with an example)

...