summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-26 01:53:27 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-26 01:53:27 -0300
commitea25cb9d91b82c4d2d430a94f5ae1c166cc52a56 (patch)
tree4616abc25fe43abde7663cc0c0310c75d2bf6e6b
parent39e151b4e21bd73fb6d0d3be03994fc187ed583d (diff)
downloadserverdata-ea25cb9d91b82c4d2d430a94f5ae1c166cc52a56.tar.gz
serverdata-ea25cb9d91b82c4d2d430a94f5ae1c166cc52a56.tar.bz2
serverdata-ea25cb9d91b82c4d2d430a94f5ae1c166cc52a56.tar.xz
serverdata-ea25cb9d91b82c4d2d430a94f5ae1c166cc52a56.zip
Actually, and most importantly: Coffee Day. IT IS COFFEE.
-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