From 65606b918593cfdabb2377cb83a34f4386fdf72b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 10 Jan 2020 13:19:06 +0000 Subject: Global Event Handler. Hurnscald NPCs are incompatible. I've run in epoll problems once on ML, so I'm making this again. --- npc/items/cookie.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'npc/items/cookie.txt') diff --git a/npc/items/cookie.txt b/npc/items/cookie.txt index 80ff591e..e451e844 100644 --- a/npc/items/cookie.txt +++ b/npc/items/cookie.txt @@ -5,13 +5,17 @@ // Description: // Prevents cookie from being used for too long +function script UnequipCookie { + if (getequipid(EQI_HEAD_MID) == DeliciousCookie) + unequip(EQI_HEAD_MID); + return; +} + - script #DeliciousCookie NPC_HIDDEN,{ end; -OnPCLogoutEvent: OnUnequip: - if (getequipid(EQI_HEAD_MID) == DeliciousCookie) - unequip(EQI_HEAD_MID); + UnequipCookie(); end; } -- cgit v1.2.3-70-g09d2