mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 10:38:20 +00:00
Updated Perl EVENT_WAYPOINT_ARRIVE (markdown)
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
EVENT_WAYPOINT_ARRIVE
|
EVENT_WAYPOINT_ARRIVE
|
||||||
### Exports
|
### Exports
|
||||||
**Name**|**Type**|**Description**
|
**Name**|**Type**|**Description**
|
||||||
@@ -10,19 +11,18 @@ sub EVENT_WAYPOINT_ARRIVE {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Functionality Explained
|
### Triggered
|
||||||
|
|
||||||
EVENT_WAYPOINT_ARRIVE is triggered when an NPC reaches a grid waypoint entry.
|
* When an NPC reaches a grid waypoint entry
|
||||||
|
|
||||||
### EVENT_WAYPOINT_ARRIVE in use
|
### EVENT_WAYPOINT_ARRIVE in use
|
||||||
|
|
||||||
|
* This example would cause your NPC to speak once it reaches a particular waypoint.
|
||||||
|
* Don't forget to count waypoint 0 (the spawn point)
|
||||||
|
|
||||||
```perl
|
```perl
|
||||||
# This example would cause your NPC to speak once it reaches a particular waypoint.
|
|
||||||
# Don't forget to count waypoint 0 (the spawn point)
|
|
||||||
|
|
||||||
sub EVENT_WAYPOINT_ARRIVE {
|
sub EVENT_WAYPOINT_ARRIVE {
|
||||||
|
#::: When NPC arrives at waypoint 11
|
||||||
# Use == for numeric comparison to match grid waypoint entry "11"
|
|
||||||
if ($wp == 11) {
|
if ($wp == 11) {
|
||||||
quest::say("Wow, that was a long walk!");
|
quest::say("Wow, that was a long walk!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user