blob: 9e0b495de796a8c81753314cfee56c57200854bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// This is the global event dispatcher
// Do not add code to this file. Please only add callfuncs
//
// Author: meko
-|script|#GlobalHandler|32767
{
end;
OnPCLoginEvent:
set @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
set @login_event, 2;
end;
OnPCKillEvent:
callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things
end;
OnMobKillEvent:
callfunc "MobPoints";
end;
OnPCDieEvent:
set @necromancer, 0;
addtimer 0, "Magic Timer::OnClear"; // reset magic block on death
callfunc "SpawnGhost";
set @killerrid, 0; // reset killer rid
end;
OnInit:
callfunc "ClearGlobalVars";
callfunc "MOTD"; // set the MOTD array
end;
}
|