用户工具

站点工具


waypoints-information

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
waypoints-information [2023/10/03 17:36] – [Example for path creation using GM '.wp' commands] adminwaypoints-information [2023/10/03 17:38] (当前版本) – [A few helpful SQL statements] admin
行 61: 行 61:
 ===== A few helpful SQL statements ===== ===== A few helpful SQL statements =====
  
-Delete path +**Delete path** 
-Select the creature, then unload the path:+  Select the creature, then unload the path:
  
-.wp unload +<code>.wp unload</code> 
-Delete the path from the DB, for example 123456700:+  Delete the path from the DB, for example 123456700: 
 +<code>DELETE FROM `waypoint_data` WHERE `id` = 123456700;</code> 
 +**Take over the waypoints from 'waypoint_data' to 'waypoints' (SmartAI)**
  
-DELETE FROM `waypoint_data` WHERE `id` = 123456700; 
-Take over the waypoints from 'waypoint_data' to 'waypoints' (SmartAI) 
 If you need the waypoints for SmartAI you have to copy the waypoints from table waypoint_data into table waypoints and then delete the original waypoints (unload the path for the creature via .wp unload if it was loaded before). Here an example for path 123456700: If you need the waypoints for SmartAI you have to copy the waypoints from table waypoint_data into table waypoints and then delete the original waypoints (unload the path for the creature via .wp unload if it was loaded before). Here an example for path 123456700:
  
-INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`)+<code>INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`)
 SELECT `id`,`point`,`position_x`,`position_y`,`position_z` FROM `waypoint_data` WHERE `id` = 123456700; SELECT `id`,`point`,`position_x`,`position_y`,`position_z` FROM `waypoint_data` WHERE `id` = 123456700;
-DELETE FROM `waypoint_data` WHERE `id` = 123456700; +DELETE FROM `waypoint_data` WHERE `id` = 123456700;</code> 
-Take over the waypoints from 'waypoint_data' to 'script_waypoint' (CreatureAI)+**Take over the waypoints from 'waypoint_data' to 'script_waypoint' (CreatureAI)** 
 The same as above, but now for script_waypoint instead of waypoints. The entry of script_waypoint has to be the creature_template.entry, here for example 1234567: The same as above, but now for script_waypoint instead of waypoints. The entry of script_waypoint has to be the creature_template.entry, here for example 1234567:
  
-INSERT INTO `script_waypoint` (`entry`,`pointid`,`location_x`,`location_y`,`location_z`)+<code>INSERT INTO `script_waypoint` (`entry`,`pointid`,`location_x`,`location_y`,`location_z`)
 SELECT 1234567 AS `entry`,`point`,`position_x`,`position_y`,`position_z` FROM `waypoint_data` WHERE `id` = 123456700; SELECT 1234567 AS `entry`,`point`,`position_x`,`position_y`,`position_z` FROM `waypoint_data` WHERE `id` = 123456700;
-DELETE FROM `waypoint_data` WHERE `id` = 123456700;+DELETE FROM `waypoint_data` WHERE `id` = 123456700;</code>
  
 Don't forget to unload the path from the creature if it was loaded before. Don't forget to unload the path from the creature if it was loaded before.
waypoints-information.1696325782.txt.gz · 最后更改: 2023/10/03 17:36 由 admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki