Hi there! Reflecting on some sql Scripting (to prepare an event), I downloaded "Event Horizon" ("event horizon sai editor 121"). It's a helpful program to help Scripting gameobjects and creatures. I used it to "open" the flame gate, at Sunwell (near to Brutallus). But there is an incovenience... We need to "enable smartAI" with Tools button (with Event horizon program: "To fix it, Click 'Tools > Enable SmartAI' (or) Press CTRL+E on your keyboard."). So I wrote with the program help this script. But to work, it need to enable smartAI with the gameobject you choose as id (by default, 50002)
Documentation with an example how to use Event Horizon program : http://devsource-eventhorizon.blogspot.fr/
Documentation with an example how to use Event Horizon program : http://devsource-eventhorizon.blogspot.fr/
Code:
-- Modifiable starting here
SET @ENTRY := 50002;
SET @DISPLAY := 1327;
-- DO NOT MODIFY starting here (or at own risks)
-- Creation of the "button" of the flame gate from Sunwell (id=188075, guid=55387)
-- First, we create a generic "button" to active the door. For misunderstood reason,
-- then I can't activate it itself, so I use a button ^^
-- In the second Insert, we put the "button" inworld, near to the flames gate
INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `data1`, `ScriptName`) VALUES (@ENTRY, '10', @DISPLAY, 'Button Door', '0', 'SmartGameObjectAI');
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zone`, `area`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (328704, 50002, 580, 4075, 4140, 1, 65535, 1531.15, 533.282, 30.1337, 4.32312, 0, 0, 0.830516, -0.556995, 300, 0, 1);
-- We script the opening thanks to "Event Horizon"
-- Generated by Event Horizon - SAI Editor (http://devsource-eventhorizon.tk/)
-- Button Door
SET [MENTION=8308]Sour[/MENTION]CETYPE := 1; -- Gameobject=1, Creature=0
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type` [MENTION=8308]Sour[/MENTION]CETYPE;
UPDATE gameobject_template SET AIName="SmartObjectAI" 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 [MENTION=8308]Sour[/MENTION]CETYPE,0,0,64,0,100,1,0,0,0,0,9,0,0,0,0,0,0,14,55387,188075,0,0.0,0.0,0.0,0.0,"Button for the barrier of flame");
Last edited: