1. VIEW `vw_smart_scripts_with_labels` AS
  2. select
  3. `smart_scripts`.`entryorguid` AS `entryorguid`,
  4. `smart_scripts`.`source_type` AS `source_type`,
  5. `smart_scripts`.`id` AS `id`,
  6. `smart_scripts`.`link` AS `link`,
  7. (case
  8. when (`smart_scripts`.`event_type` = 0) then 'SMART_EVENT_UPDATE_IC'
  9. when (`smart_scripts`.`event_type` = 1) then 'SMART_EVENT_UPDATE_OOC'
  10. when (`smart_scripts`.`event_type` = 2) then 'SMART_EVENT_HEALTH_PCT'
  11. when (`smart_scripts`.`event_type` = 3) then 'SMART_EVENT_MANA_PCT'
  12. when (`smart_scripts`.`event_type` = 4) then 'SMART_EVENT_AGGRO'
  13. when (`smart_scripts`.`event_type` = 5) then 'SMART_EVENT_KILL'
  14. when (`smart_scripts`.`event_type` = 6) then 'SMART_EVENT_DEATH'
  15. when (`smart_scripts`.`event_type` = 7) then 'SMART_EVENT_EVADE'
  16. when (`smart_scripts`.`event_type` = 8) then 'SMART_EVENT_SPELLHIT'
  17. when (`smart_scripts`.`event_type` = 9) then 'SMART_EVENT_RANGE'
  18. when (`smart_scripts`.`event_type` = 10) then 'SMART_EVENT_OOC_LOS'
  19. when (`smart_scripts`.`event_type` = 11) then 'SMART_EVENT_RESPAWN'
  20. when (`smart_scripts`.`event_type` = 12) then 'SMART_EVENT_TARGET_HEALTH_PCT'
  21. when (`smart_scripts`.`event_type` = 13) then 'SMART_EVENT_VICTIM_CASTING'
  22. when (`smart_scripts`.`event_type` = 14) then 'SMART_EVENT_FRIENDLY_HEALTH'
  23. when (`smart_scripts`.`event_type` = 15) then 'SMART_EVENT_FRIENDLY_IS_CC'
  24. when (`smart_scripts`.`event_type` = 16) then 'SMART_EVENT_FRIENDLY_MISSING_BUFF'
  25. when (`smart_scripts`.`event_type` = 17) then 'SMART_EVENT_SUMMONED_UNIT'
  26. when (`smart_scripts`.`event_type` = 18) then 'SMART_EVENT_TARGET_MANA_PCT'
  27. when (`smart_scripts`.`event_type` = 19) then 'SMART_EVENT_ACCEPTED_QUEST'
  28. when (`smart_scripts`.`event_type` = 20) then 'SMART_EVENT_REWARD_QUEST'
  29. when (`smart_scripts`.`event_type` = 21) then 'SMART_EVENT_REACHED_HOME'
  30. when (`smart_scripts`.`event_type` = 22) then 'SMART_EVENT_RECEIVE_EMOTE'
  31. when (`smart_scripts`.`event_type` = 23) then 'SMART_EVENT_HAS_AURA'
  32. when (`smart_scripts`.`event_type` = 24) then 'SMART_EVENT_TARGET_BUFFED'
  33. when (`smart_scripts`.`event_type` = 25) then 'SMART_EVENT_RESET'
  34. when (`smart_scripts`.`event_type` = 26) then 'SMART_EVENT_IC_LOS'
  35. when (`smart_scripts`.`event_type` = 27) then 'SMART_EVENT_PASSENGER_BOARDED'
  36. when (`smart_scripts`.`event_type` = 28) then 'SMART_EVENT_PASSENGER_REMOVED'
  37. when (`smart_scripts`.`event_type` = 29) then 'SMART_EVENT_CHARMED'
  38. when (`smart_scripts`.`event_type` = 30) then 'SMART_EVENT_CHARMED_TARGET'
  39. when (`smart_scripts`.`event_type` = 31) then 'SMART_EVENT_SPELLHIT_TARGET'
  40. when (`smart_scripts`.`event_type` = 32) then 'SMART_EVENT_DAMAGED'
  41. when (`smart_scripts`.`event_type` = 33) then 'SMART_EVENT_DAMAGED_TARGET'
  42. when (`smart_scripts`.`event_type` = 34) then 'SMART_EVENT_MOVEMENTINFORM'
  43. when (`smart_scripts`.`event_type` = 35) then 'SMART_EVENT_SUMMON_DESPAWNED'
  44. when (`smart_scripts`.`event_type` = 36) then 'SMART_EVENT_CORPSE_REMOVED'
  45. when (`smart_scripts`.`event_type` = 37) then 'SMART_EVENT_AI_INIT'
  46. when (`smart_scripts`.`event_type` = 38) then 'SMART_EVENT_DATA_SET'
  47. when (`smart_scripts`.`event_type` = 39) then 'SMART_EVENT_WAYPOINT_START'
  48. when (`smart_scripts`.`event_type` = 40) then 'SMART_EVENT_WAYPOINT_REACHED'
  49. when (`smart_scripts`.`event_type` = 41) then 'SMART_EVENT_TRANSPORT_ADDPLAYER'
  50. when (`smart_scripts`.`event_type` = 42) then 'SMART_EVENT_TRANSPORT_ADDCREATURE'
  51. when (`smart_scripts`.`event_type` = 43) then 'SMART_EVENT_TRANSPORT_REMOVE_PLAYER'
  52. when (`smart_scripts`.`event_type` = 44) then 'SMART_EVENT_TRANSPORT_RELOCATE'
  53. when (`smart_scripts`.`event_type` = 45) then 'SMART_EVENT_INSTANCE_PLAYER_ENTER'
  54. when (`smart_scripts`.`event_type` = 46) then 'SMART_EVENT_AREATRIGGER_ONTRIGGER'
  55. when (`smart_scripts`.`event_type` = 47) then 'SMART_EVENT_QUEST_ACCEPTED'
  56. when (`smart_scripts`.`event_type` = 48) then 'SMART_EVENT_QUEST_OBJ_COPLETETION'
  57. when (`smart_scripts`.`event_type` = 49) then 'SMART_EVENT_QUEST_COMPLETION'
  58. when (`smart_scripts`.`event_type` = 50) then 'SMART_EVENT_QUEST_REWARDED'
  59. when (`smart_scripts`.`event_type` = 51) then 'SMART_EVENT_QUEST_FAIL'
  60. when (`smart_scripts`.`event_type` = 52) then 'SMART_EVENT_TEXT_OVER'
  61. when (`smart_scripts`.`event_type` = 53) then 'SMART_EVENT_RECEIVE_HEAL'
  62. when (`smart_scripts`.`event_type` = 54) then 'SMART_EVENT_JUST_SUMMONED'
  63. when (`smart_scripts`.`event_type` = 55) then 'SMART_EVENT_WAYPOINT_PAUSED'
  64. when (`smart_scripts`.`event_type` = 56) then 'SMART_EVENT_WAYPOINT_RESUMED'
  65. when (`smart_scripts`.`event_type` = 57) then 'SMART_EVENT_WAYPOINT_STOPPED'
  66. when (`smart_scripts`.`event_type` = 58) then 'SMART_EVENT_WAYPOINT_ENDED'
  67. when (`smart_scripts`.`event_type` = 59) then 'SMART_EVENT_TIMED_EVENT_TRIGGERED'
  68. when (`smart_scripts`.`event_type` = 60) then 'SMART_EVENT_UPDATE'
  69. when (`smart_scripts`.`event_type` = 61) then 'SMART_EVENT_LINK'
  70. when (`smart_scripts`.`event_type` = 62) then 'SMART_EVENT_GOSSIP_SELECT'
  71. when (`smart_scripts`.`event_type` = 63) then 'SMART_EVENT_JUST_CREATED'
  72. when (`smart_scripts`.`event_type` = 64) then 'SMART_EVENT_GOSSIP_HELLO'
  73. when (`smart_scripts`.`event_type` = 65) then 'SMART_EVENT_FOLLOW_COMPLETED'
  74. when (`smart_scripts`.`event_type` = 66) then 'SMART_EVENT_EVENT_PHASE_CHANGE'
  75. when (`smart_scripts`.`event_type` = 67) then 'SMART_EVENT_IS_BEHIND_TARGET'
  76. when (`smart_scripts`.`event_type` = 68) then 'SMART_EVENT_GAME_EVENT_START'
  77. when (`smart_scripts`.`event_type` = 69) then 'SMART_EVENT_GAME_EVENT_END'
  78. when (`smart_scripts`.`event_type` = 70) then 'SMART_EVENT_GO_LOOT_STATE_CHANGED'
  79. when (`smart_scripts`.`event_type` = 71) then 'SMART_EVENT_GO_EVENT_INFORM'
  80. when (`smart_scripts`.`event_type` = 72) then 'SMART_EVENT_ACTION_DONE'
  81. when (`smart_scripts`.`event_type` = 73) then 'SMART_EVENT_ON_SPELLCLICK'
  82. when (`smart_scripts`.`event_type` = 74) then 'SMART_EVENT_FRIENDLY_HEALTH_PCT'
  83. when (`smart_scripts`.`event_type` = 75) then 'SMART_EVENT_DISTANCE_CREATURE'
  84. when (`smart_scripts`.`event_type` = 76) then 'SMART_EVENT_DISTANCE_GAMEOBJECT'
  85. when (`smart_scripts`.`event_type` = 77) then 'SMART_EVENT_COUNTER_SET'
  86. when (`smart_scripts`.`event_type` = 78) then 'SMART_EVENT_SCENE_START'
  87. when (`smart_scripts`.`event_type` = 79) then 'SMART_EVENT_SCENE_TRIGGER'
  88. when (`smart_scripts`.`event_type` = 80) then 'SMART_EVENT_SCENE_CANCEL'
  89. when (`smart_scripts`.`event_type` = 81) then 'SMART_EVENT_SCENE_COMPLETE'
  90. when (`smart_scripts`.`event_type` = 82) then 'SMART_EVENT_SUMMONED_UNIT_DIES'
  91. else `smart_scripts`.`event_type`
  92. end) AS `event_type`,
  93. `smart_scripts`.`event_phase_mask` AS `event_phase_mask`,
  94. `smart_scripts`.`event_chance` AS `event_chance`,
  95. `smart_scripts`.`event_flags` AS `event_flags`,
  96. `smart_scripts`.`event_param1` AS `event_param1`,
  97. `smart_scripts`.`event_param2` AS `event_param2`,
  98. `smart_scripts`.`event_param3` AS `event_param3`,
  99. `smart_scripts`.`event_param4` AS `event_param4`,
  100. `smart_scripts`.`event_param5` AS `event_param5`,
  101. (case
  102. when (`smart_scripts`.`action_type` = 0) then 'SMART_ACTION_NONE'
  103. when (`smart_scripts`.`action_type` = 1) then 'SMART_ACTION_TALK'
  104. when (`smart_scripts`.`action_type` = 2) then 'SMART_ACTION_SET_FACTION'
  105. when (`smart_scripts`.`action_type` = 3) then 'SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL'
  106. when (`smart_scripts`.`action_type` = 4) then 'SMART_ACTION_SOUND'
  107. when (`smart_scripts`.`action_type` = 5) then 'SMART_ACTION_PLAY_EMOTE'
  108. when (`smart_scripts`.`action_type` = 6) then 'SMART_ACTION_FAIL_QUEST'
  109. when (`smart_scripts`.`action_type` = 7) then 'SMART_ACTION_OFFER_QUEST'
  110. when (`smart_scripts`.`action_type` = 8) then 'SMART_ACTION_SET_REACT_STATE'
  111. when (`smart_scripts`.`action_type` = 9) then 'SMART_ACTION_ACTIVATE_GOBJECT'
  112. when (`smart_scripts`.`action_type` = 10) then 'SMART_ACTION_RANDOM_EMOTE'
  113. when (`smart_scripts`.`action_type` = 11) then 'SMART_ACTION_CAST'
  114. when (`smart_scripts`.`action_type` = 12) then 'SMART_ACTION_SUMMON_CREATURE'
  115. when (`smart_scripts`.`action_type` = 13) then 'SMART_ACTION_THREAT_SINGLE_PCT'
  116. when (`smart_scripts`.`action_type` = 14) then 'SMART_ACTION_THREAT_ALL_PCT'
  117. when (`smart_scripts`.`action_type` = 15) then 'SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS'
  118. when (`smart_scripts`.`action_type` = 16) then 'SMART_ACTION_RESERVED_16'
  119. when (`smart_scripts`.`action_type` = 17) then 'SMART_ACTION_SET_EMOTE_STATE'
  120. when (`smart_scripts`.`action_type` = 18) then 'SMART_ACTION_SET_UNIT_FLAG'
  121. when (`smart_scripts`.`action_type` = 19) then 'SMART_ACTION_REMOVE_UNIT_FLAG'
  122. when (`smart_scripts`.`action_type` = 20) then 'SMART_ACTION_AUTO_ATTACK'
  123. when (`smart_scripts`.`action_type` = 21) then 'SMART_ACTION_ALLOW_COMBAT_MOVEMENT'
  124. when (`smart_scripts`.`action_type` = 22) then 'SMART_ACTION_SET_EVENT_PHASE'
  125. when (`smart_scripts`.`action_type` = 23) then 'SMART_ACTION_INC_EVENT_PHASE'
  126. when (`smart_scripts`.`action_type` = 24) then 'SMART_ACTION_EVADE'
  127. when (`smart_scripts`.`action_type` = 25) then 'SMART_ACTION_FLEE_FOR_ASSIST'
  128. when (`smart_scripts`.`action_type` = 26) then 'SMART_ACTION_CALL_GROUPEVENTHAPPENS'
  129. when (`smart_scripts`.`action_type` = 27) then 'SMART_ACTION_COMBAT_STOP'
  130. when (`smart_scripts`.`action_type` = 28) then 'SMART_ACTION_REMOVEAURASFROMSPELL'
  131. when (`smart_scripts`.`action_type` = 29) then 'SMART_ACTION_FOLLOW'
  132. when (`smart_scripts`.`action_type` = 30) then 'SMART_ACTION_RANDOM_PHASE'
  133. when (`smart_scripts`.`action_type` = 31) then 'SMART_ACTION_RANDOM_PHASE_RANGE'
  134. when (`smart_scripts`.`action_type` = 32) then 'SMART_ACTION_RESET_GOBJECT'
  135. when (`smart_scripts`.`action_type` = 33) then 'SMART_ACTION_CALL_KILLEDMONSTER'
  136. when (`smart_scripts`.`action_type` = 34) then 'SMART_ACTION_SET_INST_DATA'
  137. when (`smart_scripts`.`action_type` = 35) then 'SMART_ACTION_SET_INST_DATA64'
  138. when (`smart_scripts`.`action_type` = 36) then 'SMART_ACTION_UPDATE_TEMPLATE'
  139. when (`smart_scripts`.`action_type` = 37) then 'SMART_ACTION_DIE'
  140. when (`smart_scripts`.`action_type` = 38) then 'SMART_ACTION_SET_IN_COMBAT_WITH_ZONE'
  141. when (`smart_scripts`.`action_type` = 39) then 'SMART_ACTION_CALL_FOR_HELP'
  142. when (`smart_scripts`.`action_type` = 40) then 'SMART_ACTION_SET_SHEATH'
  143. when (`smart_scripts`.`action_type` = 41) then 'SMART_ACTION_FORCE_DESPAWN'
  144. when (`smart_scripts`.`action_type` = 42) then 'SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL'
  145. when (`smart_scripts`.`action_type` = 43) then 'SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL'
  146. when (`smart_scripts`.`action_type` = 44) then 'SMART_ACTION_SET_INGAME_PHASE_MASK'
  147. when (`smart_scripts`.`action_type` = 45) then 'SMART_ACTION_SET_DATA'
  148. when (`smart_scripts`.`action_type` = 46) then 'SMART_ACTION_ATTACK_STOP'
  149. when (`smart_scripts`.`action_type` = 47) then 'SMART_ACTION_SET_VISIBILITY'
  150. when (`smart_scripts`.`action_type` = 48) then 'SMART_ACTION_SET_ACTIVE'
  151. when (`smart_scripts`.`action_type` = 49) then 'SMART_ACTION_ATTACK_START'
  152. when (`smart_scripts`.`action_type` = 50) then 'SMART_ACTION_SUMMON_GO'
  153. when (`smart_scripts`.`action_type` = 51) then 'SMART_ACTION_KILL_UNIT'
  154. when (`smart_scripts`.`action_type` = 52) then 'SMART_ACTION_ACTIVATE_TAXI'
  155. when (`smart_scripts`.`action_type` = 53) then 'SMART_ACTION_WP_START'
  156. when (`smart_scripts`.`action_type` = 54) then 'SMART_ACTION_WP_PAUSE'
  157. when (`smart_scripts`.`action_type` = 55) then 'SMART_ACTION_WP_STOP'
  158. when (`smart_scripts`.`action_type` = 56) then 'SMART_ACTION_ADD_ITEM'
  159. when (`smart_scripts`.`action_type` = 57) then 'SMART_ACTION_REMOVE_ITEM'
  160. when (`smart_scripts`.`action_type` = 58) then 'SMART_ACTION_INSTALL_AI_TEMPLATE'
  161. when (`smart_scripts`.`action_type` = 59) then 'SMART_ACTION_SET_RUN'
  162. when (`smart_scripts`.`action_type` = 60) then 'SMART_ACTION_SET_DISABLE_GRAVITY'
  163. when (`smart_scripts`.`action_type` = 61) then 'SMART_ACTION_SET_SWIM'
  164. when (`smart_scripts`.`action_type` = 62) then 'SMART_ACTION_TELEPORT'
  165. when (`smart_scripts`.`action_type` = 63) then 'SMART_ACTION_SET_COUNTER'
  166. when (`smart_scripts`.`action_type` = 64) then 'SMART_ACTION_STORE_TARGET_LIST'
  167. when (`smart_scripts`.`action_type` = 65) then 'SMART_ACTION_WP_RESUME'
  168. when (`smart_scripts`.`action_type` = 66) then 'SMART_ACTION_SET_ORIENTATION'
  169. when (`smart_scripts`.`action_type` = 67) then 'SMART_ACTION_CREATE_TIMED_EVENT'
  170. when (`smart_scripts`.`action_type` = 68) then 'SMART_ACTION_PLAYMOVIE'
  171. when (`smart_scripts`.`action_type` = 69) then 'SMART_ACTION_MOVE_TO_POS'
  172. when (`smart_scripts`.`action_type` = 70) then 'SMART_ACTION_ENABLE_TEMP_GOBJ'
  173. when (`smart_scripts`.`action_type` = 71) then 'SMART_ACTION_EQUIP'
  174. when (`smart_scripts`.`action_type` = 72) then 'SMART_ACTION_CLOSE_GOSSIP'
  175. when (`smart_scripts`.`action_type` = 73) then 'SMART_ACTION_TRIGGER_TIMED_EVENT'
  176. when (`smart_scripts`.`action_type` = 74) then 'SMART_ACTION_REMOVE_TIMED_EVENT'
  177. when (`smart_scripts`.`action_type` = 75) then 'SMART_ACTION_ADD_AURA'
  178. when (`smart_scripts`.`action_type` = 76) then 'SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT'
  179. when (`smart_scripts`.`action_type` = 77) then 'SMART_ACTION_RESET_SCRIPT_BASE_OBJECT'
  180. when (`smart_scripts`.`action_type` = 78) then 'SMART_ACTION_CALL_SCRIPT_RESET'
  181. when (`smart_scripts`.`action_type` = 79) then 'SMART_ACTION_SET_RANGED_MOVEMENT'
  182. when (`smart_scripts`.`action_type` = 80) then 'SMART_ACTION_CALL_TIMED_ACTIONLIST'
  183. when (`smart_scripts`.`action_type` = 81) then 'SMART_ACTION_SET_NPC_FLAG'
  184. when (`smart_scripts`.`action_type` = 82) then 'SMART_ACTION_ADD_NPC_FLAG'
  185. when (`smart_scripts`.`action_type` = 83) then 'SMART_ACTION_REMOVE_NPC_FLAG'
  186. when (`smart_scripts`.`action_type` = 84) then 'SMART_ACTION_SIMPLE_TALK'
  187. when (`smart_scripts`.`action_type` = 85) then 'SMART_ACTION_SELF_CAST'
  188. when (`smart_scripts`.`action_type` = 86) then 'SMART_ACTION_CROSS_CAST'
  189. when (`smart_scripts`.`action_type` = 87) then 'SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST'
  190. when (`smart_scripts`.`action_type` = 88) then 'SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST'
  191. when (`smart_scripts`.`action_type` = 89) then 'SMART_ACTION_RANDOM_MOVE'
  192. when (`smart_scripts`.`action_type` = 90) then 'SMART_ACTION_SET_UNIT_FIELD_BYTES_1'
  193. when (`smart_scripts`.`action_type` = 91) then 'SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1'
  194. when (`smart_scripts`.`action_type` = 92) then 'SMART_ACTION_INTERRUPT_SPELL'
  195. when (`smart_scripts`.`action_type` = 93) then 'SMART_ACTION_SEND_GO_CUSTOM_ANIM'
  196. when (`smart_scripts`.`action_type` = 94) then 'SMART_ACTION_SET_DYNAMIC_FLAG'
  197. when (`smart_scripts`.`action_type` = 95) then 'SMART_ACTION_ADD_DYNAMIC_FLAG'
  198. when (`smart_scripts`.`action_type` = 96) then 'SMART_ACTION_REMOVE_DYNAMIC_FLAG'
  199. when (`smart_scripts`.`action_type` = 97) then 'SMART_ACTION_JUMP_TO_POS'
  200. when (`smart_scripts`.`action_type` = 98) then 'SMART_ACTION_SEND_GOSSIP_MENU'
  201. when (`smart_scripts`.`action_type` = 99) then 'SMART_ACTION_GO_SET_LOOT_STATE'
  202. when (`smart_scripts`.`action_type` = 100) then 'SMART_ACTION_SEND_TARGET_TO_TARGET'
  203. when (`smart_scripts`.`action_type` = 101) then 'SMART_ACTION_SET_HOME_POS'
  204. when (`smart_scripts`.`action_type` = 102) then 'SMART_ACTION_SET_HEALTH_REGEN'
  205. when (`smart_scripts`.`action_type` = 103) then 'SMART_ACTION_SET_ROOT'
  206. when (`smart_scripts`.`action_type` = 104) then 'SMART_ACTION_SET_GO_FLAG'
  207. when (`smart_scripts`.`action_type` = 105) then 'SMART_ACTION_ADD_GO_FLAG'
  208. when (`smart_scripts`.`action_type` = 106) then 'SMART_ACTION_REMOVE_GO_FLAG'
  209. when (`smart_scripts`.`action_type` = 107) then 'SMART_ACTION_SUMMON_CREATURE_GROUP'
  210. when (`smart_scripts`.`action_type` = 108) then 'SMART_ACTION_SET_POWER'
  211. when (`smart_scripts`.`action_type` = 109) then 'SMART_ACTION_ADD_POWER'
  212. when (`smart_scripts`.`action_type` = 110) then 'SMART_ACTION_REMOVE_POWER'
  213. when (`smart_scripts`.`action_type` = 111) then 'SMART_ACTION_GAME_EVENT_STOP'
  214. when (`smart_scripts`.`action_type` = 112) then 'SMART_ACTION_GAME_EVENT_START'
  215. when (`smart_scripts`.`action_type` = 113) then 'SMART_ACTION_START_CLOSEST_WAYPOINT'
  216. when (`smart_scripts`.`action_type` = 114) then 'SMART_ACTION_MOVE_OFFSET'
  217. when (`smart_scripts`.`action_type` = 115) then 'SMART_ACTION_RANDOM_SOUND'
  218. when (`smart_scripts`.`action_type` = 116) then 'SMART_ACTION_SET_CORPSE_DELAY'
  219. when (`smart_scripts`.`action_type` = 117) then 'SMART_ACTION_DISABLE_EVADE'
  220. when (`smart_scripts`.`action_type` = 118) then 'SMART_ACTION_GO_SET_GO_STATE'
  221. when (`smart_scripts`.`action_type` = 119) then 'SMART_ACTION_SET_CAN_FLY'
  222. when (`smart_scripts`.`action_type` = 120) then 'SMART_ACTION_REMOVE_AURAS_BY_TYPE'
  223. when (`smart_scripts`.`action_type` = 121) then 'SMART_ACTION_SET_SIGHT_DIST'
  224. when (`smart_scripts`.`action_type` = 122) then 'SMART_ACTION_FLEE'
  225. when (`smart_scripts`.`action_type` = 123) then 'SMART_ACTION_ADD_THREAT'
  226. when (`smart_scripts`.`action_type` = 124) then 'SMART_ACTION_LOAD_EQUIPMENT'
  227. when (`smart_scripts`.`action_type` = 125) then 'SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT'
  228. when (`smart_scripts`.`action_type` = 126) then 'SMART_ACTION_REMOVE_ALL_GAMEOBJECTS'
  229. when (`smart_scripts`.`action_type` = 127) then 'SMART_ACTION_PAUSE_MOVEMENT'
  230. when (`smart_scripts`.`action_type` = 128) then 'SMART_ACTION_PLAY_ANIMKIT'
  231. when (`smart_scripts`.`action_type` = 129) then 'SMART_ACTION_SCENE_PLAY'
  232. when (`smart_scripts`.`action_type` = 130) then 'SMART_ACTION_SCENE_CANCEL'
  233. when (`smart_scripts`.`action_type` = 131) then 'SMART_ACTION_SPAWN_SPAWNGROUP'
  234. when (`smart_scripts`.`action_type` = 132) then 'SMART_ACTION_DESPAWN_SPAWNGROUP'
  235. when (`smart_scripts`.`action_type` = 133) then 'SMART_ACTION_RESPAWN_BY_SPAWNID'
  236. when (`smart_scripts`.`action_type` = 134) then 'SMART_ACTION_INVOKER_CAST'
  237. when (`smart_scripts`.`action_type` = 135) then 'SMART_ACTION_PLAY_CINEMATIC'
  238. when (`smart_scripts`.`action_type` = 136) then 'SMART_ACTION_SET_MOVEMENT_SPEED'
  239. when (`smart_scripts`.`action_type` = 137) then 'SMART_ACTION_PLAY_SPELL_VISUAL_KIT'
  240. when (`smart_scripts`.`action_type` = 138) then 'SMART_ACTION_OVERRIDE_LIGHT'
  241. when (`smart_scripts`.`action_type` = 139) then 'SMART_ACTION_OVERRIDE_WEATHER'
  242. else `smart_scripts`.`action_type`
  243. end) AS `action_type`,
  244. `smart_scripts`.`action_param1` AS `action_param1`,
  245. `smart_scripts`.`action_param2` AS `action_param2`,
  246. `smart_scripts`.`action_param3` AS `action_param3`,
  247. `smart_scripts`.`action_param4` AS `action_param4`,
  248. `smart_scripts`.`action_param5` AS `action_param5`,
  249. `smart_scripts`.`action_param6` AS `action_param6`,
  250. (case
  251. when (`smart_scripts`.`target_type` = 0) then 'SMART_TARGET_NONE'
  252. when (`smart_scripts`.`target_type` = 1) then 'SMART_TARGET_SELF'
  253. when (`smart_scripts`.`target_type` = 2) then 'SMART_TARGET_VICTIM'
  254. when (`smart_scripts`.`target_type` = 3) then 'SMART_TARGET_HOSTILE_SECOND_AGGRO'
  255. when (`smart_scripts`.`target_type` = 4) then 'SMART_TARGET_HOSTILE_LAST_AGGRO'
  256. when (`smart_scripts`.`target_type` = 5) then 'SMART_TARGET_HOSTILE_RANDOM'
  257. when (`smart_scripts`.`target_type` = 6) then 'SMART_TARGET_HOSTILE_RANDOM_NOT_TOP'
  258. when (`smart_scripts`.`target_type` = 7) then 'SMART_TARGET_ACTION_INVOKER'
  259. when (`smart_scripts`.`target_type` = 8) then 'SMART_TARGET_POSITION'
  260. when (`smart_scripts`.`target_type` = 9) then 'SMART_TARGET_CREATURE_RANGE'
  261. when (`smart_scripts`.`target_type` = 10) then 'SMART_TARGET_CREATURE_GUID'
  262. when (`smart_scripts`.`target_type` = 11) then 'SMART_TARGET_CREATURE_DISTANCE'
  263. when (`smart_scripts`.`target_type` = 12) then 'SMART_TARGET_STORED'
  264. when (`smart_scripts`.`target_type` = 13) then 'SMART_TARGET_GAMEOBJECT_RANGE'
  265. when (`smart_scripts`.`target_type` = 14) then 'SMART_TARGET_GAMEOBJECT_GUID'
  266. when (`smart_scripts`.`target_type` = 15) then 'SMART_TARGET_GAMEOBJECT_DISTANCE'
  267. when (`smart_scripts`.`target_type` = 16) then 'SMART_TARGET_INVOKER_PARTY'
  268. when (`smart_scripts`.`target_type` = 17) then 'SMART_TARGET_PLAYER_RANGE'
  269. when (`smart_scripts`.`target_type` = 18) then 'SMART_TARGET_PLAYER_DISTANCE'
  270. when (`smart_scripts`.`target_type` = 19) then 'SMART_TARGET_CLOSEST_CREATURE'
  271. when (`smart_scripts`.`target_type` = 20) then 'SMART_TARGET_CLOSEST_GAMEOBJECT'
  272. when (`smart_scripts`.`target_type` = 21) then 'SMART_TARGET_CLOSEST_PLAYER'
  273. when (`smart_scripts`.`target_type` = 22) then 'SMART_TARGET_ACTION_INVOKER_VEHICLE'
  274. when (`smart_scripts`.`target_type` = 23) then 'SMART_TARGET_OWNER_OR_SUMMONER'
  275. when (`smart_scripts`.`target_type` = 24) then 'SMART_TARGET_THREAT_LIST'
  276. when (`smart_scripts`.`target_type` = 25) then 'SMART_TARGET_CLOSEST_ENEMY'
  277. when (`smart_scripts`.`target_type` = 26) then 'SMART_TARGET_CLOSEST_FRIENDLY'
  278. when (`smart_scripts`.`target_type` = 27) then 'SMART_TARGET_LOOT_RECIPIENTS'
  279. when (`smart_scripts`.`target_type` = 28) then 'SMART_TARGET_FARTHEST'
  280. when (`smart_scripts`.`target_type` = 29) then 'SMART_TARGET_VEHICLE_PASSENGER'
  281. when (`smart_scripts`.`target_type` = 30) then 'SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT'
  282. else `smart_scripts`.`target_type`
  283. end) AS `target_type`,
  284. `smart_scripts`.`target_param1` AS `target_param1`,
  285. `smart_scripts`.`target_param2` AS `target_param2`,
  286. `smart_scripts`.`target_param3` AS `target_param3`,
  287. `smart_scripts`.`target_param4` AS `target_param4`,
  288. `smart_scripts`.`target_x` AS `target_x`,
  289. `smart_scripts`.`target_y` AS `target_y`,
  290. `smart_scripts`.`target_z` AS `target_z`,
  291. `smart_scripts`.`target_o` AS `target_o`,
  292. `smart_scripts`.`comment` AS `comment`
  293. from
  294. `smart_scripts`