• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

How to add Spell in Creature

Dark

Enthusiast
this is very easy way to add spell in creature

@Entry = YOUR NPC ID
@Sourcetype = 0 ( Creature ) -- Don't touch this !
Code:
SET @ENTRY := 961002;
SET @SOURCETYPE := 0;
Deleting all spells what NPC have
Code:
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE;
Sets your NPC SmartAI whitout this your NPC can't use Spell
Code:
UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY LIMIT 1;
Smart Script
Code:
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
Code:
(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,5000,5000,5000,5000,11,50705,0,0,0,0,0,5,0,0,0,0.0,0.0,0.0,0.0,"
YOUR CUSTOM COMMENT"),
Time
Code:
5000 = 5 Secound (Phase 1)
5000 = 5 Secound (Phase 2)
5000 = 5 Secound (Phase 3)
5000 = 5 Secound (Phase 4)
Spell ( you can find Spells in WOWHEAD.COM )
Code:
50705 = This is Spell id i use Arcane Bolt you can change this
Always use this at end
Code:
(@ENTRY,@SOURCETYPE,14,0,6,0,100,1,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Reset script on death."),
(@ENTRY,@SOURCETYPE,15,0,1,0,100,1,5000,5000,5000,5000,78,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Reset script when out of combat.");

Full Script
Code:
SET @ENTRY := 961001;
SET @SOURCETYPE := 0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE;
UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY LIMIT 1;
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,@SOURCETYPE,1,0,0,0,100,0,5000,5000,5000,5000,11,50705,0,0,0,0,0,5,0,0,0,0.0,0.0,0.0,0.0,"Casting Arcane Bolt(13748) every 5 seconds."),
(@ENTRY,@SOURCETYPE,14,0,6,0,100,1,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Reset script on death."),
(@ENTRY,@SOURCETYPE,15,0,1,0,100,1,5000,5000,5000,5000,78,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Reset script when out of combat.");
 
Top