summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/event.txt25
-rw-r--r--npc/functions/mobpoint.txt1
2 files changed, 25 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;
+}
+
+
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 80d7fdb92..d35d44331 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -76,6 +76,7 @@ OnNPCKillEvent:
callfunc "Guardhouse_RandQuestCheck";
callfunc "AuroraMobkill";
callfunc "ChocolateDay";
+ callfunc "CoffeeDay";
// Unset killedrid. This affects multiple calls of this function
// But it is in overall more reliable imao