From 3a94aa53c20ce5eff254678ffe4454534000c65f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 9 Mar 2021 18:42:56 -0300 Subject: Change logic for Lilica. Now each completion allows you to buy +100 coins. No need to postpone completing her quest because this, now. Be careful, it is capped at 500 coins. --- npc/001-4/lilica.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'npc/001-4/lilica.txt') 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; -- cgit v1.2.3-60-g2f50