Added a sample NPC for the new navigateto script command

Additionally fixed up the documentation some more.
This commit is contained in:
Lemongrass3110 2016-03-06 23:24:33 +01:00
parent 809f220b9f
commit 8636cb2489
2 changed files with 75 additions and 10 deletions

59
doc/sample/navigate.txt Normal file
View File

@ -0,0 +1,59 @@
//===== rAthena Script =======================================
//= Sample: Navigation
//===== By: ==================================================
//= rAthena Dev Team
//===== Last Updated: ========================================
//= 20160306
//===== Description: =========================================
//= Shows how to use the navigateto command.
//=
//= NOTE:
//= Please note that we do not have any influence on how
//= stupid the client calculates the route to your target.
//============================================================
prontera,162,188,4 script Navigation Test 112,{
cutin "kafra_06",2;
mes "[Navigation Test]";
mes "Welcome to Prontera's Navigation Test.";
mes "Where do you want to go?";
next;
switch( select( "Izlude", "Poring War Recruiter", "Izlude without Kafra", "Poring War Recruiter with Window", "Show me Porings" ) ){
case 1:
mes "[Navigation Test]";
mes "I will now start your navigation system.";
close2;
cutin "kafra_06",255;
navigateto "izlude";
end;
case 2:
mes "[Navigation Test]";
mes "I will now start your navigation system.";
close2;
cutin "kafra_06",255;
navigateto "prt_fild08", 157, 371;
end;
case 3:
mes "[Navigation Test]";
mes "I will now start your navigation system.";
close2;
cutin "kafra_06",255;
navigateto "izlude", 0, 0, NAV_NONE;
end;
case 4:
mes "[Navigation Test]";
mes "I will now start your navigation system.";
close2;
cutin "kafra_06",255;
navigateto "prt_fild08", 157, 371, NAV_NONE, 0;
end;
case 5:
mes "[Navigation Test]";
mes "I will now start your navigation system.";
close2;
cutin "kafra_06",255;
navigateto "prt_fild08", 0, 0, NAV_NONE, 1, 1002;
end;
}
}

View File

@ -9019,17 +9019,9 @@ 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.
2011-10-10aRagEXE or newer.
When flag is not specified, the default value is NAV_KAFRA_AND_AIRSHIP.
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.
The flag specifies how the client will calculate the specific route.
Valid flags are:
NAV_NONE - No services
@ -9041,6 +9033,20 @@ Valid flags are:
NAV_KAFRA_AND_SCROLL - Kafra and Scroll
NAV_ALL - All services
When flag is not specified, the default value is NAV_KAFRA_AND_AIRSHIP.
The hide_window specifies whether to display (0) or hide (1) the navigation window.
By default the window is hidden.
You can specify the monster_id in combination with a mapname to make the
navigation system tell you, that you have reached the desired mob.
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.
---------------------------------------
Whew.