summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-03-01 16:17:46 -0300
committerjesusalva <cpntb1@ymail.com>2018-03-01 16:17:46 -0300
commit952d3a7d34cdc777cdba4973041fbde7d4428906 (patch)
treea73e1a3de00994fca621a50bf640194aa04c24f8 /npc
parentfb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2 (diff)
downloadserverdata-952d3a7d34cdc777cdba4973041fbde7d4428906.tar.gz
serverdata-952d3a7d34cdc777cdba4973041fbde7d4428906.tar.bz2
serverdata-952d3a7d34cdc777cdba4973041fbde7d4428906.tar.xz
serverdata-952d3a7d34cdc777cdba4973041fbde7d4428906.zip
Rework daily login to have streaks
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/motd.txt23
1 files changed, 22 insertions, 1 deletions
diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt
index 6052656cc..5913347ec 100644
--- a/npc/commands/motd.txt
+++ b/npc/commands/motd.txt
@@ -186,8 +186,29 @@ OnPCLoginEvent:
// Handle daily login bonus
if (#LOGIN_DAY != .login_ref) {
+ // Are we on a streak, or have we broke it? (or is it a new month)
+ if (#LOGIN_DAY == .login_ref-1)
+ #LOGIN_STREAK=#LOGIN_STREAK+1;
+ else
+ #LOGIN_STREAK=1;
+
+ // Update last day you've claimed a reward
#LOGIN_DAY = .login_ref;
- if (.login_ref % 3 == 0) {
+
+ // Handle rewards: Streaks first, daily later. Streak reward overrides daily reward.
+ if (#LOGIN_STREAK == 30) {
+ getitem PinkieHat, 1;
+ dispbottom l("##2 30 Days login bonus: ##B1x @@##b", getitemlink(PinkieHat)); // TODO placeholder
+ } else if (#LOGIN_STREAK == 21) {
+ getitem StrangeCoin, 3;
+ dispbottom l("##2 21 Days login bonus: ##B3x @@##b", getitemlink(StrangeCoin));
+ } else if (#LOGIN_STREAK == 14) {
+ getitem StrangeCoin, 2;
+ dispbottom l("##2 14 Days login bonus: ##B2x @@##b", getitemlink(StrangeCoin));
+ } else if (#LOGIN_STREAK == 7) {
+ getexp 0, 20;
+ dispbottom l("##2 7 Days login bonus: ##B20 Job Exp.##b");
+ } else if (.login_ref % 3 == 0) {
getitem StrangeCoin, 1;
dispbottom l("##2Daily login bonus: ##B1x @@##b", getitemlink(StrangeCoin));
} else if (.login_ref % 3 == 1) {