1. I'm trying to add this to gather manager instead of using it in my own plugin and OnTick seems to fail when I load the plugin.

    Screenshot

    The OnTick function
    Code:
    void OnTick()
            {
                if (RateMessagesEnabled)
                {
                    dayNightCycle();
                }
            }
    dayNightCycle function
    Code:
    private void dayNightCycle()
            {
              
                double currentTime = TOD_Sky.Instance.Cycle.Hour;
              
                if ( currentTime >= sunsetHour && FirstEveningCheck )
                {
                    FirstMorningCheck = true;
                    FirstEveningCheck = false;
                    FirstNightCheck = true;                PrintToChat(string.Format("[<color={ChatPrefixColor}>{ChatPrefix}</color>]: <size={MessageSize}>{NMessage}</size>"));
                  
                }
                else if ( currentTime >= sunriseHour && currentTime < sunsetHour && FirstMorningCheck )
                {
                    FirstMorningCheck = false;
                    FirstEveningCheck = true;
                    FirstNightCheck = true;                PrintToChat(string.Format("[<color={ChatPrefixColor}>{ChatPrefix}</color>]: <size={MessageSize}>{DMessage}</size>"));
                  
                }
                else if (  currentTime < sunriseHour && FirstNightCheck )
                {
                    FirstMorningCheck = true;
                    FirstEveningCheck = true;
                    FirstNightCheck = false;
                  
                }
          
            }
    Variables
    Code:
    sunriseHour = Convert.ToInt32(GetConfigValue("Settings", "sunriseHour", "5"));
                sunsetHour = Convert.ToInt32(GetConfigValue("Settings", "sunsetHour", "19"));
                RateMessagesEnabled = Convert.ToBoolean(GetConfigValue("Settings", "RateMessages", true));
    If someone could help me with this, i'd really appreciate it.
     
    Last edited by a moderator: Jun 9, 2016