Activate path script.

Hello! How can i make the npc to start waypoint movement? I already checked the docs and i found a lot of moveto, startwaypoint and other functions. However i failed in using them…What is recommended for gossip script?

Ok, so i tried this

creature->GetMotionMaster()->MovePoint(0, 3899.37, 1045.43, 485.75);it compiles and starts, but the npc don’t moves :confused: Why is that? Btw yes, the coords are valid!

Hey guys please help!

do you mean waypoint movement with several waypoints?

if yes use this:


SET @NPC := xxxx;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES

xxx = the guid of the creature

​I mean do it by script. Can you tell me how to do it?