@@ -2612,6 +2612,140 @@ deleted.
26122612 // This would delete all elements of the array
26132613 deletearray(.@array);
26142614
2615+ ---------------------------------------
2616+ //=====================================
2617+ 1.1 - Message formatting commands (tags)
2618+ //=====================================
2619+ ---------------------------------------
2620+
2621+ *mesnavigation("<label>", "<map>"{, <x>{, <y>{, <show_window>{, <mode>{, <services_flag>{, <monster_id>}}}}}});
2622+
2623+ Generates and returns a <NAVI> tag with the given parameters. A <NAVI> tag when written to certain windows,
2624+ such as the one from "mes" command, will create a highlighted and clickable text, which when clicked,
2625+ starts the navigation system for the specified values.
2626+
2627+ It is important to note that for most "<modes>" values, it is expected that your client has proper navigation
2628+ files which includes the target NPC/monster, or they will fail.
2629+
2630+ If the current client doesn't support NAVI tags, returns a fall back text which generally looks like:
2631+ <label> (<map_name> <x>, <y>)
2632+
2633+ Parameters:
2634+ - label: (string, required)
2635+ The visible and clickable text. (example: "Hat maker")
2636+
2637+ - map: (string, required)
2638+ Target map name. (example: "prontera")
2639+ Note: when service_flag is NAV_WINDOW_SEARCH (-222) this becomes the search string.
2640+
2641+ - x: (int, optional, defaults to 0)
2642+ Target map X position
2643+ Note: does nothing when used with modes NAV_MODE_MAP or NAV_MODE_MOB
2644+
2645+ - y: (int, optional, defaults to 0)
2646+ Target map Y position
2647+ Note: does nothing when used with modes NAV_MODE_MAP or NAV_MODE_MOB
2648+
2649+ - show_window: (bool, optional, defaults to false)
2650+ Whether to open the navigation UI (true) or not (false) when clicking the label.
2651+
2652+ - mode: (int, optional, defaults to NAV_MODE_ALL (0))
2653+ The kind of navigation being performed. This mainly affects the messages shown by the client when you reach the map.
2654+ - NAV_MODE_ALL (0): "You have reached your destination"
2655+ - NAV_MODE_MAP (1): "You have reached the target map"
2656+ - NAV_MODE_NPC (2): "You have reached the map the NPC is at" / "You have reached the target NPC"
2657+ - NAV_MODE_MOB (3): "You have reached the map where the monster appears"
2658+
2659+ Notes:
2660+ - NAV_MODE_NPC requires client navigation files to have a NPC in the exact position or an error is shown
2661+ - NAV_MODE_MOB requires client navigation files to have <monster_id> spawn in the given map or an error is shown.
2662+
2663+ - services_flag: (int, optional, defaults to NAV_KAFRA_AND_AIRSHIP (101))
2664+ The kinds of services that may be used when calculating the route.
2665+
2666+ The following values may be summed up:
2667+ - NAV_AIRSHIP_ONLY (1): Include airships
2668+ - NAV_SCROLL_ONLY (10): Include scrolls
2669+ - NAV_KAFRA_ONLY (100): Include kafras
2670+
2671+ Summed values:
2672+ - NAV_AIRSHIP_AND_SCROLL (11)
2673+ - NAV_KAFRA_AND_AIRSHIP (101)
2674+ - NAV_KAFRA_AND_SCROLL (110)
2675+ - NAV_ALL (111)
2676+
2677+ Special values:
2678+ - NAV_WINDOW_SEARCH (-222)
2679+ This is a special value that can't be summed with others and when used,
2680+ "map" becomes a search string in the navigation UI. And client performs a search
2681+ with the special keyword "$$DB".
2682+ It is only known to work together with mode = NAV_MODE_MOB and using monster Sprite Name
2683+ as "map".
2684+ When using NAV_WINDOW_SEARCH, prefer using mesmobspawn instead.
2685+
2686+ - monster_id: (int, optional, defaults to 0)
2687+ To be used with mode = NAV_MODE_MOB. The ID of the monster being looked for.
2688+
2689+ ---------------------------------------
2690+
2691+ *mesmobspawn(<monster_id>{, "<label>"})
2692+
2693+ Generates and returns a <NAVI> tag that opens the Navigation UI listing the places where <monster_id> monster spawns.
2694+
2695+ This will only work if your client navigation files are properly configured with the <monster_id> spawns.
2696+
2697+ If the current client doesn't support this feature, returns the value of <label>.
2698+
2699+ Parameters:
2700+ - monster_id: (int, required)
2701+ The ID of the monster being looked for.
2702+
2703+ - label: (string, optional, defaults to <monster_id> name)
2704+ The visible and clickable text. (example: "Target monster")
2705+
2706+ ---------------------------------------
2707+
2708+ *mesurl("<label>", "url"{, <width>, <height>})
2709+
2710+ Generates and returns a <URL> tag. When presented in certain places (like with "mes" and "mesf"),
2711+ this will display a clickable text (<label>) which when clicked, opens <url> in the in-game browser
2712+ or default browser (depending on client version).
2713+
2714+ If the current client doesn't support this feature, returns a basic string in the following format:
2715+ <label> (<url>)
2716+
2717+ Parameters:
2718+ - label: (string, required)
2719+ The visible and clickable text. (example: "My site")
2720+
2721+ - url: (string, required)
2722+ The site that will open when <label> is clicked
2723+
2724+ - width: (int, optional, defaults to -1)
2725+ The width of the browser window (when using in-game browser).
2726+ When not provided (or -1), width/height is not specified.
2727+
2728+ - height: (int, optional, defaults to -1)
2729+ The height of the browser window (when using in-game browser).
2730+ When not provided (or -1), width/height is not specified.
2731+
2732+ ---------------------------------------
2733+
2734+ *mestipbox("<label>", <tip_id>)
2735+
2736+ Generates and returns a <TIPBOX> tag. When presented in certain places (like with "mes" and "mesf"),
2737+ this will display a clickable text (<label>) which when clicked, opens the TipBox UI with the given <tip_id>.
2738+
2739+ If the current client doesn't support this feature, returns a simple string with "<label>"
2740+
2741+ Parameters:
2742+ - label: (string, required)
2743+ The visible and clickable text. (example: "Super Tip")
2744+
2745+ - tip_id: (int, required)
2746+ The tip ID (as set in TipBox lua file)
2747+ If 0, it shows a random tipbox
2748+
26152749---------------------------------------
26162750//=====================================
261727511 - End of Basic-Related Commands
0 commit comments