From 4340e882117bd0c713f520eb96053c5b36c87b76 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Fri, 15 Feb 2019 03:37:24 -0500 Subject: [PATCH] Nicer notify --- Classic/scripts/autoexec/ObserverCooldown.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Classic/scripts/autoexec/ObserverCooldown.cs b/Classic/scripts/autoexec/ObserverCooldown.cs index 5005dc0..4322a85 100644 --- a/Classic/scripts/autoexec/ObserverCooldown.cs +++ b/Classic/scripts/autoexec/ObserverCooldown.cs @@ -14,15 +14,18 @@ function serverCmdClientMakeObserver( %client ) Game.forceObserver( %client, "playerChoose" ); %client.MakeObserverTimeout = true; + %client.ObserverProtectStart = getSimTime(); schedule(10000, 0, "ResetMakeObserverTimeout", %client ); } //5 second cooldown on the notification else if( !%client.ObserverCooldownMsgPlayed ) { - messageClient(%client, 'MsgObserverCooldown', '\c2Observer is on cooldown.' ); + %wait = mFloor((10000 - (getSimTime() - %client.ObserverProtectStart)) / 1000); + messageClient(%client, 'MsgObserverCooldown', '\c3Observer Cooldown:\cr Please wait another %1 seconds.', %wait ); + //messageClient(%client, 'MsgObserverCooldown', '\c2Observer is on cooldown.' ); %client.ObserverCooldownMsgPlayed = true; - schedule(5000, 0, "ResetObserverCooldownMsgPlayed", %client ); + schedule(2000, 0, "ResetObserverCooldownMsgPlayed", %client ); } }