public void CheckSpeedCommands(TwitchMessage message) { if (message.message.ToLower().Contains("!gm faster") && !Plugin.cooldowns.GetCooldown("Speed") && Plugin.commandsLeftForMessage > 0) { if (!Plugin.practicePluginInstalled) { Plugin.TryAsyncMessage("Speed altering commands currently require Practice Plugin to be installed"); return; } if (Plugin.trySuper && Plugin.charges >= ChatConfig.chargesForSuperCharge + ChatConfig.fasterChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(Plugin.songAudio.clip.length, ChatConfig.fasterMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Plugin.songAudio.clip.length, "Speed", "Fast Time!")); Plugin.trySuper = false; Plugin.charges -= ChatConfig.chargesForSuperCharge + ChatConfig.fasterChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } else if (Plugin.charges >= ChatConfig.fasterChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(ChatConfig.fasterDuration, ChatConfig.fasterMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(ChatConfig.fasterCooldown, "Speed", "Temporary faster song speed Active.")); Plugin.charges -= ChatConfig.fasterChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } } if (message.message.ToLower().Contains("!gm slower") && !Plugin.cooldowns.GetCooldown("Speed") && Plugin.commandsLeftForMessage > 0) { if (!Plugin.practicePluginInstalled) { Plugin.TryAsyncMessage("Speed altering commands currently require Practice Plugin to be installed"); return; } if (Plugin.trySuper && Plugin.charges >= ChatConfig.chargesForSuperCharge + ChatConfig.slowerChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(Plugin.songAudio.clip.length, ChatConfig.slowerMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Plugin.songAudio.clip.length, "Speed", "Weakling Slower Song Time!")); Plugin.trySuper = false; Plugin.charges -= ChatConfig.chargesForSuperCharge + ChatConfig.slowerChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } else if (Plugin.charges >= ChatConfig.slowerChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(ChatConfig.slowerDuration, ChatConfig.slowerMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(ChatConfig.slowerCooldown, "Speed", "Temporary slower song speed Active.")); Plugin.charges -= ChatConfig.slowerChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } } }
public void CheckSpeedCommands(TwitchMessage message) { if (message.Content.ToLower().Contains("!gm faster") && !Plugin.cooldowns.GetCooldown("Speed") && Plugin.commandsLeftForMessage > 0) { if (Plugin.trySuper && Plugin.charges >= Plugin.Config.chargesForSuperCharge + Plugin.Config.fasterChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(Plugin.songAudio.clip.length, Plugin.Config.fasterMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Plugin.songAudio.clip.length, "Speed", "Fast Time!")); Plugin.trySuper = false; Plugin.charges -= Plugin.Config.chargesForSuperCharge + Plugin.Config.fasterChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } else if (Plugin.charges >= Plugin.Config.fasterChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(Plugin.Config.fasterDuration, Plugin.Config.fasterMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Plugin.Config.fasterCooldown, "Speed", "Temporary faster song speed Active.")); Plugin.charges -= Plugin.Config.fasterChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } } if (message.Content.ToLower().Contains("!gm slower") && !Plugin.cooldowns.GetCooldown("Speed") && Plugin.commandsLeftForMessage > 0) { if (Plugin.trySuper && Plugin.charges >= Plugin.Config.chargesForSuperCharge + Plugin.Config.slowerChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(Plugin.songAudio.clip.length, Plugin.Config.slowerMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Plugin.songAudio.clip.length, "Speed", "Weakling Slower Song Time!")); Plugin.trySuper = false; Plugin.charges -= Plugin.Config.chargesForSuperCharge + Plugin.Config.slowerChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } else if (Plugin.charges >= Plugin.Config.slowerChargeCost) { // Plugin.beepSound.Play(); Plugin.twitchPowers.StartCoroutine(TwitchPowers.SpeedChange(Plugin.Config.slowerDuration, Plugin.Config.slowerMultiplier)); Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Plugin.Config.slowerCooldown, "Speed", "Temporary slower song speed Active.")); Plugin.charges -= Plugin.Config.slowerChargeCost; Plugin.commandsLeftForMessage -= 1; globalActive = true; } } }