summaryrefslogtreecommitdiff
path: root/npc/functions/event.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/event.txt')
-rw-r--r--npc/functions/event.txt25
1 files changed, 24 insertions, 1 deletions
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 864182675..7c7b7a8e2 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -218,7 +218,7 @@ function script ChocolateDay {
// Date check
if (gettime(6) != JULY)
return;
- if (gettime(5) != gettime(6))
+ if (gettime(5) != 7)
return;
// Max. 80% chances, 0.4% per monster level
@@ -237,6 +237,29 @@ function script ChocolateDay {
return;
}
+// CoffeeDay()
+function script CoffeeDay {
+ if (!playerattached())
+ return;
+
+ // Date check
+ if (gettime(6) != OCTOBER)
+ return;
+ if (gettime(5) != 1)
+ return;
+
+ // Max. 22% chances, 0.1% per monster level
+ .@lv=min(200, getmonsterinfo(killedrid, MOB_LV));
+ if (rand2(10000) < (.@lv*11)) {
+ getmapxy(.@m$, .@x, .@y);
+ .@x+=rand2(-1,1);
+ .@y+=rand2(-1,1);
+ makeitem(Coffee, 1, .@m$, .@x, .@y);
+ }
+ return;
+}
+
+