diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-01-10 13:19:06 +0000 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-01-10 13:19:06 +0000 |
commit | 65606b918593cfdabb2377cb83a34f4386fdf72b (patch) | |
tree | d74303c7ea5416b4d129a75237f013f3d56225f0 /npc/functions/global_event_handler.txt | |
parent | 79130d8c5f3bd81abf089246b0391ad59717a9e3 (diff) | |
download | serverdata-65606b918593cfdabb2377cb83a34f4386fdf72b.tar.gz serverdata-65606b918593cfdabb2377cb83a34f4386fdf72b.tar.bz2 serverdata-65606b918593cfdabb2377cb83a34f4386fdf72b.tar.xz serverdata-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/functions/global_event_handler.txt')
-rw-r--r-- | npc/functions/global_event_handler.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt new file mode 100644 index 00000000..70bf6bbb --- /dev/null +++ b/npc/functions/global_event_handler.txt @@ -0,0 +1,56 @@ +// The Mana World scripts. +// Author: +// The Mana World Team +// Description: +// Controls most, if not all, global events on this server. +// Please only use callfunc("") here; This script is loaded +// early on and direct function assignment will cause fails. +// TODO: Move "new quest" notification here. (Or deprecate) + +// Helper function for scripted Monster Kills. +function script fix_mobkill { + killedrid=getarg(0); + doevent "#GlobalHandler::OnNPCKillEvent"; + return; +} + +- script #GlobalHandler NPC_HIDDEN,{ + end; + + +OnPCLoginEvent: + callfunc("updateSpotlight"); + callfunc("ReceiveMOTD"); + callfunc("ReceiveScheduledBroadcast"); + callfunc("FixBankVault"); + callfunc("GrantSuperSkill"); + end; + +OnPCLogoutEvent: + callfunc("UnequipCookie"); + callfunc("MundaneLogout"); + callfunc("fishing_cleanup", @fishing_spot$); + + // Variable cleanup + @fishing_spot$ = ""; + end; + +OnPCDieEvent: + callfunc("ForcedUnmount"); + callfunc("MundaneDeath"); + end; + +OnPCBaseLvUpEvent: + //callfunc("newquestwarning"); + end; + +OnNPCKillEvent: + callfunc("EnoraKills"); + end; + +OnSkillInvoke: + callfunc("SkillInvoked"); + end; + +} + |