浏览代码

Added documentation for script command navigateto
* Follow up to 4f13007.
* Corrected a few constants from PLANE -> AIRSHIP.

aleos89 9 年之前
父节点
当前提交
179f734249
共有 3 个文件被更改,包括 35 次插入17 次删除
  1. 26 0
      doc/script_commands.txt
  2. 8 16
      src/map/script.h
  3. 1 1
      src/map/script_constants.h

+ 26 - 0
doc/script_commands.txt

@@ -1087,6 +1087,8 @@ to alberta (98,154) when clicked.
 
 
     mes "Have you checked out the <NAVI>[Tool Shop]<INFO>alberta,98,154,0,000,0</INFO></NAVI>?";
     mes "Have you checked out the <NAVI>[Tool Shop]<INFO>alberta,98,154,0,000,0</INFO></NAVI>?";
 
 
+See also 'navigateto', which can be used for certain NPC events.
+
 URLs
 URLs
 ----
 ----
 Similarly, you can create links to websites that launch in a new window:
 Similarly, you can create links to websites that launch in a new window:
@@ -9014,6 +9016,30 @@ Valid flag are:
 
 
 ---------------------------------------
 ---------------------------------------
 
 
+*navigateto("<map>"{,<x>,<y>,<flag>,<hide_window>,<monster_id>,<char_id>});
+
+Generates a navigation for attached or specified character. Requires client
+2011-10-10aRagEXE or newer. The flag specifies how the client will display
+a specific route. The hide_window specifies whether to display (1) or not
+display (0) the navigation window. Specify the monster_id to navigate to
+known locations of the specified monster.
+
+Note: The client requires custom monster spawns be in the navigation file
+for using the embedded client Navigation feature to work properly. In this
+instance sending the player to the map where the monster spawns is a simpler
+solution rather than sending the map and the monster_id.
+
+Valid flags are:
+ NAV_NONE - No services
+ NAV_AIRSHIP_ONLY - Airship only
+ NAV_SCROLL_ONLY - Scroll only
+ NAV_AIRSHIP_AND_SCROLL - Airship and Scroll
+ NAV_KAFRA_ONLY - Kafra only
+ NAV_KAFRA_AND_AIRSHIP - Kafra and Airship
+ NAV_KAFRA_AND_SCROLL - Kafra and Scroll
+ NAV_ALL - All services
+
+---------------------------------------
 
 
 Whew.
 Whew.
 That's about all of them.
 That's about all of them.

+ 8 - 16
src/map/script.h

@@ -624,22 +624,14 @@ enum unitdata_npctypes {
 };
 };
 
 
 enum navigation_service {
 enum navigation_service {
-	// 0
-	NAV_NONE = 0,
-	// 1(actually 1-9)
-	NAV_AIRSHIP_ONLY = 1,
-	// 10
-	NAV_SCROLL_ONLY = 10,
-	// 11(actually 11-99)
-	NAV_AIRSHIP_AND_SCROLL = NAV_AIRSHIP_ONLY + NAV_SCROLL_ONLY,
-	// 100
-	NAV_KAFRA_ONLY = 100,
-	// 101(actually 101-109)
-	NAV_KAFRA_AND_PLANE = NAV_KAFRA_ONLY + NAV_AIRSHIP_ONLY,
-	// 110
-	NAV_KAFRA_AND_SCROLL = NAV_KAFRA_ONLY + NAV_SCROLL_ONLY,
-	// 111(actually 111-255)
-	NAV_ALL = NAV_AIRSHIP_ONLY + NAV_SCROLL_ONLY + NAV_KAFRA_ONLY
+	NAV_NONE = 0, ///< 0
+	NAV_AIRSHIP_ONLY = 1, ///< 1 (actually 1-9)
+	NAV_SCROLL_ONLY = 10, ///< 10
+	NAV_AIRSHIP_AND_SCROLL = NAV_AIRSHIP_ONLY + NAV_SCROLL_ONLY, ///< 11 (actually 11-99)
+	NAV_KAFRA_ONLY = 100, ///< 100
+	NAV_KAFRA_AND_AIRSHIP = NAV_KAFRA_ONLY + NAV_AIRSHIP_ONLY, ///< 101 (actually 101-109)
+	NAV_KAFRA_AND_SCROLL = NAV_KAFRA_ONLY + NAV_SCROLL_ONLY, ///< 110
+	NAV_ALL = NAV_AIRSHIP_ONLY + NAV_SCROLL_ONLY + NAV_KAFRA_ONLY ///< 111 (actually 111-255)
 };
 };
 
 
 /**
 /**

+ 1 - 1
src/map/script_constants.h

@@ -3000,7 +3000,7 @@
 	export_constant(NAV_SCROLL_ONLY);
 	export_constant(NAV_SCROLL_ONLY);
 	export_constant(NAV_AIRSHIP_AND_SCROLL);
 	export_constant(NAV_AIRSHIP_AND_SCROLL);
 	export_constant(NAV_KAFRA_ONLY);
 	export_constant(NAV_KAFRA_ONLY);
-	export_constant(NAV_KAFRA_AND_PLANE);
+	export_constant(NAV_KAFRA_AND_AIRSHIP);
 	export_constant(NAV_KAFRA_AND_SCROLL);
 	export_constant(NAV_KAFRA_AND_SCROLL);
 	export_constant(NAV_ALL);
 	export_constant(NAV_ALL);