summaryrefslogtreecommitdiff
path: root/npc/functions/clear_vars.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/clear_vars.txt')
-rw-r--r--npc/functions/clear_vars.txt31
1 files changed, 28 insertions, 3 deletions
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index e5e6e5d4..4cd8c9b8 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -1,7 +1,5 @@
-
+// Update variables on server init, login and logout
function script ClearVariables {
- if (@login_event != 1) goto L_Deprecated;
-
// Some temporary bugfix
GM = getgroupid();
@@ -138,10 +136,37 @@ function script ClearVariables {
//QUEST_MAGIC2 = 0;
OrumQuest = 0;
}
+
+ // Christmas 2021 Event
+ // FIXME: 12/12 = 346; 26/12 = 360; 09/01 = 9 (OBVIOUSLY)
+ if (gettime(8) >= 346 || gettime(8) <= 9) {
+ #OLD_EXP=BaseExp;
+ #OLD_LV=BaseLevel;
+ }
+ return;
+}
+
+
+function script FlushVariables {
+ // Some variables should not be saved
+ GM = 0;
+
+ // Christmas 2021 Event
+ if (gettime(8) >= 346 || gettime(8) <= 9) {
+ #NEW_LV+=(BaseLevel-#OLD_LV);
+ if (BaseLevel != #OLD_LV) {
+ #NEW_EXP+=BaseExp;
+ } else {
+ #NEW_EXP+=BaseExp-#OLD_EXP;
+ }
+ #OLD_EXP=0;
+ #OLD_LV=0;
+ }
return;
}
+
function script ServerUpdate {
if ($@STARTUP) {
debugmes "Cowardly refusing to update server outside startup";