summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/global_event_handler.txt
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-04-24 15:17:04 -0400
committermekolat <mekolat@users.noreply.github.com>2015-04-24 15:17:04 -0400
commit931217d3ba156cecb25fa647bc572630147e60fd (patch)
tree25f2e399205e3153b0df8b862d1c213aab029d15 /world/map/npc/functions/global_event_handler.txt
parente8a1900fc0651a3ee74ce4cbe181fce2851f6420 (diff)
downloadserverdata-931217d3ba156cecb25fa647bc572630147e60fd.tar.gz
serverdata-931217d3ba156cecb25fa647bc572630147e60fd.tar.bz2
serverdata-931217d3ba156cecb25fa647bc572630147e60fd.tar.xz
serverdata-931217d3ba156cecb25fa647bc572630147e60fd.zip
clean global handler
Diffstat (limited to 'world/map/npc/functions/global_event_handler.txt')
-rw-r--r--world/map/npc/functions/global_event_handler.txt38
1 files changed, 10 insertions, 28 deletions
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index 45efcaae..0b691e45 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -1,44 +1,26 @@
+// This is the global event dispatcher
+// Do not add code to this file. Please only add callfuncs
+//
+// Author: meko
+
017-9,0,0,0|script|#GlobalHandler|-1
{
end;
-OnPCLoginEvent: // this does not work yet but as soon as it is implemented it will start working
+OnPCLoginEvent:
callfunc "ClearVariables";
end;
OnPCKillEvent:
- set Death_Kill, Death_Kill + 1; // this counts the number of players you have killed
+ callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things
end;
OnPCKilledEvent:
- goto L_Fightclub_Killed; // this is used by the 1v1 arena
+ callfunc "fightclub_event_killed"; // this is used by the 1v1 arena
+ end;
OnPCDieEvent:
callfunc "fightclub_GoBack"; // this used by the battle master
- goto L_Fightclub_Die; // this is used by the 1v1 arena
-
-// custom handlers below
-
-L_Fightclub_Killed:
- set @duel_killer, 0;
- if(@Duel_Fighter != 1) goto L_End;
- if(getmap() != "009-7") goto L_End;
- set $@duel_loser, getcharid(3); // grab the rid of the victim
- set $@duel_winner, @killerrid; // grab the rid of the killer
- set @killerrid, 0; // reset killerid
- callfunc "fightclub_death";
- goto L_End;
-
-L_Fightclub_Die:
- set @duel_killer, 0;
- if(@Duel_Fighter != 1) goto L_End;
- if(getmap() != "009-7") goto L_End;
- set @killerrid, 0; // since the player was not murdered, the killerrid is 0
- set $@duel_loser, getcharid(3); // grab the rid of the victim
- callfunc "fightclub_death";
- goto L_End;
-
-L_End:
- if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel;
+ callfunc "fightclub_event_die"; // this is used by the 1v1 arena
end;
}