summaryrefslogtreecommitdiff
path: root/npc/items/cookie.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-01-10 13:19:06 +0000
committerJesusaves <cpntb1@ymail.com>2020-01-10 13:19:06 +0000
commit65606b918593cfdabb2377cb83a34f4386fdf72b (patch)
treed74303c7ea5416b4d129a75237f013f3d56225f0 /npc/items/cookie.txt
parent79130d8c5f3bd81abf089246b0391ad59717a9e3 (diff)
downloadclientdata-65606b918593cfdabb2377cb83a34f4386fdf72b.tar.gz
clientdata-65606b918593cfdabb2377cb83a34f4386fdf72b.tar.bz2
clientdata-65606b918593cfdabb2377cb83a34f4386fdf72b.tar.xz
clientdata-65606b918593cfdabb2377cb83a34f4386fdf72b.zip
Global Event Handler.
Hurnscald NPCs are incompatible. I've run in epoll problems once on ML, so I'm making this again.
Diffstat (limited to 'npc/items/cookie.txt')
-rw-r--r--npc/items/cookie.txt10
1 files changed, 7 insertions, 3 deletions
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;
}