From 952d3a7d34cdc777cdba4973041fbde7d4428906 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Thu, 1 Mar 2018 16:17:46 -0300 Subject: Rework daily login to have streaks --- npc/commands/motd.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'npc/commands/motd.txt') 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) { -- cgit v1.2.3-60-g2f50