[v7.2] [INTERNATIONAL] [Dark] ShrineAlertPlugin (Shrine TTS) menu

User Tag List

Page 4 of 4 FirstFirst 1234
Results 46 to 52 of 52
  1. #46
    Guigui92i's Avatar Member
    Reputation
    1
    Join Date
    Jul 2019
    Posts
    19
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can't get it to work (atleast i don't hear anything from the plugin).

    [v7.2] [INTERNATIONAL] [Dark] ShrineAlertPlugin (Shrine TTS)
  2. #47
    RNN's Avatar Legendary
    Reputation
    876
    Join Date
    Sep 2018
    Posts
    1,151
    Thanks G/R
    108/838
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

  3. #48
    Guigui92i's Avatar Member
    Reputation
    1
    Join Date
    Jul 2019
    Posts
    19
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    Thanks it works like a charm with the post !

  4. #49
    JarJarD3's Avatar Contributor
    Reputation
    106
    Join Date
    Oct 2017
    Posts
    395
    Thanks G/R
    41/101
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Originally Posted by Guigui92i View Post
    Thanks it works like a charm with the post !
    Yeqah, it will work until you have one of my plugins (or somebody else) that handle sound settings differently.
    Code:
    Hud.Sound.VolumeMultiplier = myVolumeMultiplier;
    if (Hud.Sound.VolumeMode != VolumeMode.AutoMaster)
    {
        Hud.Sound.VolumeMode = VolumeMode.AutoMaster;
    }
    The problem is that there is that we have just one global setting and all plugins can change that how their authors decided to be best for them.

  5. #50
    BeeAntOS's Avatar Active Member
    Reputation
    30
    Join Date
    Oct 2017
    Posts
    119
    Thanks G/R
    254/28
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JarJarD3 View Post
    Yeqah, it will work until you have one of my plugins (or somebody else) that handle sound settings differently.

    Challenge!..

    Code:
        public override void Load(IController hud)
        {
            base.Load(hud);
    
            Order = 90000;    // I hope you don't make your order 90001?!
    
            Hud.Sound.VolumeMode = VolumeMode.Constant;
            Hud.Sound.ConstantVolume = 25;    // I'm using with headphones.
        }
    "When you reach the top, get ready to drop!"

  6. #51
    JarJarD3's Avatar Contributor
    Reputation
    106
    Join Date
    Oct 2017
    Posts
    395
    Thanks G/R
    41/101
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Hi @BeeAntOS, you have to do something like here.
    Code:
    using System.Linq;
    
    namespace Turbo.Plugins.User
    {
        public class SpeakEntry
        {
            public readonly string Text;
            public readonly bool BeSilentInTown;
            public readonly bool BeSilentWhenDead;
            public readonly bool SpeakOnlyWithEnemies;
            public readonly double VolumeMultiplier;
            public readonly int Priority;
            public bool CanSpeak => !string.IsNullOrEmpty(Text);
            public bool IsPriorityOverride(SpeakEntry other) => Priority < other.Priority;
    
            public SpeakEntry(string text, bool beSilentInTown = true, bool beSilentWhenDead = true, bool speakOnlyWithEnemies = true, double volumeMultiplier = 1.0, int priority = 100)
            {
                Text = text;
                BeSilentInTown = beSilentInTown;
                BeSilentWhenDead = beSilentWhenDead;
                SpeakOnlyWithEnemies = speakOnlyWithEnemies;
                VolumeMultiplier = volumeMultiplier;
                Priority = priority;
            }
        }
    
        public class SoundHelper
        {
            private readonly IController Hud;
            private SpeakEntry lastSpeak = new SpeakEntry("");
    
            public SoundHelper(IController hud)
            {
                Hud = hud;
            }
    
            public void Speak(SpeakEntry entry)
            {
                if (string.IsNullOrEmpty(entry.Text))
                    return;
                if (entry.BeSilentInTown && Hud.Game.IsInTown)
                    return;
                if (entry.BeSilentWhenDead && Hud.Game.Me.IsDead)
                    return;
                if (entry.SpeakOnlyWithEnemies && !Hud.Game.AliveMonsters.Any())
                    return;
                // Save volume.
                var restoreVolume = false;
                var VolumeMultiplier = Hud.Sound.VolumeMultiplier;
                var VolumeMode = Hud.Sound.VolumeMode;
                if (entry.VolumeMultiplier > 0 && (VolumeMultiplier != entry.VolumeMultiplier || VolumeMode != VolumeMode.AutoMaster))
                {
                    restoreVolume = true;
                    Hud.Sound.VolumeMultiplier = entry.VolumeMultiplier;
                    if (Hud.Sound.VolumeMode != VolumeMode.AutoMaster)
                    {
                        Hud.Sound.VolumeMode = VolumeMode.AutoMaster;
                    }
                }
                lastSpeak = entry;
                if (entry.IsPriorityOverride(lastSpeak))
                {
                    // If priority is less, override pervious speak if it is still playing.
                    Hud.Sound.StopSpeak();
                }
                Hud.Sound.Speak(entry.Text);
                // Restore volume.
                if (restoreVolume)
                {
                    Hud.Sound.VolumeMultiplier = VolumeMultiplier;
                    Hud.Sound.VolumeMode = VolumeMode;
                }
            }
        }
    }

  7. #52
    BeeAntOS's Avatar Active Member
    Reputation
    30
    Join Date
    Oct 2017
    Posts
    119
    Thanks G/R
    254/28
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JarJarD3 View Post
    Hi @BeeAntOS, you have to do something like here.
    Hi...

    You win, I give up!
    "When you reach the top, get ready to drop!"

Page 4 of 4 FirstFirst 1234

Similar Threads

  1. [Buying] Exalted Orbs on Dark Shrine Standard(SC)
    By WGX in forum PoE Buy Sell Trade
    Replies: 0
    Last Post: 11-06-2015, 04:39 AM
  2. President Bush, CAUGHT SWEARING at international meeting
    By mantalcore in forum Community Chat
    Replies: 15
    Last Post: 08-14-2006, 09:41 AM
  3. dark portal/campfire
    By king11 in forum World of Warcraft General
    Replies: 2
    Last Post: 06-22-2006, 03:06 PM
  4. Dark Portal Idea/Question
    By vaelor in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 06-18-2006, 10:07 AM
  5. Dark Portal fun
    By Lazyman234 in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 06-18-2006, 01:56 AM
All times are GMT -5. The time now is 03:33 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search