[WIP] Spiteful Apparition SAI (Forge of Souls)

Been working on a Blizzlike Spiteful Apparition on FoS.



-- Spiteful Apparition

SET @ENTRY := 36551;


DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;

DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;

UPDATE creature_template SET scale="1.5", AIName="SmartAI", ScriptName="" 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,0,0,0,0,1,100,1,0,0,0,0,41,2000,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Force Despawn (6sec)"),

(@ENTRY,0,1,0,0,0,100,1,5000,5000,5000,5000,11,36727,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Apply visual"),

(@ENTRY,0,2,0,0,0,100,1,5000,5000,5000,5000,11,69136,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Apply visual (2)"),

(@ENTRY,0,3,0,4,0,100,1,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Disable Autoattack"),

(@ENTRY,0,4,0,1,0,100,7,0,0,0,0,18,33554432,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Full combat invisibility (OCC)"),

(@ENTRY,0,5,0,0,0,100,7,5000,5000,5000,5000,19,33554432,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Full combat invisibility (IC)"),

(@ENTRY,0,6,0,0,0,100,3,5200,5200,5200,5200,11,68895,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition (Normal) - Cast Spite"),

(@ENTRY,0,7,0,0,0,100,7,6500,6500,6500,6500,22,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition - Change to Phase 1"),

(@ENTRY,0,8,0,0,0,100,5,5200,5200,5200,5200,11,70212,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Spiteful Apparition (Heroic) - Cast Spite");

ToDo:

  • Find the correct DisplayID for the Spiteful Apparition (portrait icon doesn’t match retail portrait)

  • Get a SAI developers look at this to see if it meets the SAI scripting standards

Attached screenshot of retail portrait of the Spiteful Apparition

[ATTACH]287._xfImport[/ATTACH]

Yes, it does. Just one little thing, the @sourcetype var isn’t needed, using simple 0’s would be just fine. (0 vs 10 char word)

Edit: And it would be better to write what event you are using on the comment (“NPC name - event - action - target (if needed)”, e.g “Spiteful Apparition - On quest accept say talk_1”)

Thanks for your reply, Nay.

As for your comment on that I should include comments; Apart from those comments I’ve written per event, what else should I include?

Regards,

MelEnt

Nothing else /emoticons/default_smile.png

Edited.

Any chance this could be implemented into the official Trinity git?

-- Spiteful Apparition
SET @ENTRY := 36551;

DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
UPDATE `creature_template` SET `scale`=1.5, `AIName`= 'SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY;
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,0,1,100,1,0,0,0,0,41,2000,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Force Despawn (6sec)"),
(@ENTRY,0,1,0,0,0,100,1,5000,5000,5000,5000,11,36727,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Apply visual"),
(@ENTRY,0,2,0,0,0,100,1,5000,5000,5000,5000,11,69136,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Apply visual (2)"),
(@ENTRY,0,3,0,4,0,100,1,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Disable Autoattack"),
(@ENTRY,0,4,0,1,0,100,7,0,0,0,0,18,33554432,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Full combat invisibility (OCC)"),
(@ENTRY,0,5,0,0,0,100,7,5000,5000,5000,5000,19,33554432,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Full combat invisibility (IC)"),
(@ENTRY,0,6,0,0,0,100,3,5200,5200,5200,5200,11,68895,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition (Normal) - Cast Spite"),
(@ENTRY,0,7,0,0,0,100,7,6500,6500,6500,6500,22,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition - Change to Phase 1"),
(@ENTRY,0,8,0,0,0,100,5,5200,5200,5200,5200,11,70212,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0, "Spiteful Apparition (Heroic) - Cast Spite");[/CODE]

Some code style /emoticons/default_tongue.png

If it behaves like offi makes it behave and is working, please fill an issue on the issuetracker and mark this topic with [Completed] /emoticons/default_wink.png

I am working on trash for forge of souls. I am 95% complete and it should be pushed Sunday April 29.