From f02f362a2154525af319499d7dcca10eb8c1ddf9 Mon Sep 17 00:00:00 2001 From: TurmoilToad Date: Fri, 19 Jan 2018 15:25:52 -0500 Subject: [PATCH] Created Perl EVENT_EXIT (markdown) --- Perl-EVENT_EXIT.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Perl-EVENT_EXIT.md diff --git a/Perl-EVENT_EXIT.md b/Perl-EVENT_EXIT.md new file mode 100644 index 0000000..5f399df --- /dev/null +++ b/Perl-EVENT_EXIT.md @@ -0,0 +1,28 @@ +EVENT_EXIT is triggered when a player leaves the proximity of the NPC. Proximity is defined by quest::set_proximity(min_x, max_x, min_y, max_y, min_z, max_z). + +See [quest::set_proximity](https://github.com/EQEmu/Server/wiki/Perl-Quest-set_proximity) for more information on setting a proximity. + +### Exports + +### Triggered + +* When a player moves out of the proximity of the NPC + +### Examples + +* This example establishes the NPC's proximity and speaks a message once the player has entered and then exits that proximity. + +```perl +sub EVENT_SPAWN { + #:: Set the proximity bounds around the NPC on spawn, 15 unit radius + my $x; + my $y; + $x = $npc->GetX(); + $y = $npc->GetY(); + quest::set_proximity($x-15,$x+15,$y-15,$y+15); +} + +sub EVENT_EXIT { + quest::say("Come back soon!"); +} +``` \ No newline at end of file