Advertisement
Guest User

GRVoicePlugin

a guest
Jul 29th, 2018
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2.  
  3. namespace Turbo.Plugins.One
  4. {
  5.     public class GRVoice : BasePlugin, IInGameWorldPainter
  6.     {
  7.         private bool inGRift { get; set; }
  8.         public string GRSpeak { get; set; }
  9.         public float GRProgress { get; set; }
  10.         private bool statement { get; set; }
  11.         public GRVoice()
  12.         {
  13.             Enabled = true;
  14.             GRProgress = 95;
  15.             GRSpeak = "GR progression";
  16.         }
  17.  
  18.         public override void Load(IController hud)
  19.         {
  20.             base.Load(hud);
  21.             statement = true;
  22.         }
  23.  
  24.         public void PaintWorld(WorldLayer layer)
  25.         {
  26.             inGRift = Hud.Game.SpecialArea == SpecialArea.GreaterRift;
  27.             if (!inGRift) return;
  28.             if (statement && Hud.Game.RiftPercentage >= GRProgress && Hud.Sound.LastSpeak.TimerTest(5000))
  29.             {
  30.                 Hud.Sound.Speak(GRSpeak + GRProgress);
  31.                 statement = false;
  32.                 Hud.Sound.LastSpeak.Restart();
  33.             }
  34.             if (!statement && Hud.Game.RiftPercentage == 0) statement = true;
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement