summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/clear_vars.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/functions/clear_vars.txt')
-rw-r--r--world/map/npc/functions/clear_vars.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index 9afe5694..ca58a34e 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -39,6 +39,7 @@ function|script|ClearVariables
callsub S_Xmas2010;
callsub S_Xmas2011;
callsub S_Xmas2012;
+ callsub S_Valentine2021;
callsub S_Misc;
return; // go back to global handler
@@ -394,6 +395,29 @@ S_Bandit: // move Bandit subquest into Nibble 0 of QUEST_Hurnscald
set @bandit, 0;
return;
+S_Valentine2021:
+ if(!#VALENTINE2021) goto S_Return;
+ getinventorylist;
+ if (@inventorylist_count > 95) goto S_Return;
+ setarray @oldstock$, "GrassFedTofu", "Honey", "VeganWater", "FairTradeSoil", "LactoseFreeAcorn", "RawAir", "FreeRangeMoss", "JadeEgg";
+ if (BL_ID == 2126454)
+ getitem "JadeEgg", 1;
+ else
+ getitem @oldstock$[rand(getarraysize(@oldstock$))], 1;
+ cleararray @oldstock$, "", getarraysize(@oldstock$);
+ if (BL_ID == 2126454 ||
+ BL_ID == 2209083 ||
+ BL_ID == 2277302 ||
+ BL_ID == 2243433 ||
+ BL_ID == 2272906)
+ getitem "LoveLetter", 1;
+ getitem "BlueWolfHelmet", 1;
+ getitem "ShockSweet", rand(4, 7);
+ getitem "DarkConcentrationPotion", rand(2, 5);
+ getexp 1+(#VALENTINE2021*BaseLevel)/2, 0;
+ set #VALENTINE2021, 0;
+ return;
+
L_Deprecated:
debugmes "Explicitely calling ClearVariables after login is deprecated.";
mapexit;