Bonjour, je viens ici vous soumettre un petit soucie.
J'aimerai créé un pnj téléporteur.
Ainsi qu'un SQL de mthsena, que j'ai modifié pour l'adapter à ma table creature_template.
-- Creature_template table
SET @CREATURE_TEMPLATE_ID := '99998';
SET @CREATURE_TEMPLATE_NAME := 'Téléporteur'; -
--
-- Gossip_menu_option table
SET @GOSSIP_MENU_ID := '55001';
SET @GOSSIP_MENU_TEXT := 'Aéroport Forgefer';
SET @GOSSIP_MENU_CONFIRMTEXT := 'Etes vous sûr?';
--
-- Smart_scripts table
SET @MAP_ID := '0';
SET @COORD_X := '-4926.45';
SET @COORD_Y := '-1723.58';
SET @COORD_Z := '503.32';
SET @ORIENTATION := '0.55';
--
-- Data
REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES (@CREATURE_TEMPLATE_ID, 0, 0, 0, 0, 0, 13, 0, 0, 0, @CREATURE_TEMPLATE_NAME, 'NULL', NULL, @GOSSIP_MENU_ID, 76, 76, 0, 35, 3, 1, 1.14286, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'SmartAI', 0, 3, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, '', 0);
REPLACE INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES(@GOSSIP_MENU_ID,'0','2',@GOSSIP_MENU_TEXT,'1','1','0','0','0','0',@GOSSIP_MENU_CONFIRMTEXT);
REPLACE INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES(@GOSSIP_MENU_ID,'1','4','Close Window.','1','1','0','0','0','0',NULL);
REPLACE 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(@CREATURE_TEMPLATE_ID,'0','0','0','62','0','100','0',@GOSSIP_MENU_ID,'0','0','0','62',@MAP_ID,'0','0','0','0','0','0','8','0','0',@COORD_X,@COORD_Y,@COORD_Z,@ORIENTATION,'Custom Teleporter');
REPLACE 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(@CREATURE_TEMPLATE_ID,'0','1','0','62','0','100','0',@GOSSIP_MENU_ID,'1','0','0','72','0','0','0','0','0','0','0','0','0','0','0','0','0','0','Custom Teleporter');
Le problème est que, le pnj est bien en jeux, il a bien ses menus mais sans action.
Quand on choisis de se téléporter, il demande la validation et là, on clic dans le vide.
Et pareil pour quitter, on clique dans le vide.
Je pense que ça viens du SmartAI mais pas moyen de débloquer la situation.
Si quelqu'un y voit plus clair que moi.
Il parait qu'un regard extérieur est souvent plus utile.
D'avance merci.
Cdlt.