From 622fe03b3e04a9bf5b197d4037ace0ed6536ac17 Mon Sep 17 00:00:00 2001 From: TurmoilToad Date: Tue, 16 Jan 2018 16:48:01 -0500 Subject: [PATCH] Updated Perl EVENT_WAYPOINT_ARRIVE (markdown) --- Perl-EVENT_WAYPOINT_ARRIVE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Perl-EVENT_WAYPOINT_ARRIVE.md b/Perl-EVENT_WAYPOINT_ARRIVE.md index 2f8afd4..8ea8961 100755 --- a/Perl-EVENT_WAYPOINT_ARRIVE.md +++ b/Perl-EVENT_WAYPOINT_ARRIVE.md @@ -10,4 +10,23 @@ sub EVENT_WAYPOINT_ARRIVE { } ``` +### Functionality Explained + +EVENT_WAYPOINT_ARRIVE is triggered when an NPC reaches a grid waypoint entry. + +### EVENT_WAYPOINT_ARRIVE in use + +```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 { + + # Use == for numeric comparison to match grid waypoint entry "11" + if ($wp == 11) { + quest::say("Wow, that was a long walk!"); + } +} +``` + Generated On 2018-01-15T22:07:30-08:00 \ No newline at end of file