summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-06-16 15:04:33 -0300
committerJesusaves <cpntb1@ymail.com>2021-06-16 15:04:33 -0300
commitef81f7a84e17a2ae8b295c94bec1a2799bc5ff80 (patch)
tree702585febb467ff970ff2e841de9784b32abdba1 /npc
parent55e47976347b961895684067c67b47d1139f4b24 (diff)
downloadserverdata-ef81f7a84e17a2ae8b295c94bec1a2799bc5ff80.tar.gz
serverdata-ef81f7a84e17a2ae8b295c94bec1a2799bc5ff80.tar.bz2
serverdata-ef81f7a84e17a2ae8b295c94bec1a2799bc5ff80.tar.xz
serverdata-ef81f7a84e17a2ae8b295c94bec1a2799bc5ff80.zip
Add patch
Diffstat (limited to 'npc')
-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;
}