summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/001-4/lilica.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/npc/001-4/lilica.txt b/npc/001-4/lilica.txt
index e5d2fc0ef..ab0754127 100644
--- a/npc/001-4/lilica.txt
+++ b/npc/001-4/lilica.txt
@@ -63,7 +63,7 @@ L_QuestDone:
delitem GoldenEasteregg, 40;
delitem SilverEasteregg, 10;
//if (rand(0, 10000) < 1000) goto L_Unlucky;
- setq SQuest_Easter, gettime(7), 0;
+ setq SQuest_Easter, gettime(7), max(500, getq2(SQuest_Easter)+100);
npctalk3 l("Strange Coins stock on shops was restored!");
//EASTER_EVENT=gettime(7);
// The code below not allow hat to leave user account. A bad idea here so I left commented.
@@ -106,15 +106,16 @@ function script EasterCoinCheck {
debugmes("%dx %s", @bought_quantity[.@i], getitemname(@bought_nameid[.@i]));
if (@bought_nameid[.@i] == StrangeCoin) {
- .@q2=getq2(SQuest_Easter)+@bought_quantity[.@i];
- if (.@q2 > 100) {
+ .@q2=getq2(SQuest_Easter)-@bought_quantity[.@i];
+ if (.@q2 < 0) {
dispbottom l("Attempted to buy %d/%d %s, operation cancelled.",
- @bought_quantity[.@i], 100-getq2(SQuest_Easter),
+ @bought_quantity[.@i], getq2(SQuest_Easter),
getitemlink(StrangeCoin));
if (TUTORIAL)
dispbottom l("This quota is reset yearly, by completing %s's quest.", b("Lilica"));
end;
}
+ setq2 SQuest_Easter, .@q2;
}
}
return;