summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/009-1/event.txt1
-rw-r--r--world/map/npc/functions/clear_vars.txt24
2 files changed, 25 insertions, 0 deletions
diff --git a/world/map/npc/009-1/event.txt b/world/map/npc/009-1/event.txt
index 1acc126d..bd03a0ca 100644
--- a/world/map/npc/009-1/event.txt
+++ b/world/map/npc/009-1/event.txt
@@ -1,5 +1,6 @@
// Kytty <3 Valentine Day 2021
// Valentine Day 2021-02-14 script authored by Jesusalva on the 12th
+// WARNING: Rewards handled by clear_vars.txt - change it before re-enabling event
009-1,30,34,0|script|Kytty|430
{
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;