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:

SMART_EVENT_PLAYER_SAY
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.

SMART_EVENT_TAXI_POINT
SMART_EVENT_TAXI_END
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.

SMART_ACTION_RESET
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.

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

SMART_ACTION_MOVE_FORWARD
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

SMART_ACTION_FLEE_FOR_ASSIST
Add param1 a bool if we want the creature to say flee message or not.
Done
https://github.com/TrinityCore/TrinityCore/commit/8274e42e3d1d9073c77e7cbb6f573637c1d7ddc9

SMART_ACTION_SET_HEALTH_PCT
http://www.trinitycore.org/f/topic/690-the-salvage-bay/page__view__findpost__p__4318
Done

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

And Maybe SMART_ACTION_MOD_VALUE

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

Maybe

SMART_ACTION_RELOAD_TEMPLATE

clear as day, yet may cause crashing?

SMART_ACTION_CHANGE_WEATHER

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

top of my dumb ass head

Nice Xees, I like them. ^^

SMART_ACTION_SUMMON_RANDOM

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?

http://www.trinityco…__fromsearch__1

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

Done.

https://github.com/TrinityCore/TrinityCore/commit/9d4c2c5b1e30472de035e1a72806d07af88fec52

+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.

About SMART_ACTION_JUMP_TO_POS;

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.

SMART_ACTION_FOLLOW_??

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

SMART_ACTION_SET_INHABITTYPE

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.

SMART_ACTION_DESPAWN_CREATURE

SMART_ACTION_DESPAWN_OBJECT

Speaks for itself. /emoticons/default_smile.png

SMART_EVENT_TARGET_REACHED_HOME

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

SMART_EVENT_BEHIND_TARGET

Speaks for itself. Used for spells such as backstab.

I agree

SMART_EVENT_BEHIND_TARGET

SMART_ACTION_ATTACK_CLOSEST_PLAYER

also

SMART_EVENT_QUEST_OBJ_COMPLETION

and

SMART_EVENT_QUEST_COMPLETION

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.

Would be nice to have SMART_ACTION_MOVE_TO_POS work with SMART_TARGET_ACTION_INVOKER.

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

SMART_ACTION_MOVE_TO_POS

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.