Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.One
- {
- public class GRVoice : BasePlugin, IInGameWorldPainter
- {
- private bool inGRift { get; set; }
- private string GRSpeak { get; set; }
- private string GRSimulacrumSpeak { get; set; }
- private float GRProgress { get; set; }
- private bool statement { get; set; }
- private bool GRSimulacrum { get; set; }
- public GRVoice()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- GRSimulacrum = true;
- GRSimulacrumSpeak = "No Simulacrum";
- GRProgress = 95;
- GRSpeak = "GR progression";
- GRSpeak += GRProgress;
- statement = true;
- }
- public void PaintWorld(WorldLayer layer)
- {
- inGRift = Hud.Game.SpecialArea == SpecialArea.GreaterRift;
- if (!inGRift) return;
- if (statement && Hud.Game.RiftPercentage >= GRProgress && Hud.Sound.LastSpeak.TimerTest(5000))
- {
- Hud.Sound.Speak(GRSpeak);
- statement = false;
- Hud.Sound.LastSpeak.Restart();
- }
- if (!statement && Hud.Game.RiftPercentage == 0) statement = true;
- //Simulacrum
- if (!GRSimulacrum) return;
- var skill = Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_Simulacrum.Sno).FirstOrDefault();
- if (skill == null) return;
- if (Hud.Game.Me.Stats.ResourceMaxEssence < 350 && 1 > (Hud.Game.Me.Powers.UsedNecromancerPowers.Simulacrum.CooldownFinishTick - Hud.Game.CurrentGameTick) && Hud.Sound.LastSpeak.TimerTest(5000))
- {
- Hud.Sound.Speak(GRSimulacrumSpeak);
- statement = false;
- Hud.Sound.LastSpeak.Restart();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement