summaryrefslogtreecommitdiff
path: root/npc/functions/weather.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-02-17 22:20:26 -0300
committerJesusaves <cpntb1@ymail.com>2024-02-17 22:20:26 -0300
commit0a6cba4c68521edc6e33cacd6999ab461f8ad6aa (patch)
treed6ba4e6a0c1a48afe52c3c54c8cf8f34dbbcd792 /npc/functions/weather.txt
parent93c68457281c56aa719f6f55885040f75d1f03f3 (diff)
downloadserverdata-0a6cba4c68521edc6e33cacd6999ab461f8ad6aa.tar.gz
serverdata-0a6cba4c68521edc6e33cacd6999ab461f8ad6aa.tar.bz2
serverdata-0a6cba4c68521edc6e33cacd6999ab461f8ad6aa.tar.xz
serverdata-0a6cba4c68521edc6e33cacd6999ab461f8ad6aa.zip
I wasn't lying, ThinkSome - add the necessary functions so I can keep my word.
[01:05] ThinkStorage: Jesusalva when will we be able to take Frostia office...? [01:07] Jesusalva: When we consistently have 20+ players online, I believe Start tracking the average player activity within the weather system.
Diffstat (limited to 'npc/functions/weather.txt')
-rw-r--r--npc/functions/weather.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index 5816284de..bf530b114 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -49,6 +49,7 @@ OnInit:
// This is weather startup
.@init=true;
$@WEATHER_NIGHT=is_night(true);
+ array_pad($@PLAYER_ACTIVITY, 96, 0);
.tpc=0;
.tcl=0;
// Bind commands
@@ -117,6 +118,9 @@ OnMinute00:
OnMinute15:
OnMinute30:
OnMinute45:
+ // Update the online average activity
+ .@idx = (gettime(GETTIME_HOUR) * 4) + (gettime(GETTIME_MINUTE) / 15);
+ $@PLAYER_ACTIVITY[.@idx] = getusers(1);
// There is no weather in test servers
if (debug && !$@GM_OVERRIDE)
end;