SQL 6xx For Alwyn: Make an NPC speak in SmartAI (EVENT_TEXT_OVER)

dokuro

Veteran Member
Verified Member
31
2020
8
Location
Paris
For more explian look this video thx =)

Demo SmartAI - EVENT_TEXT_OVER.f4v - YouTube


Creation of the NPC

REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `femaleName`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `exp_unk`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `type_flags2`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `HealthModifierExtra`, `ManaModifier`, `ManaModifierExtra`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(1000199, 0, 0, 0, 0, 0, 26374, 26374, 0, 0, 'Alwyn', '', NULL, NULL, 0, 1, 1, 0, 0, 11, 0, 0.69999998807907, 0.69999998807907, 1, 0, 0, 3000, 3000, 1, 34, 2, 33685506, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 300, 'SmartAI', 2, 3, 1, 1, 1, 1, 1, 1, 1.2999999523163, 1, 0, 0, 1, 0, 2, '', 0);


Creation of the text assigned to the NPC 1000199

REPLACE INTO `creature_text` (` entry`, `groupid`,` id`, `text`,` type`, `language`,` probability`, `emote`,` duration`, `sound`,` BroadcastTextId`, `TextRange`,` comment`) VALUES
(1000199, 0, 0, "Bonjours toi la ... Welcome to a tutorial from the Aquayoup forum", 12, 0, 0, 14, 0, 0, 0, 0, "BlaBla 0 at spawn + emote show = 25" ),
(1000199, 1, 0, "It's me who speaks yes ... open your eyes and close your mouth STP", 12, 0, 0, 14, 0, 0, 0, 0, "BlaBla 1 + emote" ),
(1000199, 2, 0, "You see it's not difficult to make a gnome speak", 12, 0, 0, 21, 0, 0, 0, 0, "BlaBla 2 + emote"),
(1000199, 3, 0, "Just take inspiration from this script using EVENT_TEXT_OVER from the 2nd sentence", 12, 0, 0, 14, 0, 0, 0, 0, "BlaBla 3"),
(1000199, 4, 0, "this command is used to wait until the event that you specified for it is finished", 12, 0, 0, 21,0, 0, 0, 0, "BlaBla 4"),
(1000199, 5, 0, "and thus be able to say the following sentence in action", 12, 0, 0, 14, 0, 0, 0, 0, "BlaBla 5"),
(1000199, 6, 0, "you can also make speak another PNJ by this script in Target but it is necessary that the text which it will say is on its creature_text and not on that of this PNJ,", 12, 0, 0, 65, 0, 0, 0, 0, "BlaBla 6"),
(1000199, 7, 0, "... Well what is a bit hard is to procrastinate because it does not seem to be very fair.,", 12, 0, 0, 65, 0, 0, 0, 0, "BlaBla 7");


Small script to make the gnome speak


- Alwyn SAI
SET @ENTRY: = 1000199;
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_ `,` target_y`, `target_z`,` target_o`, `comment`) VALUES
(@ ENTRY, 0,10,0,11,0,100,0,0,0,0,0,1,0,6000,0,0,0,0,1,0,0,0,0,0,0, 0.0, "blah 0 with emote"),
(@ ENTRY, 0,11,0,52,0,100,0,0,1000199,0,0,1,1,8000,0,0,0,0,1,0,100,0,0,0,0, 0, "blabla 1"),
(@ ENTRY, 0.12.0.52.0.100.0.1.1000199.0.0.1.2.4000.0.0.0.0.1.0.100.0.0.0.0, 0, "blabla 2"),
(@ ENTRY, 0.13.0.52.0.100.0.2.1000199.0.0.1.3.1212.0.0.0.0.0.1.0.0.0.0.0, 0,0, "blabla 3"),
(@ ENTRY, 0,14,0,52,0,100,0,3,1000199,0,0,1,4,8000,0,0,0,0,1,0,0,0,0,0, 0,0, "blabla 4"),
(@ ENTRY, 0,15,0,52,0,100,0,4,1000199,0,0,1,5,8000,0,0,0,0,1,0,0,0,0,0, 0,0, "blabla 5"),
(@ ENTRY, 0,16,0,52,0,100,0,5,1000199,0,0,1,6,8000,0,0,0,0,1,0,0,0,0,0, 0,0, "blabla 6"),
(@ ENTRY, 0.17.0.52.0.100.0.6.1000199.0.0.1.7.8000.0.0.0.0.1.0.0.0.0.0, 0,0, "blabla 7"),
(@ ENTRY, 0.18,0.52.0,100.0.7.1000199.0.0.37.7.8000.0.0.0.0.1.0.0.0.0.0, 0.0, "Die");


good game =)

Credit to : Stitch from Aquayoup
 
Last edited by a moderator:
Top