summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/global_event_handler.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/functions/global_event_handler.txt')
-rw-r--r--world/map/npc/functions/global_event_handler.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index 0b691e45..9ce44a38 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -3,12 +3,16 @@
//
// Author: meko
-017-9,0,0,0|script|#GlobalHandler|-1
+-|script|#GlobalHandler|-1
{
end;
OnPCLoginEvent:
- callfunc "ClearVariables";
+ set @login_event, 1;
+ callfunc "getHeadStyles"; // converts class, color and hair
+ callfunc "ClearVariables"; // removes / converts old variables
+ // add more here
+ set @login_event, 2;
end;
OnPCKillEvent:
@@ -23,4 +27,8 @@ OnPCDieEvent:
callfunc "fightclub_GoBack"; // this used by the battle master
callfunc "fightclub_event_die"; // this is used by the 1v1 arena
end;
+
+OnInit: //fixme: change to OnInterIfInit
+ callfunc "ClearGlobalVars";
+ end;
}