diff options
Diffstat (limited to 'npc/functions/global_event_handler.txt')
-rwxr-xr-x[-rw-r--r--] | npc/functions/global_event_handler.txt | 83 |
1 files changed, 24 insertions, 59 deletions
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt index 3f10ae73..460694f3 100644..100755 --- a/npc/functions/global_event_handler.txt +++ b/npc/functions/global_event_handler.txt @@ -1,73 +1,38 @@ -// 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,{ +- script #GlobalHandler NPC32767,{ end; - OnPCLoginEvent: - callfunc("updateSpotlight"); - callfunc("ReceiveMOTD"); - callfunc("ReceiveScheduledBroadcast"); - callfunc("FixBankVault"); - callfunc("GrantSuperSkill"); - callfunc("AFKLogin"); - callfunc("TravelFix"); - end; - -OnPCLogoutEvent: - callfunc("UnequipCookie"); - callfunc("MundaneLogout"); - callfunc("fishing_cleanup", @fishing_spot$); - callfunc("ATLFightEnd"); - callfunc("RossyLogout"); - - // Variable cleanup - @fishing_spot$ = ""; - end; - -OnPCDieEvent: - callfunc("ForcedUnmount"); - callfunc("MundaneDeath"); - callfunc("ATLFightEnd"); - callfunc("RossyDeath"); + debugmes "PCLOGIN"; + @login_event = 1; + //callfunc "fixHeadStyles"; // convert headstyles + //callfunc "ClearVariables"; // removes / converts old variables + callfunc "DisplayMOTD"; // send the motd to the client, if enabled + //callfunc "getBroadcast"; // get the scheduled broadcast, if any + //addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse + // add more here + @login_event = 2; + debugmes "PCLOGIN OK"; end; -OnPCBaseLvUpEvent: - //callfunc("newquestwarning"); - callfunc("ReferralSendLvReward"); +OnPCKillEvent: + callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things end; -OnNPCKillEvent: - $MONSTERS_KILLED+=1; - MONSTERS_KILLED+=1; - callfunc("EnoraKills"); - callfunc("refineupdate"); - if ($MONSTERS_KILLED % 1000000 == 0) - callfunc("GetBeanieCopter"); +OnMobKillEvent: + callfunc "MobPoints"; end; -OnPCKillEvent: - $PLAYERS_KILLED+=1; - PLAYERS_KILLED+=1; +OnPCDieEvent: + callfunc "fightclub_GoBack"; // this used by the battle master + //callfunc "fightclub_event_die"; // this is used by the 1v1 arena + @necromancer = 0; + //addtimer 0, "Magic Timer::OnClear"; // reset magic block on death + set @killerrid, 0; // reset killer rid end; -OnSkillInvoke: - callfunc("SkillInvoked"); +OnInit: + callfunc "ClearGlobalVars"; + callfunc "MOTD"; // set the MOTD array end; - } - |