Missing Smartai Events/actions

Do you have any suggestions for in the future of new events and/or actions that should be implemented in SmartAI? I think it would be smart to make a single topic and post all our ideas in here. Go ahead. /emoticons/default_smile.png

My toughs thus far:

This would be mainly used if a player does an emote that is not in the DBCs because it has no animation (/moo) and can therefore not be used with SMART_EVENT_RECEIVE_EMOTE.

Since we already have SMART_ACTION_ACTIVATE_TAXI, I think we should add an event function for when giving credits. For example when you choose a gossip option, it should not give credit on gossip select but on taxi path end or a specific point.

Speaks for itself. We already have SMART_EVENT_RESET. It’s not smart to use SMART_ACTION_EVADE because it often bugs the AI of the creature.

http://www.trinityco…-set-gossip-id/ (has script attached)

This one is buggy, it makes the NPC always RUN instead of just walk I’d suggest adding param1 with run/walk (0/1). If someone reads this and tries to do this as well, it is already possible. When you use SMART_ACTION_SET_RUN and set param1 to 0 it will walk. Example: http://paste2.org/p/1626715

Add param1 a bool if we want the creature to say flee message or not.


That’s it for now, hoping to see more suggestions. /emoticons/default_smile.png


to modify gob,creature, etc… HP, MP, RAGE, ARMOR, GOLD, etc… everything related to the gob,creature template in one place



clear as day, yet may cause crashing?


Area ID, Map id , Zone id , etc… clear

top of my dumb ass head

Nice Xees, I like them. ^^


Just summons a randomly chosen creature/object. Could be useful for some quests.

SMART_ACTION_TALK / creature_text.type

Could use a System Message type. /emoticons/default_smile.png

Maybe also some better waypoint handling? Really difficult to properly work with waypoints using SAI … =/

For what purpose? Custom stuff?

??? Useful where?


Sadly we can’t use SMART_ACTION_ATTACK_START with SMART_TARGET_CLOSEST_PLAYER. /emoticons/default_sad.png



+1, that could be widely used

Smart AI should not be limited, if you think like Mangos developers please work in Mangos.

“IF WE AINT USING IT, WE AINT MAKING IT” Attitude does not help anyone man.

True, and in that matter we should also get some more random actions in my opinion. Just no idea how to make those function or how to name them. /emoticons/default_tongue.png

It’s quite much how it works around here. Why work on something you are not going to use anyway? …

I think SMART_ACTION_JUMP_TO_POS needs some improvements:

It works for the visual part at the client but if the npc starts waypoint movement or moves to a position afterwards you can see that the server didnt update the new position after the jump command.

The movements are performed as if the npc never jumped to the position - looks very bad.

It shouldn’t be overextended with stupid actions either. Feel free to add those commands, but I wouldn’t guess they reach further then the custom section.


The jump movement mechanic overall is badly documented with random hardcoded values (making it very hard for users to set the xy/z-speed they want). I think we should come up with a better way to handle JumpTo instead of looking into the smart action.

I agree on SMART_ACTION_ATTACK_CLOSEST_PLAYER, but my question was regarding SMART_ACTION_SUMMON_RANDOM, what are the suggested input values?

I understand that you’re quite… let’s call it confused about this one. I was thinking that we needed more actions that include a random choice. Maybe this one wasn’t correct, couldn’t think of a better one at the time. /emoticons/default_smile.png

You can use different timed action list with the original summon creature and then use call random timed action list

Yeah I figured now, forgot to mention in my previous post. I guess I just overlooked that action_type. /emoticons/default_smile.png

I wonder what others think about this one, hence I post a new reply instead of editing.


I know it already exists but another action that would offer more variety such as a random angle, used for (example) Army of the Dead Ghouls. /emoticons/default_smile.png


Apparently I really need this one for NPC 20454. It should first be ‘hovering’, but in combat only on ground. And no, it’s not a hovering spell. It’s spawned in air.



Speaks for itself. /emoticons/default_smile.png


Or add a function for target in param 1 in the current one.


Speaks for itself. Used for spells such as backstab.

I agree







Turns out SMART_EVENT_BEHIND_TARGET did already exist but wasn’t on the wiki. Added it now (67). Also added correct action_type ID for SMART_ACTION_JUMP_TO_POS on the wiki. /emoticons/default_smile.png

Thanks Nayd!

There are several quests where u have to place some item on the ground which should attract a nearby mob.


Agreed. That sounds fine as well.

Untill than you could simply go and script it on GUID. Every GUID takes a different direction. /emoticons/default_smile.png


Want to buy run/walk param1.

I also highly suggest making a big change to event_flags column. I’d say remove the REPEATABLE flag and add a new column which would allow you to define how many times you want a specific action to happen. Like if I write a value of 5 in that column field with action type talk, it will only say the line 5 times and then stop.

I’d like to see HAS_AURA or TARGET_BUFFED be expanded a bit to include more things. It seems to work fine for self buffs, but not for hostile targets (at least). Would be helpful for mobs that react based on spell ids on their target, hostile or otherwise or even a GO.

as mentioned here: http://www.trinitycore.org/f/topic/1210-sai-scripting-questions/page__st__240__p__28201#entry28201

Also a possible alteration to SMART_EVENT_FRIENDLY_HEALTH to allow it to also use %, as HEALTH_PCT seems to look at itself only. Or possibly change HEALTH_PCT to add a new parameter, ‘Radius’, where if it was set to 0 it would works exactly liek it does now, but if changed to say 20 it would effect all friendlies in that a 20y radius. Possibly also allow for negative numbers in the HP% min/max to work like SMART_EVENT_FRIENDLY_HEALTH, but more powerfully. Basically, I think these two smart events should be merged in some way.