Random Occ Aura..

I am getting REALLY annoyed with this now… Does anyone understand why the heck this isn’t working? /emoticons/default_sleep.png

It only makes ~3 of the creatures actually do what I tell them to do…

[CODE]-- Convert Focus Wizard SAI scripts from entry to GUID to make it work like it should and convert some EAI
– 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’);[/sql]
[/CODE]

I tried to fix this quest some time ago, too. This was what I did, looked quite good as I remember. Perhaps it helps

DELETE FROM `smart_scripts` WHERE `entryorguid` IN(26773,2677300);
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
(26773,0,0,0,8,0,100,0,47374,0,0,0,80,2677300,0,2,0,0,0,1,0,0,0,0,0,0,0, 'Bunny - on spellhit start script'),
(2677300,9,0,0,0,0,100,0,3000,3000,0,0,11,47390,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Bunny - cast bunny beam');

DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (47392);
INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
(47392,47393,1,'Apply spell Quest Completion Script to self');

DELETE FROM `spell_scripts` WHERE `id`=47393;
INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(47393,0,0,14,47391,1,0,0,0,0,0); -- Remove Ley Line Information on quest turn in
[/sql]

I spawned the KC bunny inside the GO. So you will have to replace 26773 with the guid of the ELM bunny.

I spawn 2 Kill Credits (26773) it seems the spell auto targeting them! and that’s how the effect triggered the spell 50546


## Gives the buff to the target, tired to give it to me but the spell hve auto targeting... thats why target value is 0 (source - target) if it will be 1 (Source - Source) than nothing happenes.


DELETE FROM `spell_scripts` WHERE id='50546';

INSERT INTO `spell_scripts` VALUES

('50546', '0', '0', '15', '47390', '0', '0', '0.0', '0.0', '0.0', '0.0'),

('50546', '0', '0', '15', '47391', '0', '0', '0.0', '0.0', '0.0', '0.0');


## Added SAI that When the target get the buff he will kill the credit but it doesnt work!


DELETE FROM `smart_scripts` WHERE entryorguid='26773';

INSERT INTO `smart_scripts` VALUES

('26773', '0', '0', '0', '23', '0', '100', '0', '47391', '1', '1', '1', '33', '26773', '0', '0', '0', '0', '0', '7', '0', '0', '0', '0.0', '0.0', '0.0', '0.0', 'Quest Complete 12066'),

UPDATE `creature_template` SET AIName='SmartAI' WHERE entry='26773';