Datenbank 'world'
access_requirement
achievement_criteria_data
achievement_dbc
achievement_reward
achievement_reward_locale
areatrigger_involvedrelation
areatrigger_scripts
areatrigger_tavern
areatrigger_teleport
battleground_template
battlemaster_entry
broadcast_text
broadcast_text_locale
command
conditions
creature
creature_addon
creature_classlevelstats
creature_equip_template
creature_formations
creature_loot_template
creature_model_info
creature_onkill_reputation
creature_questender
creature_questitem
creature_queststarter
creature_summon_groups
creature_template
creature_template_locale
creature_template_addon
creature_text
creature_text_locale
disables
disenchant_loot_template
event_scripts
exploration_basexp
fishing_loot_template
gameobject
gameobject_addon
gameobject_loot_template
gameobject_questender
gameobject_questitem
gameobject_queststarter
gameobject_template
gameobject_template_locale
game_event
game_event_arena_seasons
game_event_battleground_holiday
game_event_condition
game_event_creature
game_event_creature_quest
game_event_gameobject
game_event_gameobject_quest
game_event_model_equip
game_event_npcflag
game_event_npc_vendor
game_event_pool
game_event_prerequisite
game_event_quest_condition
game_event_seasonal_questrelation
game_tele
game_weather
gossip_menu
gossip_menu_option
graveyard_zone
instance_encounters
instance_template
item_enchantment_template
item_loot_template
item_set_names
item_template
lfg_dungeon_rewards
lfg_dungeon_template
linked_respawn
locales_gossip_menu_option
locales_item
locales_item_set_names
locales_npc_text
locales_page_text
locales_points_of_interest
locales_quest
mail_level_reward
mail_loot_template
milling_loot_template
npc_spellclick_spells
npc_text
npc_trainer
npc_vendor
outdoorpvp_template
page_text
pet_levelstats
pet_name_generation
pickpocketing_loot_template
playercreateinfo
playercreateinfo_action
playercreateinfo_item
playercreateinfo_skills
playercreateinfo_spell_custom
player_classlevelstats
player_factionchange_achievement
player_factionchange_items
player_factionchange_quests
player_factionchange_reputations
player_factionchange_spells
player_factionchange_titles
player_levelstats
player_xp_for_level
points_of_interest
pool_creature
pool_gameobject
pool_pool
pool_quest
pool_template
prospecting_loot_template
quest_poi
quest_offer_reward
quest_poi_points
quest_request_items
quest_template
quest_template_addon
reference_loot_template
reputation_reward_rate
reputation_spillover_template
script_waypoint
skill_discovery_template
skill_extra_item_template
skill_fishing_base_level
skill_perfect_item_template
skinning_loot_template
smart_scripts
spelldifficulty_dbc
spell_area
spell_bonus_data
spell_custom_attr
spell_dbc
spell_enchant_proc_data
spell_group
spell_group_stack_rules
spell_learn_spell
spell_linked_spell
spell_loot_template
spell_pet_auras
spell_proc
spell_proc_event
spell_ranks
spell_required
spell_scripts
spell_script_names
spell_target_position
spell_threat
transports
trinity_string
updates
updates_include
vehicle_accessory
vehicle_template_accessory
version
warden_checks
waypoints
waypoint_data
waypoint_scripts
Trinity DB, TrinityCore 2015-09-13, Tec's Ilaros WoW 3.3.5a, Datenbank 'world'

Tabelle: 'smart_scripts'

Table Structure

FieldTypeAttributesKeyNullDefaultExtraComment
entryorguidint(11)vorzeichenbehaftetPRIneinNone
source_typetinyint(3)vorzeichenlosPRInein0
idsmallint(5)vorzeichenlosPRInein0
linksmallint(5)vorzeichenlosPRInein0

event_typetinyint(3)vorzeichenlosnein0
event_phase_masktinyint(3)vorzeichenlosnein0
event_chancetinyint(3)

vorzeichenlos

nein100
event_flagstinyint(3)vorzeichenlosnein0
event_param1int(10)vorzeichenlosnein0
event_param2int(10)vorzeichenlosnein0
event_param3int(10)vorzeichenlosnein0
event_param4int(10)vorzeichenlos nein0
action_typetinyint(3)vorzeichenlosnein0
action_param1int(10)vorzeichenlosnein0
action_param2int(10)vorzeichenlosnein0
action_param3int(10)vorzeichenlosnein0
action_param4int(10)vorzeichenlosnein

0

action_param5int(10)vorzeichenlosnein0
action_param6int(10)vorzeichenlosnein0
target_typetinyint(3)vorzeichenlosnein0
target_param1int(10)vorzeichenlosnein0
target_param2int(10)vorzeichenlosnein0

target_param3int(10)vorzeichenlosnein0
target_xfloatvorzeichenbehaftetnein0
target_yfloatvorzeichenbehaftet

nein0
target_zfloatvorzeichenbehaftetnein0
target_ofloatvorzeichenbehaftetnein0
comment

textvorzeichenbehaftetneinEvent Comment

Description of the fields

Please note: means that the feature/option is not (yet) implemented.

entryorguid

  • EntryOrGuid > 0: entry of the creature / game object / etc.
  • EntryOrGuid < 0: guid of the creature / game object / etc.
  • Depends on source_type.

source_type

  • Object type: creature, game object, spell. see table below for values

    Name

    Value

    SMART_SCRIPT_TYPE_CREATURE0
    SMART_SCRIPT_TYPE_GAMEOBJECT1
    SMART_SCRIPT_TYPE_AREATRIGGER2
    SMART_SCRIPT_TYPE_EVENT3
    SMART_SCRIPT_TYPE_GOSSIP4
    SMART_SCRIPT_TYPE_QUEST5
    SMART_SCRIPT_TYPE_SPELL6
    SMART_SCRIPT_TYPE_TRANSPORT

    7
    SMART_SCRIPT_TYPE_INSTANCE8
    SMART_SCRIPT_TYPE_TIMED_ACTIONLIST9

id

  • Incremental id bound to each entryorguid & source_type (0, 1, 2, ...).
  • Simple event linking;
  • Example: if id = 0 and link = 1; id 1 will only be able to occur if id = 0 was triggered.
  • Smart_event to be used.

event_phase_mask

When dealing with phases,phase IDshave to be used.There are 10 (9+1) different phases: 1, 2, ... 9 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:

  • SMART_ACTION_INC_PHASE by 1 or SMART_ACTION_SET_PHASE 1

If the script is in phase 0 and want to skip to phase 2:

  • SMART_ACTION_INC_PHASE by 2 or SMART_ACTION_SET_PHASE 2

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
NameFlagHexComment

SMART_EVENT_PHASE_ALWAYS_BIT

00x000Means all phases (1 ... 9)
SMART_EVENT_PHASE_110x001Phase 1 only.
SMART_EVENT_PHASE_220x002Phase 2 only.
SMART_EVENT_PHASE_340x004Phase 3 only.
SMART_EVENT_PHASE_480x008Phase 4 only.
SMART_EVENT_PHASE_5160x010Phase 5 only.
SMART_EVENT_PHASE_6320x020Phase 6 only.
SMART_EVENT_PHASE_7640x040Phase 7 only.
SMART_EVENT_PHASE_81280x080Phase 8 only.
SMART_EVENT_PHASE_92560x100Phase 9 only.

  • Event will only be able to occur if creature/GO is in this phase.
  • 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.

event_flags

NameFlagHexComment
SMART_EVENT_FLAG_NOT_REPEATABLE10x01Event can not repeat
SMART_EVENT_FLAG_DIFFICULTY_020x02Event only occurs in normal dungeon
SMART_EVENT_FLAG_DIFFICULTY_140x04Event only occurs in heroic dungeon
SMART_EVENT_FLAG_DIFFICULTY_28

0x08Event only occurs in normal raid
SMART_EVENT_FLAG_DIFFICULTY_3160x10Event only occurs in heroic raid
SMART_EVENT_FLAG_DEBUG_ONLY 128 0x80 Event only occurs in debug build
SMART_EVENT_FLAG_DONT_RESET 256 0x100 Event will not reset in SmartScript::OnReset()
SMART_EVENT_FLAG_WHILE_CHARMED 512 0x200 Event can occur while player controlled


  • Sets if the event should not repeat or should only happen in a given instance/dungeon difficulty (if applicable);
  • Values can be added together (bitwise math).

event_type

Name

Value

Param1

Param2

Param3

Param4

Comment
SMART_EVENT_UPDATE_IC0InitialMinInitialMaxRepeatMinRepeatMax

In combat.

SMART_EVENT_UPDATE_OOC1InitialMinInitialMaxRepeatMinRepeatMaxOut of combat.
SMART_EVENT_HEALT_PCT2HPMin%HPMax%RepeatMinRepeatMax

Health Percentage

SMART_EVENT_MANA_PCT3ManaMin%ManaMax%RepeatMinRepeatMax

Mana Percentage

SMART_EVENT_AGGRO

4

On Creature Aggro
SMART_EVENT_KILL5CooldownMinCooldownMaxPlayer only (0/1)Creature entry (if param3 is 0)On Creature Kill
SMART_EVENT_DEATH6On Creature Death

SMART_EVENT_EVADE

7On Creature Evade Attack
SMART_EVENT_SPELLHIT8SpellIDSchoolCooldownMinCooldownMaxOn Creature/Gameobject Spell Hit
SMART_EVENT_RANGE9MinDistMaxDistRepeatMinRepeatMaxOn Target In Range
SMART_EVENT_OOC_LOS10NoHostileMaxRangeCooldownMinCooldownMaxOn Target In Distance Out of Combat
SMART_EVENT_RESPAWN11typeMapIdZoneIdOn Creature/Gameobject Respawn
SMART_EVENT_TARGET_HEALTH_PCT12HPMin%HPMax%RepeatMinRepeatMaxOn Target Health Percentage
SMART_EVENT_VICTIM_CASTING13RepeatMinRepeatMaxSpell id (0 any)On Target Casting Spell
SMART_EVENT_FRIENDLY_HEALTH14HPDeficitRadiusRepeatMinRepeatMaxOn Friendly Health Deficit
SMART_EVENT_FRIENDLY_IS_CC15

Radius

RepeatMinRepeatMax
SMART_EVENT_FRIENDLY_MISSING_BUFF16SpellIdRadiusRepeatMinRepeatMaxOn Friendly Lost Buff
SMART_EVENT_SUMMONED_UNIT17CretureId (0 all)CooldownMinCooldownMaxOn Creature/Gameobject Summoned Unit

SMART_EVENT_TARGET_MANA_PCT

18ManaMin%ManaMax%RepeatMinRepeatMaxOn Target Mana Percentage
SMART_EVENT_ACCEPTED_QUEST19QuestID (0 any)On Target Accepted Quest
SMART_EVENT_REWARD_QUEST20QuestID (0 any)On Target Rewarded Quest
SMART_EVENT_REACHED_HOME21On Creature Reached Home
SMART_EVENT_RECEIVE_EMOTE22EmoteIdCooldownMinCooldownMaxconditionOn Receive Emote.
SMART_EVENT_HAS_AURA23SpellIDStacksRepeatMinRepeatMaxOn Creature Has Aura
SMART_EVENT_TARGET_BUFFED24SpellIDStacksRepeatMinRepeatMaxOn Target Buffed With Spell
SMART_EVENT_RESET25After Combat, On Respawn or Spawn
SMART_EVENT_IC_LOS

26NoHostileMaxRangeCooldownMinCooldownMaxOn Target In Distance In Combat
SMART_EVENT_PASSENGER_BOARDED27CooldownMinCooldownMax
SMART_EVENT_PASSENGER_REMOVED28CooldownMinCooldownMax

SMART_EVENT_CHARMED

29On Creature Charmed
SMART_EVENT_CHARMED_TARGET30On Target Charmed
SMART_EVENT_SPELLHIT_TARGET31SpellIdSchoolRepeatMinRepeatMaxOn Target Spell Hit
SMART_EVENT_DAMAGED32MinDmgMaxDmgRepeatMinRepeatMaxOn Creature Damaged
SMART_EVENT_DAMAGED_TARGET33MinDmgMaxDmgRepeatMinRepeatMaxOn Target Damaged
SMART_EVENT_MOVEMENTINFORM34MovementType (any)PointID

SMART_EVENT_SUMMON_DESPAWNED35EntryCooldownMinCooldownMaxOn Summoned Unit Despawned
SMART_EVENT_CORPSE_REMOVED36On Creature Corpse Removed
SMART_EVENT_AI_INIT37

SMART_EVENT_DATA_SET38FieldValueCooldownMinCooldownMaxOn Creature/Gameobject Data Set, Can be used with SMART_ACTION_SET_DATA
SMART_EVENT_WAYPOINT_START39PointId (0 any)pathId (0 any)On Creature Waypoint ID Started
SMART_EVENT_WAYPOINT_REACHED40

PointId (0 any)

pathId (0 any)On Creature Waypoint ID Reached
SMART_EVENT_TRANSPORT_ADDPLAYER41
SMART_EVENT_TRANSPORT_ADDCREATURE42Entry (0 any)
SMART_EVENT_TRANSPORT_REMOVE_PLAYER43
SMART_EVENT_TRANSPORT_RELOCATE44PointId
SMART_EVENT_INSTANCE_PLAYER_ENTER45Team (0 any)

CooldownMin

CooldownMax
SMART_EVENT_AREATRIGGER_ONTRIGGER46TriggerId (0 any)
SMART_EVENT_QUEST_ACCEPTED47

On Target Quest Accepted
SMART_EVENT_QUEST_OBJ_COPLETETION48On Target Quest Objective Completed
SMART_EVENT_QUEST_COMPLETION49On Target Quest Completed
SMART_EVENT_QUEST_REWARDED50On Target Quest Rewarded
SMART_EVENT_QUEST_FAIL51On Target Quest Field
SMART_EVENT_TEXT_OVER52GroupId (from creatue_text)CreatureId (0 any)On TEXT_OVER Event Triggered After SMART_ACTION_TALK
SMART_EVENT_RECEIVE_HEAL

53MinHealMaxHealCooldownMinCooldownMaxOn Creature Received Healing
SMART_EVENT_JUST_SUMMONED54On Creature Just spawned
SMART_EVENT_WAYPOINT_PAUSED55PointId (0 any)pathID (0 any)On Creature Paused at Waypoint ID
SMART_EVENT_WAYPOINT_RESUMED56PointId (0 any)pathID (0 any)On Creature Resumed after Waypoint ID
SMART_EVENT_WAYPOINT_STOPPED57PointId (0 any)pathID (0 any)On Creature Stopped On Waypoint ID
SMART_EVENT_WAYPOINT_ENDED58PointId (0 any)pathID (0 any)On Creature Waypoint Path Ended
SMART_EVENT_TIMED_EVENT_TRIGGERED59Id
SMART_EVENT_UPDATE60InitialMinInitialMaxRepeatMinRepeatMax
SMART_EVENT_LINK61

Used to link together multiple events as a chain of events.
SMART_EVENT_GOSSIP_SELECT62menu_ididOn gossip clicked (gossip_menu_option).
SMART_EVENT_JUST_CREATED63

SMART_EVENT_GOSSIP_HELLO64On Right-Click Creature/Gameobject that have gossip enabled.
SMART_EVENT_FOLLOW_COMPLETED65
SMART_EVENT_DUMMY_EFFECT66spellIdeffectIndex
SMART_EVENT_IS_BEHIND_TARGET67CooldownMinCooldownMaxOn Creature is behind target.
SMART_EVENT_GAME_EVENT_START68game_event.eventEntryOn game_event started.
SMART_EVENT_GAME_EVENT_END69game_event.eventEntryOn game_event ended.
SMART_EVENT_GO_STATE_CHANGED70State (0 - Active, 1 - Ready, 2 - Active alternative)

SMART_EVENT_GO_EVENT_INFORM71EventId
SMART_EVENT_ACTION_DONE72EventId
SMART_EVENT_ON_SPELLCLICK73
SMART_EVENT_FRIENDLY_HEALTH_PCT74minHpPctmaxHpPctrepeatMin

repeatMax

SMART_EVENT_DISTANCE_CREATURE75database guiddatabase entrydistancerepeat interval (ms)

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

SMART_EVENT_DISTANCE_GAMEOBJECT76database guiddatabase entrydistancerepeat interval (ms)

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

SMART_EVENT_COUNTER_SET77counterIDvaluecooldownMincooldownMaxIf the value of specified counterID is equal to a specified value

action_type

Name

Value

Param1

Param2

Param3

Param4

Param5

Param6

Comment

SMART_ACTION_NONE0Do nothing
SMART_ACTION_TALK1Creature_text.groupidDuration to wait before TEXT_OVER event is triggered.Param2 in Milliseconds.
SMART_ACTION_SET_FACTION2FactionID (or 0 for default)Sets faction to creature.
SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL3Creature_template.entry(param1)Creature_template.modelID(param2)Take DisplayID of creature (param1) OR Turn to DisplayID (param2) OR Both = 0 for Demorph
SMART_ACTION_SOUND4SoundIdonlySelfPlay Sound; TextRange = 0 only sends sound to self, TextRange = 1 sends sound to everyone in visibility range
SMART_ACTION_PLAY_EMOTE5EmoteId

Play Emote
SMART_ACTION_FAIL_QUEST6QuestIDFail Quest of Target
SMART_ACTION_ADD_QUEST7QuestID

Add Quest to Target
SMART_ACTION_SET_REACT_STATE8StateReact State. Can be Aggressive, Passive or Defensive.
SMART_ACTION_ACTIVATE_GOBJECT9Activate Object
SMART_ACTION_RANDOM_EMOTE10EmoteId1EmoteId2EmoteId3...Play Random Emote
SMART_ACTION_CAST11SpellIdCast FlagsCast Spell ID at Target

SMART_ACTION_SUMMON_CREATURE

12Creature_template.entrySummon typeduration in msattackInvokerSummon Unit
SMART_ACTION_THREAT_SINGLE_PCT13Threat% incThreat% decChange Threat Percentage for Single Target

SMART_ACTION_THREAT_ALL_PCT

14Threat% incThreat% decChange Threat Percentage for All Enemies
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS15QuestID
SMART_ACTION_UNUSED_1616

SMART_ACTION_SET_EMOTE_STATE17EmoteIdPlay Emote Continuously
SMART_ACTION_SET_UNIT_FLAG18(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_FLAG19(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_ATTACK20AllowAttackState (0 = Stop attack, anything else means continue attacking)Stop or Continue Automatic Attack.
SMART_ACTION_ALLOW_COMBAT_MOVEMENT21AllowCombatMovement (0 = Stop combat based movement, anything else continue attacking)Allow or Disable Combat Movement
SMART_ACTION_SET_EVENT_PHASE22smart_scripts.event_phase_mask
SMART_ACTION_INC_EVENT_PHASE23IncrementDecrementSet param1 OR param2 (not both). Value 0 has no effect.
SMART_ACTION_EVADE24

Evade Incoming Attack
SMART_ACTION_FLEE_FOR_ASSIST250/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_CALL_CASTEDCREATUREORGO27Creature_template.entrySpellId
SMART_ACTION_REMOVEAURASFROMSPELL28Spellid

0 removes all auras
SMART_ACTION_FOLLOW29Distance (0 = Default value)Angle (0 = Default value)End creature_template.entrycreditcreditType (0monsterkill, 1event)Follow Target
SMART_ACTION_RANDOM_PHASE30smart_scripts.event_phase_mask1smart_scripts.event_phase_mask2smart_scripts.event_phase_mask 3smart_scripts.event_phase_mask 4smart_scripts.event_phase_mask 5smart_scripts.event_phase_mask6
SMART_ACTION_RANDOM_PHASE_RANGE31smart_scripts.event_phase_mask minimumsmart_scripts.event_phase_mask maximum

SMART_ACTION_RESET_GOBJECT32Reset Gameobject
SMART_ACTION_CALL_KILLEDMONSTER33Creature_template.entryThis is the ID from quest_template.RequiredNpcOrGo

SMART_ACTION_SET_INST_DATA

34FieldDataSet Instance Data
SMART_ACTION_SET_INST_DATA6435FieldSet Instance Data uint64
SMART_ACTION_UPDATE_TEMPLATE36Creature_template.entry

Team (updates creature_template to given entry)

SMART_ACTION_DIE37Kill Target
SMART_ACTION_SET_IN_COMBAT_WITH_ZONE38

SMART_ACTION_CALL_FOR_HELP39Radius 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_SHEATH40Sheath (0-unarmed, 1-melee, 2-ranged)

SMART_ACTION_FORCE_DESPAWN41timerDespawn Target after param1 Milliseconds
SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL42flat hp valuepercent hp valueIf you use both params, only percent will be used.
SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL43Creature_template.entryCreature_template.modelIDMount to Creature Entry (param1) OR Mount to Creature Display (param2) Or both = 0 for Unmount
SMART_ACTION_SET_INGAME_PHASE_MASK44Creature.phasemask

SMART_ACTION_SET_DATA45FieldDataSet Data For Target, can be used with SMART_EVENT_DATA_SET
SMART_ACTION_MOVE_FORWARD46Distance in yardsSends creature forward.
SMART_ACTION_SET_VISIBILITY

47

0/1Makes creature Visible = 1 or Invisible = 0
SMART_ACTION_SET_ACTIVE48
SMART_ACTION_ATTACK_START49

Allows basic melee swings to creature.
SMART_ACTION_SUMMON_GO50Gameobject_template.entryDe-spawn time in seconds.Spawns Gameobject, use target_type to set spawn position.
SMART_ACTION_KILL_UNIT51Â Kills Creature.
SMART_ACTION_ACTIVATE_TAXI52TaxiIDSends player to flight path. You have to be close to Flight Master, which gives Taxi ID you need.
SMART_ACTION_WP_START53walk = 0 run = 1Waypoints.entrycanRepeatQuest_template.iddespawntime

reactState

Creature starts Waypoint Movement. Use waypoints table to create movement.
SMART_ACTION_WP_PAUSE54time (in ms)Creature pauses its Waypoint Movement for given time.
SMART_ACTION_WP_STOP55despawnTimeQuest_template.idfail (0/1)

Creature stops its Waypoint Movement.
SMART_ACTION_ADD_ITEM56Item_template.entrycountAdds item(s) to player.
SMART_ACTION_REMOVE_ITEM57Item_template.entrycountRemoves item(s) from player.
SMART_ACTION_INSTALL_AI_TEMPLATE58TemplateID
SMART_ACTION_SET_RUN590 = Off / 1 = On
SMART_ACTION_SET_FLY600 = On / 1 = Off

Only works for creatures with inhabit air.
SMART_ACTION_SET_SWIM610 = Off / 1 = On
SMART_ACTION_TELEPORT62MapIDContinue 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_COUNTER63counterIDvaluereset (0/1)
SMART_ACTION_STORE_TARGET_LIST64varID

SMART_ACTION_WP_RESUME65Creature continues in its Waypoint Movement.
SMART_ACTION_SET_ORIENTATION66This depends on whet target script have if SMART_TARGET_SELF than Facing will be set like in HomePosition, When SMART_TARGET_POSITION you need to set target_o. 0 = North, West = 1.5, South = 3, East = 4.5

SMART_ACTION_CREATE_TIMED_EVENT67idInitialMinInitialMaxRepeatMin(only if it repeats)RepeatMax(only if it repeats)chance
SMART_ACTION_PLAYMOVIE68entry
SMART_ACTION_MOVE_TO_POS69PointIdPointId 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_TARGET70Respawntime in seconds for gameobjects (parameter for gameobjects only)
SMART_ACTION_EQUIP71

Creature_equip_template.entry

Slotmaskslot1 (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_GOSSIP72Closes gossip window.
SMART_ACTION_TRIGGER_TIMED_EVENT73id(>1)
SMART_ACTION_REMOVE_TIMED_EVENT74id(>1)
SMART_ACTION_ADD_AURA75SpellId

Adds aura to player(s). Use target_type 17 to make AoE aura.
SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT76WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
SMART_ACTION_RESET_SCRIPT_BASE_OBJECT77

SMART_ACTION_CALL_SCRIPT_RESET78
SMART_ACTION_SET_RANGED_MOVEMENT79attackDistanceattackAngleSets movement to follow at a specific range to the target.
SMART_ACTION_CALL_TIMED_ACTIONLIST

80

EntryOrGuidtimer update type(0 OOC, 1 IC, 2 ALWAYS)
SMART_ACTION_SET_NPC_FLAG81Creature_template.npcflag
SMART_ACTION_ADD_NPC_FLAG82Creature_template.npcflag
SMART_ACTION_REMOVE_NPC_FLAG83Creature_template.npcflag
SMART_ACTION_SIMPLE_TALK84Creature_text.groupID

Makes a player say text. SMART_EVENT_TEXT_OVER is not triggered and whispers can not be used.
SMART_ACTION_INVOKER_CAST85SpellIDcastFlagsif avaliable, last used invoker will cast spellId with castFlags on targets
SMART_ACTION_CROSS_CAST86SpellIDcastFlags

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_ACTIONLIST87EntryOrGuid 1EntryOrGuid 2EntryOrGuid 3EntryOrGuid 4EntryOrGuid 5EntryOrGuid 6Will select one entry from the ones provided. 0 is ignored.
SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST88EntryOrGuid 1EntryOrGuid 20 is ignored.
SMART_ACTION_RANDOM_MOVE89Radius

Creature moves to random position in given radius.
SMART_ACTION_SET_UNIT_FIELD_BYTES_190ValueType
SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_191ValueType

SMART_ACTION_INTERRUPT_SPELL92With delay (0/1)SpellIdInstant (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_ANIM93animprogress (0-255)

SMART_ACTION_SET_DYNAMIC_FLAG94dynamicflag.
SMART_ACTION_ADD_DYNAMIC_FLAG95dynamicflags
SMART_ACTION_REMOVE_DYNAMIC_FLAG

96

dynamicflags
SMART_ACTION_JUMP_TO_POS97Speed XYSpeed ZTarget XTarget YTarget Z
SMART_ACTION_SEND_GOSSIP_MENU98Gossip_menu_option.menuIdGossip_menu_option.npc_text_idCan be used together with 'SMART_EVENT_GOSSIP_HELLO' to set custom gossip.
SMART_ACTION_GO_SET_LOOT_STATE99LootState (0 - Not ready, 1 - Ready, 2 - Activated, 3 - Just deactivated)
SMART_ACTION_SEND_TARGET_TO_TARGET100Id

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_POS101Use with SMART_TARGET_SELF or SMART_TARGET_POSITION
SMART_ACTION_SET_HEALTH_REGEN1020/1

Sets the current creatures health regen on or off.
SMART_ACTION_SET_ROOT1030/1Enables or disables creature movement
SMART_ACTION_SET_GO_FLAG104gameobject_template.flagsoldFlag = newFlag
SMART_ACTION_ADD_GO_FLAG105gameobject_template.flagsoldFlag |= newFlag
SMART_ACTION_REMOVE_GO_FLAG106gameobject_template.flagsoldFlag &= ~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_START_CLOSEST_WAYPOINT111wp1wp2wp3wp4

wp5

wp6Make target follow closest waypoint to its location
SMART_ACTION_RISE_UP114Distance in yardsMakes the creature to fly up xx yards up to the sky (from current position)

Predefined SAI templates

Description Name

Value (Param1)

Param2

Param3

Param4

Param5

Param6

Comment

SMARTAI_TEMPLATE_BASIC0

SMARTAI_TEMPLATE_CASTER1spellidrepeatMinrepeatMaxrangemanaPCT+JOIN: target_param1 as castFlag
SMARTAI_TEMPLATE_TURRET2spellidrepeatMinrepeatMaxrangemanaPCT+JOIN: target_param1 as castflag
SMARTAI_TEMPLATE_PASSIVE3
SMARTAI_TEMPLATE_CAGED_GO_PART4creatureIDgive credit at point end (0/1)
SMARTAI_TEMPLATE_CAGED_NPC_PART5gameObjectIDdespawntimerun (0/1)dist

TextGroupID

target_type

Name

Value

target_param1

target_param2

target_param3

target_x

target_y

target_z

target_o

Comment

SMART_TARGET_NONE0

None.
SMART_TARGET_SELF1Self cast.
SMART_TARGET_VICTIM2Our current target. (ie: highest aggro)
SMART_TARGET_HOSTILE_SECOND_AGGRO3Second highest aggro.
SMART_TARGET_HOSTILE_LAST_AGGRO4Dead last on aggro.
SMART_TARGET_HOSTILE_RANDOM5Just any random target on our threat list.
SMART_TARGET_HOSTILE_RANDOM_NOT_TOP6Any random target except top threat.
SMART_TARGET_ACTION_INVOKER7

Unit who caused this Event to occur.
SMART_TARGET_POSITION8xyzoUse xyz from event params.
SMART_TARGET_CREATURE_RANGE9creatureEntry (0 any)minDistmaxDist

(Random?) creature with specified ID within specified range.
SMART_TARGET_CREATURE_GUID10guidentryCreature with specified GUID.
SMART_TARGET_CREATURE_DISTANCE11creatureEntry (0 any)maxDist

Creature with specified ID within distance. (Different from #9?)
SMART_TARGET_STORED12idUses pre-stored target(list)
SMART_TARGET_GAMEOBJECT_RANGE13goEntry (0 any)minDistmaxDist

(Random?) object with specified ID within specified range.
SMART_TARGET_GAMEOBJECT_GUID14guidentryObject with specified GUID.
SMART_TARGET_GAMEOBJECT_DISTANCE15goEntry (0 any)maxDist

Object with specified ID within distance. (Different from #13?)
SMART_TARGET_INVOKER_PARTY16Invoker's party members
SMART_TARGET_PLAYER_RANGE17minDistmaxDist

(Random?) player within specified range.
SMART_TARGET_PLAYER_DISTANCE18maxDist(Random?) player within specified distance. (Different from #17?)
SMART_TARGET_CLOSEST_CREATURE19creatureEntry (0 any)maxDist (Can be from 0-100 yards)dead? (0/1)

Closest creature with specified ID within specified range.
SMART_TARGET_CLOSEST_GAMEOBJECT20goEntry (0 any)maxDist (Can be from 0-100 yards)Closest object with specified ID within specified range.
SMART_TARGET_CLOSEST_PLAYER21maxDist

Closest player within specified range.
SMART_TARGET_ACTION_INVOKER_VEHICLE22Unit's vehicle who caused this Event to occur
SMART_TARGET_OWNER_OR_SUMMONER23

Unit's owner or summoner
SMART_TARGET_THREAT_LIST24All 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

comment

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

"Creature name - Event - Action"

"Minion of Gurok - On spawn - Set Random Movement"

Quick notes:

  • Always update creature_template,gameobject_template or areatrigger_scripts with:
  • If the creature or GO is inside a dungeon, set event_flags accordingly to the instance difficulty (heroic, 25 man, etc.).

In case of doubt about an Event, Action_or _Target,_check source code (_src/server/game/AI/SmartScripts files; mainly *SmartScript.cpp

)

Cast Flags

Name

Flag

Hex

Comment
SMARTCAST_INTERRUPT_PREVIOUS10x01Interrupt any spell casting
SMARTCAST_TRIGGERED2

0x02Triggered (this makes spell cost zero mana and have no cast time)
CAST_FORCE_CAST40x04Forces cast even if creature is out of mana or out of range
CAST_NO_MELEE_IF_OOM

8

0x08Prevents creature from entering melee if out of mana or out of range
CAST_FORCE_TARGET_SELF160x10Forces the target to cast this spell on itself
CAST_AURA_NOT_PRESENT320x20Only casts the spell if the target does not have an aura from the spell
SMARTCAST_COMBAT_MOVE640x40Prevent combat movement on cast, allow on fail range, mana, LOS

React States

Name

Value

Comment

REACT_PASSIVE0Does not defend or attack at all. Does nothing.
REACT_DEFENSIVE1Only attacks back when attacked.
REACT_AGGRESSIVE2Will attack if on threat list and in threat radius. (default)

Summon Types

Name

Value

Comment

TEMPSUMMON_TIMED_OR_DEAD_DESPAWN1Despawns after a specified time OR when the creature disappears.
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN2Despawns after a specified time OR when the creature dies.
TEMPSUMMON_TIMED_DESPAWN3Despawns after a specified time.
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT4Despawns after a specified time after the creature is out of combat.
TEMPSUMMON_CORPSE_DESPAWN5Despawns instantly after death.
TEMPSUMMON_CORPSE_TIMED_DESPAWN6Despawns after a specified time after death.
TEMPSUMMON_DEAD_DESPAWN7Despawns when the creature disappears.
TEMPSUMMON_MANUAL_DESPAWN8Despawns when UnSummon() (or Force Despawn action) is called.

Votet bitte für uns und bringt uns so neue Spieler!
Stimme zählen für Account:
WoW Portal MPOG TOP WoW Servers NET Private Server
Gametoor Top 100 Arena Top G Top of Games Oxigen Top 100 List
Facebook YouTube
Impressum