[Archive] Tuto SAI-Editor: initiation
[Archive] Tuto SAI-Editor: initiation
![[Image: 457-b5b88642a82ccf81a9a22c168f28a403.jpg...tbiGQqgsz4]](https://www.emucoach.com/data/attachments/0/457-b5b88642a82ccf81a9a22c168f28a403.jpg?hash=tbiGQqgsz4)
Quote: SET @ENTRY := 1100000;It is not very practical to edit or understand, especially if the script is long enough. SAI-Editor by a graphical interface will allow you to generate these lines in order to copy / paste them in a sql file (text) or to execute them directly in the DB.
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
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,73,0,100,0,0,0,2000,2000,62,0,0,0,0,0,0,7,0,0,0,-14286.2,556.544,8.68897,4.36638,"Téléportation a Baie du Butin");
Click to expand...
Quote: REPLACE INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES5) Designates the action itself, in 99% of the cases what the mob will do but not that, there are some specific exceptions.
(ID défini dansgossip_menu_id de créature_template , Nunero du choix 0 1 2 3 ... 99 du gossip, 0, "Faites de cette auberge votre foyer", 0, 1, 1, 0, 0, 0, 0, '', 0);
Click to expand...
Quote: Donc avec ACTION_CROSS_CAST (86) le script dit a trinity " bon c'est moi qui l’exécute mais fait comme ci c’était le petit gnome qui me cliquette la " .- ACTION_CALL_KILLEDMONSTER (33): One of the most important actions since it gives credit, it makes it possible to validate a quest condition. What you should know is that many quests have this type of credit as a condition even if what is asked is not to kill a creature. This is why you can come across wowhead NPCs with the mention "The location of this NPC is unknown.", This mention can also indicate a pet. It should be noted that this entry must exist as a PNJ in the table creature_template, even here I remind it it is not a PNJ strictly speaking and used only that in this case. I would come back to the question in a tutorial to repair quests thanks to keira2 + SAI-Editor.
Donc pour que le mob applique cette aura vérouillé au joueur il faudra remplir Target (6) sur TARGET_SELF (1) et action (7) sur Target type caster =7
Target : TARGET_SELF (1)
Click to expand...
Quote: -- Gazelle SAIExplanation: If this deer detects a movement between him and 15m and that he is out of combat, then he casts a fear spell on himself and therefore flees the one who approaches him.
SET @ENTRY := 4166;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
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,2000,0,10,0,100,0,1,15,2000,2000,11,68326,0,0,0,0,0,1,0,0,0,0,0,0,0,"Si detecte mouvement hors combat : auto peur 8225");
Click to expand...
Archived author: dokuro • Posted: 2025-11-04T18:04:44.204650
Original source
Making a tutorial on SAI-Editor or SmartAI
![[Image: 457-b5b88642a82ccf81a9a22c168f28a403.jpg...tbiGQqgsz4]](https://www.emucoach.com/data/attachments/0/457-b5b88642a82ccf81a9a22c168f28a403.jpg?hash=tbiGQqgsz4)
would be a little presumptuous in view of these many possibilities.
I will therefore by this tutorial try to make you pass the first impression of complexity that it gives by a discovery of the interface and these main lines, see some examples / simple tips to illustrate it.
Personally I like SmartAI a lot because unlike C ++ it has the big advantage of crossing wow versions and it is also much more accessible than learning a programming language.
So drop the kikou impression "this is for beginners I code in C ++ because I am a pro" Wink
But before starting it would be good to recover it ... and as much as possible already compiled: it's HERE
Then in the settings menu choose the game extension, the auto connection and what you want.
---
If you've never seen the SQL of a patch or update, its looks like this:
Quote: SET @ENTRY := 1100000;It is not very practical to edit or understand, especially if the script is long enough. SAI-Editor by a graphical interface will allow you to generate these lines in order to copy / paste them in a sql file (text) or to execute them directly in the DB.
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
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,73,0,100,0,0,0,2000,2000,62,0,0,0,0,0,0,7,0,0,0,-14286.2,556.544,8.68897,4.36638,"Téléportation a Baie du Butin");
Click to expand...
Quote: REPLACE INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES5) Designates the action itself, in 99% of the cases what the mob will do but not that, there are some specific exceptions.
(ID défini dansgossip_menu_id de créature_template , Nunero du choix 0 1 2 3 ... 99 du gossip, 0, "Faites de cette auberge votre foyer", 0, 1, 1, 0, 0, 0, 0, '', 0);
Click to expand...
Quote: Donc avec ACTION_CROSS_CAST (86) le script dit a trinity " bon c'est moi qui l’exécute mais fait comme ci c’était le petit gnome qui me cliquette la " .- ACTION_CALL_KILLEDMONSTER (33): One of the most important actions since it gives credit, it makes it possible to validate a quest condition. What you should know is that many quests have this type of credit as a condition even if what is asked is not to kill a creature. This is why you can come across wowhead NPCs with the mention "The location of this NPC is unknown.", This mention can also indicate a pet. It should be noted that this entry must exist as a PNJ in the table creature_template, even here I remind it it is not a PNJ strictly speaking and used only that in this case. I would come back to the question in a tutorial to repair quests thanks to keira2 + SAI-Editor.
Donc pour que le mob applique cette aura vérouillé au joueur il faudra remplir Target (6) sur TARGET_SELF (1) et action (7) sur Target type caster =7
Target : TARGET_SELF (1)
Click to expand...
Quote: -- Gazelle SAIExplanation: If this deer detects a movement between him and 15m and that he is out of combat, then he casts a fear spell on himself and therefore flees the one who approaches him.
SET @ENTRY := 4166;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
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,2000,0,10,0,100,0,1,15,2000,2000,11,68326,0,0,0,0,0,1,0,0,0,0,0,0,0,"Si detecte mouvement hors combat : auto peur 8225");
Click to expand...