SmartAI quest ID=25766

I’ve a problema with a SmartAI, i need spawn 1 random creature when use an item in my bag, i link my SAI, i’ve tried more event and target but doesn’t work. Can you help me please?

Spell 77303 probably doesn’t target the creature you gave the SMART_EVENT_SPELLHIT event to.

I’ve try the spell 77306, but the problem was the same. I doing another try, with only 1 creature summoned, always with SMART_EVENT_SPELLHIT = 77303, on SMART_ACTION_SUMMON = 41232 and a SMART_TARGET_SELF, in this way the creature spawned and have the kill credit

I’m not sure if I understand what you’re talking about.

Sorry, i try to explain you.

If i use this SmartAI

– Highborne Charlatan SAI
SET @ENTRY := 34931;
UPDATE creature_template SET AIName=“SmartAI” WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY AND source_type=0;
INSERT INTO smart_scripts (entryorguid,source_type,id,link,event_type,event_phase_mask,event_chance,event_flags,event_param1,event_param2,event_param3,event_param4,action_type,action_param1,action_param2,action_param3,action_param4,action_param5,action_param6,target_type,target_param1,target_param2,target_param3,target_x,target_y,target_z,target_o,comment) VALUES
(@ENTRY,0,0,0,8,0,100,0,77303,0,0,0,12,41232,3,60000,0,0,0,1,0,0,0,0,0,0,0,“Highborne Charlatan - On Spellhit ‘77303’ - Summon Creature ‘Bound Highborne Spirit’”);

haven’t problem, i summon a creature and have a KillCredit. But in the original quest, when i use the item in bag, has a percentage that can summoned another creature hostile, the i’ve making another SAI ( wich replacing the SAI above.

I don’t know if you understand, i’m not speak very well english

Try making the creature say something with SMART_ACTION_TALK to check if the actionlists are properly called. It all looks okay to me.

I try with SMART_ACTION_TALK but nothing, i don’t know where is the problem

was about to suggest debug text but discover beat me to it and i didnt scroll up to see his mention… slowness comes with age. /emoticons/default_unsure.png

Did you place the SMART_ACTION_TALK in the actionlist or the initial script (thus of 34932)?

In the actionlist 3493200 and 3493201, in the initialscript there is the Action for Actionlist

I mean from which entry did you call the SMART_ACTION_TALK for a test?

In the 3943200

-- Actionlist SAI
SET @ENTRY := 3493200;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,100,0,0,0,0,0,0,"Highborne Sorcerer - On Script - Say Line 0");

Hmm why not use original spells to summon creature? You can also try with select random phase action and add all the spells/or manual summuns to only one script.

I’ve just tried to add all spells in one script /emoticons/default_smile.png, but nothing

@Polkic the issue is that the actionlists are never called, not the summoning inside the actionlists itself.

@Ercules76: try calling SMART_ACTION_TALK from SMART_EVENT_SPELLHIT on entry 34932 (so not one of the actionlists).