SAI path scripting

Would it be ok to add an option 8, for example, to Smartscripts for scripting creatures OOC?
Add the option 8 id to the creature like we do with waypoints.
add an action to SAI “Load Path” so the core loads path and doesn’t do next command until path ends.
So we could have a script like this:

– Pathing for Niluut : 48581
SET @GUID := 12345678;
SET @PATH1 := @GUID *10;
SET @PATH2 := @GUID *10 + 1;

– Niluut pathing SAI
UPDATE creature SET pathscript=@GUID,position_x=6029.4,position_y=-876.596,position_z=415.2376 WHERE guid=@GUID;
UPDATE creature_template SET AIName=“SmartAI” WHERE entry=48581;
DELETE FROM smart_scripts WHERE entryorguid=@GUID AND source_type=8;
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
(@GUID,8,0,0,0,0,100,0,1000,1000,1000,1000,119,@PATH1,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Load first half of path”),
(@GUID,8,1,0,0,0,100,0,1000,1000,1000,1000,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Set Emotestate 69”),
(@GUID,8,2,0,0,0,100,0,5000,5000,5000,5000,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Set Emotestate 0”),
(@GUID,8,3,0,0,0,100,0,1000,1000,1000,1000,119,@PATH2,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Load last half of path”),
(@GUID,8,4,0,0,0,100,0,1000,1000,1000,1000,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.029744,“Niluut - Pathscript - Set Orientation”),
(@GUID,8,5,0,0,0,100,0,40000,40000,40000,40000,120,0,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Restart script”);

– Niluut waypoints
DELETE FROM waypoints WHERE entry IN (@PATH1,@PATH2);
INSERT INTO waypoints (entry,pointid,position_x,position_y,position_z,point_comment) VALUES
– First half
(@PATH1,1,6031.205,-878.377,416.1823,“Niluut entry: 48581”),
(@PATH1,2,6033.955,-881.877,419.1823,“Niluut entry: 48581”),
(@PATH1,3,6037.455,-883.377,420.1823,“Niluut entry: 48581”),
(@PATH1,4,6040.455,-881.127,421.6823,“Niluut entry: 48581”),
(@PATH1,5,6043.455,-878.377,424.4323,“Niluut entry: 48581”),
(@PATH1,6,6044.955,-875.877,424.6823,“Niluut entry: 48581”),
(@PATH1,7,6042.455,-872.627,424.6823,“Niluut entry: 48581”),
(@PATH1,8,6038.455,-868.877,424.6823,“Niluut entry: 48581”),
(@PATH1,9,6040.455,-865.627,424.6823,“Niluut entry: 48581”),
(@PATH1,10,6042.51,-867.158,424.6270,“Niluut entry: 48581”),
– Second half
(@PATH2,1,6039.245,-867.6795,424.6825,“Niluut entry: 48581”),
(@PATH2,2,6039.245,-870.1795,424.6825,“Niluut entry: 48581”),
(@PATH2,3,6044.495,-874.6795,424.6825,“Niluut entry: 48581”),
(@PATH2,4,6044.745,-876.6795,424.6825,“Niluut entry: 48581”),
(@PATH2,5,6043.245,-878.6795,423.9325,“Niluut entry: 48581”),
(@PATH2,6,6039.245,-881.9295,420.4325,“Niluut entry: 48581”),
(@PATH2,7,6037.495,-883.6795,420.1825,“Niluut entry: 48581”),
(@PATH2,8,6034.495,-881.4295,419.1825,“Niluut entry: 48581”),
(@PATH2,9,6029.980,-877.7010,415.2380,“Niluut entry: 48581”),
(@PATH2,10,6029.40,-876.5960,415.2376,“Niluut entry: 48581”);

A little more thought this would have double last waypoint for paths that end and 1,2,3 added for repeating paths for proper spline calculations. Also Flags value in scripting for movement.

Just need to find someone who would like to do movement properly instead of the hacky way its done now,

– Would it be ok to add an option 8, for example, to Smartscripts for scripting creatures OOC?
– Add the option 8 id to the creature like we do with waypoints.
– add an action to SAI “Load Path” so the core loads path and doesn’t do next command until path ends.
– So we could have a script like this:

– #### Load repeating pathing with actions ####

– Pathing for Niluut : 48581
SET @GUID := 12345678;
SET @PATH1 := @GUID *10;
SET @PATH2 := @GUID *10 + 1;

– Niluut pathing SAI
UPDATE creature SET pathscript=@GUID,position_x=6031.205,position_y=-878.377,position_z=416.1823 WHERE guid=@GUID;
UPDATE creature_template SET AIName=“SmartAI” WHERE entry=48581;
DELETE FROM smart_scripts WHERE entryorguid=@GUID AND source_type=8;
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
(@GUID,8,0,0,0,0,100,0,0,0,0,0,119,@PATH1,3145728,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Load first half of path with flags”),
(@GUID,8,1,0,0,0,100,0,1000,1000,1000,1000,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Set Emotestate 69”),
(@GUID,8,2,0,0,0,100,0,5000,5000,5000,5000,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Set Emotestate 0”),
(@GUID,8,3,0,0,0,100,0,1000,1000,1000,1000,119,@PATH2,3145728,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Load last half of path with flags”),
(@GUID,8,4,0,0,0,100,0,1000,1000,1000,1000,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.029744,“Niluut - Pathscript - Set Orientation”),
(@GUID,8,5,0,0,0,100,0,40000,40000,40000,40000,120,0,0,0,0,0,0,1,0,0,0,0,0,0,0,“Niluut - Pathscript - Restart script”);

– Niluut waypoints
DELETE FROM waypoints WHERE entry IN (@PATH1,@PATH2);
INSERT INTO waypoints (entry,pointid,position_x,position_y,position_z,point_comment) VALUES
– First half
(@PATH1,1,6031.205,-878.377,416.1823,“Niluut entry: 48581”),
(@PATH1,2,6033.955,-881.877,419.1823,“Niluut entry: 48581”),
(@PATH1,3,6037.455,-883.377,420.1823,“Niluut entry: 48581”),
(@PATH1,4,6040.455,-881.127,421.6823,“Niluut entry: 48581”),
(@PATH1,5,6043.455,-878.377,424.4323,“Niluut entry: 48581”),
(@PATH1,6,6044.955,-875.877,424.6823,“Niluut entry: 48581”),
(@PATH1,7,6042.455,-872.627,424.6823,“Niluut entry: 48581”),
(@PATH1,8,6038.455,-868.877,424.6823,“Niluut entry: 48581”),
(@PATH1,9,6040.455,-865.627,424.6823,“Niluut entry: 48581”),
(@PATH1,10,6042.51,-867.158,424.6270,“Niluut entry: 48581”),
(@PATH1,11,6042.51,-867.158,424.6270,“Niluut entry: 48581”),
– Second half
(@PATH2,1,6039.245,-867.6795,424.6825,“Niluut entry: 48581”),
(@PATH2,2,6039.245,-870.1795,424.6825,“Niluut entry: 48581”),
(@PATH2,3,6044.495,-874.6795,424.6825,“Niluut entry: 48581”),
(@PATH2,4,6044.745,-876.6795,424.6825,“Niluut entry: 48581”),
(@PATH2,5,6043.245,-878.6795,423.9325,“Niluut entry: 48581”),
(@PATH2,6,6039.245,-881.9295,420.4325,“Niluut entry: 48581”),
(@PATH2,7,6037.495,-883.6795,420.1825,“Niluut entry: 48581”),
(@PATH2,8,6034.495,-881.4295,419.1825,“Niluut entry: 48581”),
(@PATH2,9,6029.980,-877.7010,415.2380,“Niluut entry: 48581”),
(@PATH2,10,6029.40,-876.5960,415.2376,“Niluut entry: 48581”),
(@PATH2,11,6029.40,-876.5960,415.2376,“Niluut entry: 48581”);

– ##### Load basic repeating path if not already active ####

– Pathing for Sunblade Scout Entry: 25372
SET @GUID := 12345678;
SET @PATH := @GUID *10;
– Sunblade Scout pathing SAI
UPDATE creature SET pathscript=@GUID,position_x=1683.619,position_y=1061.337,position_z=16.11073 WHERE guid=@GUID;
UPDATE creature_template SET AIName=“SmartAI” WHERE entry=48581;
DELETE FROM smart_scripts WHERE entryorguid=@GUID AND source_type=8;
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
(@GUID,8,0,0,0,0,100,0,0,0,0,0,119,@PATH,3145728,1,0,0,0,1,0,0,0,0,0,0,0,“Sunblade Scout - Pathscript - Load path with flags as repeating”);
– Sunblade Scout Waypoints
DELETE FROM waypoints WHERE entry IN (@PATH);
INSERT INTO waypoints (entry,pointid,position_x,position_y,position_z,point_comment) VALUES
(@PATH,1,1683.619,1061.337,16.11073,“Sunblade Scout Entry: 25372”),
(@PATH,2,1683.811,1052.461,16.11073,“Sunblade Scout Entry: 25372”),
(@PATH,3,1684.526,1042.533,16.31923,“Sunblade Scout Entry: 25372”),
(@PATH,4,1677.618,1034.837,16.36244,“Sunblade Scout Entry: 25372”),
(@PATH,5,1671.93,1027.017,16.53454,“Sunblade Scout Entry: 25372”),
(@PATH,6,1667.498,1021.246,16.25256,“Sunblade Scout Entry: 25372”),
(@PATH,7,1663.426,1027.58,16.11007,“Sunblade Scout Entry: 25372”),
(@PATH,8,1659.631,1033.707,16.11068,“Sunblade Scout Entry: 25372”),
(@PATH,9,1664.062,1040.953,16.11068,“Sunblade Scout Entry: 25372”),
(@PATH,10,1669.373,1048.873,16.11073,“Sunblade Scout Entry: 25372”),
(@PATH,11,1672.802,1053.73,16.11073,“Sunblade Scout Entry: 25372”),
(@PATH,12,1683.619,1061.337,16.11073,“Sunblade Scout Entry: 25372”),
(@PATH,13,1683.811,1052.461,16.11073,“Sunblade Scout Entry: 25372”),
(@PATH,14,1684.526,1042.533,16.31923,“Sunblade Scout Entry: 25372”);