How To Make Npc Channling A Skill And Stop Attack While Doing It.

hey guys im trying to make npc channeling a spell here it is the code

INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES ('xxxxxxx', 'xxxxx', '0', '0', '100', '1', '6000', '8000', '9000', '11000', '11', 'xxxxxx', '4', '1', '0', '0', '0', '0', '0', '0', '0', '0', 'somemob - Cast some spell');[/CODE]

the mob casting the spell but soon as its start chaneling the mob keeps atacking and i dont get dmage from the spell

how can i make him stop attacking while channeling??

any ideas?

Please tell me why you didn’t read any other posts yet? /emoticons/default_smile.png

EventAI (creature_ai_scripts) is deprecated and replaced with SmartAI. Try to look around a bit in future…

well i added this SmartAI at the creature_template under the AIName to the NPC and it didnt fix the problem

DAM Its hard do i need to touch Smart_scripts cuz i cant understand nothing at

http://www.trinitycore.info/Smart_scripts_tc2#Event_types

they dont explain much about it…

Because thinking is hard, no? /emoticons/default_smile.png

Look up some EXAMPLES, than check the wiki what it actually does and install EventHorizon. (Trinity Utilities)

Can you give me a link where they explain what everything does? cuz this http://www.trinitycore.info/Smart_scripts_tc2#Event_types is not explain all

Except some events (that I don’t understand aswell), most them are “guessable” by name. Checking the code (simply do a file search by the event name) helps a lot.

Take a look at this. I pretty much dropped this quest but it works like it should.

[SPOILER]-- The Focus Wizards and Captain should always target one of the bunnies IN the Ley Line Focus according to two videos

– Focus Wizard SAI
– Captain Emmy Malin SAI
– ELM General Purpose Bunny SAI
– ELM General Purpose Bunny (scale x0.01) SAI
SET @ENTRY_FW := 26816; – Focus Wizard
SET @ENTRY_CE := 26762; – Captain Emmy Malin
SET @BUNNY_1 := 24021; – ELM General Purpose Bunny (scale x0.01)
SET @BUNNY_2 := 23837; – ELM General Purpose Bunny
SET @SPELL_NEEDLE_BEAM := 46906;
SET @SPELL_CONTROL_RING := 47374;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry IN (@ENTRY_FW,@BUNNY_1,@BUNNY_2,@ENTRY_CE);
DELETE FROM creature_ai_scripts WHERE creature_id IN (@ENTRY_FW,@ENTRY_CE);
DELETE FROM smart_scripts WHERE entryorguid IN (@ENTRY_FW,@BUNNY_2,@ENTRY_CE,-108282,-114033,-116032,-116030,-116029,-116026,-116035,-116020,-114055,-114064,-114054,-114074,-116024);
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
(@BUNNY_2,0,0,0,8,0,100,1,50546,0,0,0,33,26773,0,0,0,0,0,7,0,0,0,0,0,0,0,“ELM General Purpose Bunny - On Spellhit - Quest Credit”), – This is a different spell ID than the one used by quest item, it’s triggered

(-108282,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115927,@BUNNY_1,0,0,0,0,0,“Captain Emmy Malin - OOC - Cast Surge Needle Beam”),
(-114033,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115948,@BUNNY_1,0,0,0,0,0,“Focus Wizard - OOC - Cast Surge Needle Beam”),

(-114055,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,98600,@BUNNY_2,0,0,0,0,0,“Focus Wizard - OOC - Cast Surge Needle Beam”),
(-114064,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,10041038,@BUNNY_2,0,0,0,0,0,“Focus Wizard - OOC - Cast Surge Needle Beam”),
(-114054,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,10041039,@BUNNY_2,0,0,0,0,0,“Focus Wizard - OOC - Cast Surge Needle Beam”),
(-114074,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,10041040,@BUNNY_2,0,0,0,0,0,“Focus Wizard - OOC - Cast Surge Needle Beam”),

(-116032,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115947,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”),
(-116035,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115948,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”),

(-116030,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115924,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”),
(-116029,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115925,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”),
(-116026,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115927,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”),
(-116020,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115926,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”),
(-116024,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_NEEDLE_BEAM,2,0,0,0,0,10,115947,@BUNNY_1,0,0,0,0,0,“ELM General Purpose Bunny - OOC - Cast Surge Needle Beam”);

– Conditions, clean up previously used condition for quest spell as well
DELETE FROM conditions WHERE SourceTypeOrReferenceId=13 AND SourceEntry=@SPELL_CONTROL_RING;
DELETE FROM conditions WHERE SourceTypeOrReferenceIdIN (17) AND SourceEntry IN (@SPELL_NEEDLE_BEAM,@SPELL_CONTROL_RING);
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(17,0,@SPELL_NEEDLE_BEAM,0,19,@BUNNY_1,0,0,0,‘’,‘Spell Surge Needle Beam can only target ELM General Purpose Bunny (scale x0.01)’),
(17,0,@SPELL_NEEDLE_BEAM,1,19,@BUNNY_2,0,0,0,‘’,‘Spell Surge Needle Beam can only target ELM General Purpose Bunny’),
(17,0,@SPELL_CONTROL_RING,0,19,@BUNNY_2,0,0,0,‘’,‘Spell Ley Line Focus Control Ring can only target ELM General Purpose Bunny’);

-- Convert Focus Wizard SAI scripts from entry to GUID to make it work like it should and convert some EAI

[/SPOILER]