From fb6ef2412ea4ee147b67bed4c9a167e84cecc2df Mon Sep 17 00:00:00 2001 From: TurmoilToad Date: Tue, 30 Jan 2018 23:58:17 -0500 Subject: [PATCH] Updated Perl EVENT_HATE_LIST (markdown) --- Perl-EVENT_HATE_LIST.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Perl-EVENT_HATE_LIST.md b/Perl-EVENT_HATE_LIST.md index 0d70b8c..b4a42a3 100755 --- a/Perl-EVENT_HATE_LIST.md +++ b/Perl-EVENT_HATE_LIST.md @@ -1,4 +1,5 @@ -EVENT_HATE_LIST +EVENT_HATE_LIST is triggered each time a new player is added to, or leaves an NPC's hate list. Note that this is not necessarily the same thing as being killed by the NPC (which might use [EVENT_SLAY](https://github.com/EQEmu/Server/wiki/Perl-EVENT_SLAY)); for instance, the player could camp out and be removed from the NPC's hate list. + ### Exports **Name**|**Type**|**Description** :-----|:-----|:----- @@ -10,4 +11,25 @@ sub EVENT_HATE_LIST { } ``` +### Triggered + +* When a player initially attacks an NPC or once a player leaves the NPC's hate list. + +### Example + +* This example uses the hate list to say a message + +```perl +sub EVENT_HATE_LIST { + #:: When the player appears the NPC's hate list + if ($hate_state == 1) { + quest::say("$name is gonna die!"); + } + #:: When the player on the NPC's hate list leaves that hate list + if ($hate_state == 0) { + quest::say("$name is no match for my might!"); + } +} +``` + Generated On 2018-01-15T22:07:30-08:00 \ No newline at end of file