From 1f632207c8947eff33e02c6970789ef05b849008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Sat, 13 Apr 2024 16:23:29 +0200 Subject: [PATCH] (temporarily?) add a quack on battlepass to be claimed --- FreshShit/AfkTimer/event2.lua | 7 +++++++ FreshShit/AfkTimer/event2duration.lua | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/FreshShit/AfkTimer/event2.lua b/FreshShit/AfkTimer/event2.lua index 0212d40..db2cd7a 100644 --- a/FreshShit/AfkTimer/event2.lua +++ b/FreshShit/AfkTimer/event2.lua @@ -5,5 +5,12 @@ function(e) WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg") -- SendChatMessage("QUACK", "WHISPER", nil, UnitName("player")) end + + local rewardClaimed = WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].claimed + local onlineTime = WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes + if rewardClaimed == 0 and onlineTime >= 120 then + WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg") + end + return aura_env.KickTime > 0 end \ No newline at end of file diff --git a/FreshShit/AfkTimer/event2duration.lua b/FreshShit/AfkTimer/event2duration.lua index 2838021..1b71db7 100644 --- a/FreshShit/AfkTimer/event2duration.lua +++ b/FreshShit/AfkTimer/event2duration.lua @@ -1,4 +1,3 @@ --- TICKER_500 function(e) return math.floor(time() - aura_env.AfkSince), math.floor(aura_env.KickTime - aura_env.AfkSince), 1 end \ No newline at end of file