summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/scoreboards.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
index 36a61f310..8cbcd888d 100644
--- a/npc/functions/scoreboards.txt
+++ b/npc/functions/scoreboards.txt
@@ -38,6 +38,24 @@ function script ScoreboardsReload {
return;
}
+function script Special2021 {
+ if (gettime(7) != 2021) return;
+ if (gettime(6) != JUNE) return;
+ if (gettime(5) != 21) return;
+ if (gettime(3) != 5) return;
+ debugmes "Special 2021 PROC";
+ /* *** EXPENSIVE QUERY *** */
+ .@nb = query_sql("SELECT MIN(`char_id`) FROM `char` WHERE `last_login` > 1619838000 GROUP BY `account_id` ORDER BY MAX(`last_login`) DESC", $@tmw2_giftday);
+ freeloop(true);
+ for (.@i=0; .@i < getarraysize($@tmw2_giftday); .@i++) {
+ rodex_sendmail($@tmw2_giftday, "TMW2 Team", "TMW2 Gift Day", "You are within the 120 most active players. Thanks for staying with us.", 0, StrangeCoin, (400-.@i));
+ }
+ freeloop(false);
+ debugmes "Sent %d rodex mails out of %d users.", .@i, getarraysize($@tmw2_giftday);
+ return;
+}
+
+
- script scoreboardsGen NPC_HIDDEN,{
end;
@@ -96,6 +114,7 @@ OnHour22:
OnHour23:
OnInit:
ScoreboardsReload();
+ Special2021();
deletearray $@FORT_BLACKLIST;
end;
}