SmartAI - Delaying events

Hi all, I have started working with SmartAI and I tried to do this:

  • a player talks to a NPC and select a gossip

  • when the gossip is selected, the NPC starts talking

My problem is that the NPC says all texts together. Is there a way with SmartAI to delay an event from the next one? Such as: NPC says: “Hello!” and after some seconds it says: “How are you?”.

You can use source_type 9, event_param1/2 will be your delays in milliseconds.

Example: http://www.trinitycore.org/t/trinitycore/browser/sql/updates/world/2011_02_10_1_world_sai.sql?rev=4df770d59f8540a2493291683592a933e38856e8

Ok, thank you ^^ When using source_type=9, entryorguid must be always the npc entry multiplied by 100?

Yes, entry*100

You can trigger script9 with any event using action 80, target is usually self

Thanks again, I posted my work on the tracker. I hope it helps /emoticons/default_smile.png

im not exactly understanding the situation, if we set source type 9 how do we use it?

what happens to events and actions ?

That and event_type will be 0, action is whatever you need.

ah , understood, but when using it, should i place it right before the id of the event that i want triggered ? how do i call this delay ?