From 4c9894a41939854a0d5e025704c4c2a785944212 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Thu, 1 Mar 2018 16:24:56 -0300 Subject: Make login streak non continous. Reward is given at login day 27. All further days give 2 strange coins. May change later. --- npc/commands/motd.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'npc/commands/motd.txt') diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt index 5913347ec..7bd84914f 100644 --- a/npc/commands/motd.txt +++ b/npc/commands/motd.txt @@ -186,17 +186,22 @@ 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) + // Is it a new month? + if (#LOGIN_TABLE == gettime(6)) { #LOGIN_STREAK=#LOGIN_STREAK+1; - else + } else { #LOGIN_STREAK=1; + #LOGIN_TABLE=gettime(6); + } // Update last day you've claimed a reward #LOGIN_DAY = .login_ref; // Handle rewards: Streaks first, daily later. Streak reward overrides daily reward. - if (#LOGIN_STREAK == 30) { + if (#LOGIN_STREAK > 27) { + getitem StrangeCoin, 2; + dispbottom l("##2 @@ Days login bonus: ##B2x @@##b", #LOGIN_STREAK, getitemlink(StrangeCoin)); + } else if (#LOGIN_STREAK == 27) { getitem PinkieHat, 1; dispbottom l("##2 30 Days login bonus: ##B1x @@##b", getitemlink(PinkieHat)); // TODO placeholder } else if (#LOGIN_STREAK == 21) { -- cgit v1.2.3-60-g2f50