From 4cd390c6b42c78e45d0ae325eabc37a50fe2c0bb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 11 Dec 2021 16:00:40 -0300 Subject: Reduce the scope of OLD/NEW/ORG EXP/LV from player to char --- npc/functions/clear_vars.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index d0ae3682..56a7e07e 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -145,12 +145,12 @@ function script ClearVariables { // Christmas 2021 Event if (isChristmas21()) { - if (!#ORG_LV || !#ORG_EXP) { - #ORG_EXP=BaseExp; - #ORG_LV=BaseLevel; + if (!ORG_LV || !ORG_EXP) { + ORG_EXP=BaseExp; + ORG_LV=BaseLevel; } - #OLD_EXP=BaseExp; - #OLD_LV=BaseLevel; + OLD_EXP=BaseExp; + OLD_LV=BaseLevel; } return; } @@ -163,15 +163,15 @@ function script FlushVariables { // Christmas 2021 Event if (isChristmas21()) { - #NEW_LV+=(BaseLevel-#OLD_LV); - if (BaseLevel != #OLD_LV) { - #NEW_EXP=BaseExp; + NEW_LV+=(BaseLevel-OLD_LV); + if (BaseLevel != OLD_LV) { + NEW_EXP=BaseExp; } else { - #NEW_EXP+=BaseExp-#OLD_EXP; + NEW_EXP+=BaseExp-OLD_EXP; } - #OLD_EXP=0; - #OLD_LV=0; - if (getvaultid()) ##01_TMWEXP=#NEW_EXP; // (Techinically wrong) + OLD_EXP=0; + OLD_LV=0; + if (getvaultid()) ##01_TMWEXP=NEW_EXP; // (Techinically wrong) } return; } -- cgit v1.2.3-60-g2f50