action_type

master 分支适用,其余版本可能略有区别,详细解释参见源码 SmartScriptMgr.h

Action_type_NamelangValueparam1param2param3param4param5param6Comment
SMART_ACTION_NONE = 0 0No action
SMART_ACTION_TALK = 1 1GroupIDduration in ms to wait before
text_over event is triggered
useTalkTarget:
0: target talks to invoker
1: creature talks to target
action_param3 only relevant for creature targets
SMART_ACTION_SET_FACTION = 2 2FactionTemplate ID (0: default)Set Faction to creature
SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3 3Creature_template entryCreature_template.modelIDSet one or the other; both 0: demorph
SMART_ACTION_SOUND = 4 4SoundEntry IDonlySelf? (0/1)distantSound? (0/1)distantSound: external sound source
SMART_ACTION_PLAY_EMOTE = 5 5Emote IDEmoteId
SMART_ACTION_FAIL_QUEST = 6 6Quest IDFail quest of target(target_type)
SMART_ACTION_OFFER_QUEST = 7 7Quest IDdirectAdd:
0 - offer quest
1 - add quest to log
Offer quest to target(target_type)
SMART_ACTION_SET_REACT_STATE = 8 8

state,取值参考 enum ReactStates

0:被动(PASSIVE)

1:防御(DEFENSIVE)

2:主动(AGGRESSIVE)

3:协助(ASSIST)

Set react state
SMART_ACTION_ACTIVATE_GOBJECT = 9 9Set gameobject active
SMART_ACTION_RANDOM_EMOTE = 10 10Emote ID1Emote ID2Emote ID3Emote ID4Emote ID5Emote ID6Play random emote
SMART_ACTION_CAST = 11 11Spell IDenum SmartCastFlags

enum TriggerCastFlags

Cast spell at taget
SMART_ACTION_SUMMON_CREATURE = 12 12Creature_template entrySummonTypeduration in msattackInvoker? (0/1)SmartActionSummonCreatureFlags:
0x1 : PersonalSpawn
0x2 : PreferUnit

Summon Creature

Summon Type:

1:Despawns after a specified time OR when the creature disappears

2:Despawns after a specified time OR when the creature dies:

3:Despawns after a specified time

4:Despawns after a specified time after the creature is out of combat

5:Despawns instantly after death

6:Despawns after a specified time after death

7:Despawns when the creature disappears

8:Despawns when UnSummon() is called

SMART_ACTION_THREAT_SINGLE_PCT = 13 13Threat% incr.Threat% decr.Change threat percentage for single target
SMART_ACTION_THREAT_ALL_PCT = 14 14Threat% incr.Threat% decr.Change threat percentage for all targets
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS = 15 15QuestIDUNUSED, DO NOT REUSE.
SMART_ACTION_SET_INGAME_PHASE_GROUP = 16 16phaseIdused on 4.3.4 and higher scripts
SMART_ACTION_SET_EMOTE_STATE = 17 17Emote IDPlay emote continuously
SMART_ACTION_SET_UNIT_FLAG = 18 18flags0: set unit_flags
1: set unit_flags2
UNUSED, DO NOT REUSE.
SMART_ACTION_REMOVE_UNIT_FLAG = 19 19flags0: set unit_flags
1: set unit_flags2
UNUSED, DO NOT REUSE.
SMART_ACTION_AUTO_ATTACK = 20 20allowAttack? (0/1)Start or Stop autoattack (0 = stop attack, anything else means continue attacking)
SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21 21allowMovement? (0/1)Allow or Disable Combat Movement (0 = stop combat based movement, anything else continue attacking)
SMART_ACTION_SET_EVENT_PHASE = 22 22smart_scripts.event_phase_maskSet phase,see event_phase_mask(66)
SMART_ACTION_INC_EVENT_PHASE = 23 23incrementdecrementonly increment or decrement,should not be 0
SMART_ACTION_EVADE = 24 240: to respawn pos.
1: to last stored home pos.
Enter Evade mode.
SMART_ACTION_FLEE_FOR_ASSIST = 25 25withEmote? (0/1)Emote: '%s attempts to run away in fear'
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26 26quest IDUNUSED, DO NOT REUSE.
SMART_ACTION_COMBAT_STOP = 27 27No Params
SMART_ACTION_REMOVEAURASFROMSPELL = 28 28Spell ID
0: removes all auras
charges (0: all)onlyOwned? (0/1)
SMART_ACTION_FOLLOW = 29 29distance
0: default
angle
0: default
EndCreatureEntrycreditcreditType:
0: monsterkill
1: event
Following ends when reaching end. creature.Credit is rewarded upon StopFollow.
SMART_ACTION_RANDOM_PHASE = 30 30smart_scripts.event_phase_mask1smart_scripts.event_phase_mask2smart_scripts.event_phase_mask3smart_scripts.event_phase_mask4smart_scripts.event_phase_mask5smart_scripts.event_phase_mask6Set random phase,see event_phase_mask(66)
SMART_ACTION_RANDOM_PHASE_RANGE = 31 31smart_scripts.event_phase_mask minimumsmart_scripts.event_phase_mask maximumSet random phase radius(PhaseMin, PhaseMax),see event_phase_mask(66)
SMART_ACTION_RESET_GOBJECT = 32 32
SMART_ACTION_CALL_KILLEDMONSTER = 33 33Creature_template entrySatisfy RequiredNpcOrGo
SMART_ACTION_SET_INST_DATA = 34 34fieldIddatatype:
0: SetData
1: SetBossState
if type:
0: arbitrary data
1: EncounterState
SMART_ACTION_SET_INST_DATA64 = 35 35fieldIdsave target's guid in instance's fieldId
SMART_ACTION_UPDATE_TEMPLATE = 36 36Creature_template entryupdateLevel? (0/1)Updates creature_template to given entry.Can set level from given creature entry.
SMART_ACTION_DIE = 37 37No Params
SMART_ACTION_SET_IN_COMBAT_WITH_ZONE = 38 38No Params
SMART_ACTION_CALL_FOR_HELP = 39 39rangewithEmote? (0/1)Emote: '%s calls for help!'.
SMART_ACTION_SET_SHEATH = 40 40Sheath:
0: unarmed
1: melee
2: ranged
Set sheath
SMART_ACTION_FORCE_DESPAWN = 41 41despawnDelay in msforceRespawnTimer in secForce despawn
SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42 42flat hp valuepercent hp valueMinHpValue(+pct, -flat),pct takes precedent over flat
SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43 43Creature_template entrycreature.template.ModelIDSet one or the other; both 0: dismount
SMART_ACTION_SET_INGAME_PHASE_ID = 44 44creature.phaseIdSets phaseMask of target(target_type)
SMART_ACTION_SET_DATA = 45 45fieldIddata

设置触发数据,与下列 Event Type 联用:

SMART_EVENT_DATA_SET  = 38

SMART_ACTION_ATTACK_STOP = 46 46Stop melee, spell casting during combat, chasing the target and facing
SMART_ACTION_SET_VISIBILITY = 47 47visible? (0/1)set target visibility
SMART_ACTION_SET_ACTIVE = 48 48active? (0/1)make target grid active/inactive
SMART_ACTION_ATTACK_START = 49 49
SMART_ACTION_SUMMON_GO = 50 50gameobject entrydespawnTime in secSummonTypeSpawns Gameobject, use target_type to set spawn position
SMART_ACTION_KILL_UNIT = 51 51Forces non-player target to die
SMART_ACTION_ACTIVATE_TAXI = 52 52TaxiPath IDSends target player to flight path. You have to be close to Flight Master, which gives Taxi ID you need
SMART_ACTION_WP_START = 53 530 = walk / 1 = runWaypoint entrycanRepeat? (0/1)quest_template.iddespawntimereactStateCreature starts Waypoint Movement. Use waypoints table to create movement
SMART_ACTION_WP_PAUSE = 54 54time in msCreature pauses its Waypoint Movement for given time
SMART_ACTION_WP_STOP = 55 55despawnTimequest IDfailQuest? (0/1)Creature stops its Waypoint Movement
SMART_ACTION_ADD_ITEM = 56 56item entrycountAdds item(s) to player
SMART_ACTION_REMOVE_ITEM = 57 57item entrycountRemoves item(s) from player.
SMART_ACTION_INSTALL_AI_TEMPLATE = 58 58UNUSED, DO NOT REUSE
SMART_ACTION_SET_RUN = 59 59enable? (0/1)Set Run
SMART_ACTION_SET_DISABLE_GRAVITY = 60 60disable? (0/1)Only works for creatures with inhabit type(air)
SMART_ACTION_SET_SWIM = 61 61UNUSED, DO NOT REUSE
SMART_ACTION_TELEPORT = 62 62Map IDUse World Pos. from target_type to set destination
SMART_ACTION_SET_COUNTER = 63 63counterIDvaluereset? (0/1)

设置计数器,与下列Event Type 联用:

SMART_EVENT_COUNTER_SET = 77

SMART_ACTION_STORE_TARGET_LIST = 64 64varIDStore target list
SMART_ACTION_WP_RESUME = 65 65Creature continues in its Waypoint Movement.
SMART_ACTION_SET_ORIENTATION = 66 66orientation:
1: HomePos.
8: target_o value
!0 - facing target
Orientation depends on target_type:
1: smart_target_self
8: smart_target_position
!0: smart_target_none
SMART_ACTION_CREATE_TIMED_EVENT = 67 67idInitialMinInitialMaxRepeatMin (0: no repeat)RepeatMax (0: no repeat)chance (0: 100%)设置计时触发事件,与下列 Event Type 联用:

SMART_EVENT_TIMED_EVENT_TRIGGERED = 59

SMART_ACTION_PLAYMOVIE = 68 68MovieIDRequires target player
SMART_ACTION_MOVE_TO_POS = 69 69PointIDonTransport? (0/1)noPathfinding? (0/1)ContactDistancePointID is called by smart_event_movementform(71).Position is set with target_type
SMART_ACTION_ENABLE_TEMP_GOBJ = 70 70respawn time in secGameobject selected by target_type
SMART_ACTION_EQUIP = 71 71creature_equip_template.creatureId

slotmask

0: slot1 |  slot2 | slot3 (1+2+4)

1:slot1

2:slot2

4:slot3

right(1) item entryleft(2) item entryranged(3) item entrySet equipment on target creature.Slotmask slot1, slot2, slot3 , 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 entry is set.Slots1-3 item entries are only used if no equipment ID is set.
SMART_ACTION_CLOSE_GOSSIP = 72 72Closes gossip window
SMART_ACTION_TRIGGER_TIMED_EVENT = 73 73id(>1)Trigger timed event
SMART_ACTION_REMOVE_TIMED_EVENT = 74 74id(>1)Removed timed event
SMART_ACTION_ADD_AURA = 75 75UNUSED, DO NOT REUSE
SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76 76UNUSED, DO NOT REUSE
SMART_ACTION_RESET_SCRIPT_BASE_OBJECT = 77 77UNUSED, DO NOT REUSE
SMART_ACTION_CALL_SCRIPT_RESET = 78 78none
SMART_ACTION_SET_RANGED_MOVEMENT = 79 79attackDistancearrackAngleSets movement to follow at a specific range to the target
SMART_ACTION_CALL_TIMED_ACTIONLIST = 80 80EntryOrGuid * 100updateType:
0: out of combat
1: in combat
2: always
can override in going action list? (0/1)Start TimedActionList on SAI enabled target
SMART_ACTION_SET_NPC_FLAG = 81 81npcflagReplace npcflags on creature taget
SMART_ACTION_ADD_NPC_FLAG = 82 82npcflagAdd npcflags to creature taget
SMART_ACTION_REMOVE_NPC_FLAG = 83 83npcflagRemove npcflags from creature taget
SMART_ACTION_SIMPLE_TALK = 84 84groupIDgroupID, can be used to make players say groupID, Text_over event is not triggered, whisper can not be used (Target units will say the text)
SMART_ACTION_SELF_CAST = 85 85Spell IDCastFlagsTriggeredFlagsmaxTargets (0: all)The targets will cast the spell on it themself
SMART_ACTION_CROSS_CAST = 86 86Spell IDCastFlagscaster_target_typecaster_target_param1caster_target_param2caster_target_param3The origonal target fields as Destination target, CasterTargets will cast spellID on all Targets .Use with caution if targeting multiple * multiple units
SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST = 87 87entryorguid1entryorguid2entryorguid3entryorguid4entryorguid5entryorguid6Start random (id > 0) TimedActionList on SAI enabled target
SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST = 88 88min. entryorguidmax. entryorguidStart random (min <= id <= max) TimedActionList on SAI enabled target
SMART_ACTION_RANDOM_MOVE = 89 89Radius(0: idleMove)Creature target or self moves maxDist in random direction
SMART_ACTION_SET_UNIT_FIELD_BYTES_1 = 90 90Value

Type:
0:
UnitStandStateType

2: UnitVisFlags
3: AnimTier

Set units BYTES_1 at target offset
SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1 = 91 91ValueType:
0: StandState
2: UnitVisFlags
3: AnimTier
Remove units BYTES_1 at target offset
SMART_ACTION_INTERRUPT_SPELL = 92 92withDelayed? (0/1)Spell IDwithInstant? (0/1)Interrupt the current spell being cast by target.Without Spell ID, the core will find the current spell depending on withDelay and withInstant
SMART_ACTION_SEND_GO_CUSTOM_ANIM = 93 93UNUSED, DO NOT REUSE
SMART_ACTION_SET_DYNAMIC_FLAG = 94 94UNUSED, DO NOT REUSE
SMART_ACTION_ADD_DYNAMIC_FLAG = 95 95UNUSED, DO NOT REUSE
SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96 96UNUSED, DO NOT REUSE
SMART_ACTION_JUMP_TO_POS = 97 97speedXYspeedZGravityUseDefaultGravityPointIdContactDistanceJump to positon
SMART_ACTION_SEND_GOSSIP_MENU = 98 98MenuIDTextIDCan be used together with smart_event_gossip_hello(64) to set custom gossip.
SMART_ACTION_GO_SET_LOOT_STATE = 99 99

state

  • 0 → Not Ready
  • 1 → Ready
  • 2 → Activated
  • 3 → Just Deactivated
Set state of target gameobject
SMART_ACTION_SEND_TARGET_TO_TARGET = 100 100varIdSend 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 101Set target creatures home pos. to:
smart_target_self(1): creatures current World pos
smart_target_position(8): World pos. from target_type
smart_target_none (!0): targets current World pos
SMART_ACTION_SET_HEALTH_REGEN = 102 102enable? (0/1)Enable/Disable health regeneration for target creature.
SMART_ACTION_SET_ROOT = 103 103enable? (0/1)Root/Unroot target creature
SMART_ACTION_SET_GO_FLAG = 104 104UNUSED, DO NOT REUSE
SMART_ACTION_ADD_GO_FLAG = 105 105UNUSED, DO NOT REUSE
SMART_ACTION_REMOVE_GO_FLAG = 106 106UNUSED, DO NOT REUSE
SMART_ACTION_SUMMON_CREATURE_GROUP = 107 107creature_summon_groups.groupIDattackInvoker? (0/1)target not used
SMART_ACTION_SET_POWER = 108 108PowerTypenew powerSet power
SMART_ACTION_ADD_POWER = 109 109PowerTypepower to addAdd power
SMART_ACTION_REMOVE_POWER = 110 110PowerTypepower to removeRemove power
SMART_ACTION_GAME_EVENT_STOP = 111 111GameEventIdGame event stop
SMART_ACTION_GAME_EVENT_START = 112 112GameEventIdGame event start
SMART_ACTION_START_CLOSEST_WAYPOINT = 113 113entry1entry2entry3entry4entry5entry6Make target creature follow waypoint path closest to its location
SMART_ACTION_MOVE_OFFSET = 114 114PointIdUse smart_target_self (1) and also set target World pos. to use as offset.
SMART_ACTION_RANDOM_SOUND = 115 115SoundEntry ID1SoundEntry ID2SoundEntry ID3SoundEntry ID4SoundEntry ID5onlySelf? (0/1)Play random sound from list
SMART_ACTION_SET_CORPSE_DELAY = 116 116timeincludeDecayRatio? (0/1)Set corpse despawn for target creature
SMART_ACTION_DISABLE_EVADE = 117 117disabled? (0/1)Disable/Enable evade mode for target creature
SMART_ACTION_GO_SET_GO_STATE = 118 118

state

GO_STATE_ACTIVE = 0 // show in world as used and not reset (closed door open)

GO_STATE_READY = 1 // show in world as ready (closed door close)

GO_STATE_ACTIVE_ALTERNATIVE = 2 // show in world as used in alt way and not reset (closed door open by cannon fire)

GO_STATE_TRANSPORT_ACTIVE   = 24

GO_STATE_TRANSPORT_STOPPED  = 25

Set state for target gameobject
SMART_ACTION_SET_CAN_FLY = 119 119UNUSED, DO NOT REUSE
SMART_ACTION_REMOVE_AURAS_BY_TYPE = 120 120UNUSED, DO NOT REUSE
SMART_ACTION_SET_SIGHT_DIST = 121 121UNUSED, DO NOT REUSE
SMART_ACTION_FLEE = 122 122UNUSED, DO NOT REUSE
SMART_ACTION_ADD_THREAT = 123 123flat incr.flat decr.Change target threat
SMART_ACTION_LOAD_EQUIPMENT = 124 124equipment IDforceUnequip? (0/1)Load equipment on target creature
SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT = 125 125min. idmax. idid min range, id max range
SMART_ACTION_REMOVE_ALL_GAMEOBJECTS = 126 126UNUSED, DO NOT REUSE
SMART_ACTION_PAUSE_MOVEMENT = 127 127MovementSlot
0: default
1: active
2: controlled
pause in msforce? (0/1)Pause movement
SMART_ACTION_PLAY_ANIMKIT = 128 128idtype
0: oneShot
1: aiAnim
2: meleeAnim
3: movementAnim
Don't use on 3.3.5a
SMART_ACTION_SCENE_PLAY = 129 129sceneIdDon't use on 3.3.5a
SMART_ACTION_SCENE_CANCEL = 130 130sceneIdDon't use on 3.3.5a
SMART_ACTION_SPAWN_SPAWNGROUP = 131 131groupIdminDelay in secmaxDelay in secspawnFlagsSpawn on spawngroupid
SMART_ACTION_DESPAWN_SPAWNGROUP = 132 132groupIdminDelay in secmaxDelay in secspawnFlagsDespawn on spawngroupid
SMART_ACTION_RESPAWN_BY_SPAWNID = 133 133spawnType
0: creature
1: gameobject
spawnIdSelf or target determines the map to repsawn on
SMART_ACTION_INVOKER_CAST = 134 134Spell IDCastFlagsTriggeredFlagsmaxTargets (0: all)If avaliable, last invoker will cast spell ID with castFlags on targets.
SMART_ACTION_PLAY_CINEMATIC = 135 135CinematicSequence IDcinematicPlay cinematic for target player.
SMART_ACTION_SET_MOVEMENT_SPEED = 136 136MovementTypespeedIntegerspeedFractionSet movement speed of target creature.
SMART_ACTION_PLAY_SPELL_VISUAL_KIT = 137 137SpellVisualKit IDkitType (unknown values, copypaste from packet dumps)durationRESERVED, PENDING CHERRYPICK
SMART_ACTION_OVERRIDE_LIGHT = 138 138zoneIdareaLightIdlightId (overrideLightId)fadeInTime (transition Milliseconds)Override skybox visual in area
SMART_ACTION_OVERRIDE_WEATHER = 139 139zoneIdWeather IDintensity (0: low - 1: full)Override weather in area
SMART_ACTION_SET_AI_ANIM_KIT = 140 140DEPRECATED, DO REUSE
SMART_ACTION_SET_HOVER = 141 141enable? (01/)Enable/Disable target unit hover
SMART_ACTION_SET_HEALTH_PCT = 142 142percentSet target units current health percentage
SMART_ACTION_CREATE_CONVERSATION = 143 143conversation_template.idDon't use on 3.3.5a
SMART_ACTION_SET_IMMUNE_PC = 144 144enable? (0/1)Enable/Disable target unit immunity to players
SMART_ACTION_SET_IMMUNE_NPC = 145 145enable? (0/1)Enable/Disable target unit immunity to npc
SMART_ACTION_SET_UNINTERACTIBLE = 146 146enable? (0/1)Make/Reset target unit uninteractible.
SMART_ACTION_ACTIVATE_GAMEOBJECT = 147 147GameObjectActionsActivate gameobject
SMART_ACTION_ADD_TO_STORED_TARGET_LIST = 148 148varIDAdd to stored target list
SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER = 149 149summonType
1-8
duration in msDon't use on 3.3.5a
SMART_ACTION_TRIGGER_GAME_EVENT = 150 150eventIduseSaiTargetAsGameEventSourceTrigger game event,RESERVED, PENDING CHERRYPICK
SMART_ACTION_DO_ACTION = 151 151actionIdRESERVED, PENDING CHERRYPICK

SMART_ACTION_COMPLETE_QUEST = 152

152

QuestId

Regular quests with objectives can't be completed with this action (only quests with QUEST_FLAGS_COMPLETION_EVENT, QUEST_FLAGS_COMPLETION_AREA_TRIGGER or QUEST_FLAGS_TRACKING_EVENT)

SMART_ACTION_CREDIT_QUEST_OBJECTIVE_TALK_TO = 153153
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值