From a4aae29391e72212cfaeffaba8b0fae4c6f30915 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 2 Mar 2024 09:55:36 -0300 Subject: [PATCH] improve: online record to core (#2355) --- .../scripts/globalevents/others/online_record.lua | 7 ------- .../scripts/globalevents/online_record.lua | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 data-otservbr-global/scripts/globalevents/others/online_record.lua rename data-canary/scripts/globalevents/record.lua => data/scripts/globalevents/online_record.lua (52%) diff --git a/data-otservbr-global/scripts/globalevents/others/online_record.lua b/data-otservbr-global/scripts/globalevents/others/online_record.lua deleted file mode 100644 index 9d7bb82e284..00000000000 --- a/data-otservbr-global/scripts/globalevents/others/online_record.lua +++ /dev/null @@ -1,7 +0,0 @@ -local playerrecord = GlobalEvent("playerrecord") -function playerrecord.onRecord(current, old) - addEvent(Game.broadcastMessage, 150, "New record: " .. current .. " players online.", MESSAGE_EVENT_ADVANCE) - return true -end - -playerrecord:register() diff --git a/data-canary/scripts/globalevents/record.lua b/data/scripts/globalevents/online_record.lua similarity index 52% rename from data-canary/scripts/globalevents/record.lua rename to data/scripts/globalevents/online_record.lua index 981b2db003c..506fd328ac1 100644 --- a/data-canary/scripts/globalevents/record.lua +++ b/data/scripts/globalevents/online_record.lua @@ -1,8 +1,8 @@ -local globalevent = GlobalEvent("Player Record") +local onlineRecord = GlobalEvent("OnlineRecord") -function globalevent.onRecord(current, old) +function onlineRecord.onRecord(current, old) addEvent(Game.broadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_LOGIN) return true end -globalevent:register() +onlineRecord:register()