-
Contributor
Originally Posted by
Rbroz
Can Goblins be added to this by chance? Just when there are close like pools and bandit shrines...
try to activate the sound by adding the code in PluginEnablerOrDisablerPlugin.cs
Hud.GetPlugin<GoblinPlugin>().EnableSpeak = true;
-
Legendary
Originally Posted by
s4000
try to activate the sound by adding the code in PluginEnablerOrDisablerPlugin.cs
Hud.GetPlugin<GoblinPlugin>().EnableSpeak = true;
another alternative, which is what I use, but you must deactivate the original: https://www.ownedcore.com/forums/dia...ml#post3801465 (17.11.4 Speak can't work?)
-
Active Member
Im using plugin and activated ( TurnOffWhenNewGameStarts = true; )
But it does not resets pools found in another room.
I go to a game, found 4 pools (example) collect them, and go to a friend`s game, it does not reset opacity from pools already found in another game.
Is there a way to correct this ? I would appreciate.
-
Legendary
Each time a player changes the game (new game) they would have to delete the information about the pools, this is not always possible due to a bug that has always existed and was commented long ago, only KJ can solve it:
https://www.ownedcore.com/forums/dia...ml#post4008697 (19.1.20.4 (and newer) error report)
Basically if you're playing with someone and other friends invite you to another game without going through the menu, TH does not know it's a new game, does not even update the server ip. When this happens, the only option for some plugins to work as expected is to restart TH
(TurnOffWhenNewGameStarts only serves to indicate if the plugin must be deactivated automatically in each new game or leave it activated, it does not have to do with remembering pools of the previous game, these poools would always have to forget if that mentioned bug did not exist)
Last edited by RNN; 06-09-2019 at 03:57 PM.
-
Post Thanks / Like - 1 Thanks
JackCeparou (1 members gave Thanks to RNN for this useful post)
-
Active Member
Humm, I was wondering there was a bug like this, I appreciate your for explanation words. Maybe KJ fix this in some future update of TH.
-
Legendary
Some time ago I searched unsuccessfully for some reliable way to detect a new game:
In my opinion the ideal would be to find a value that stays fixed while you're playing with a group and that changes when you're invited to another group: something like Hud.Game.Me.Index. This does not really work because the index assigned to you has (without being rigorous) a 25% chance to match in a new game. The code to check it would be:
Code:
using Turbo.Plugins.Default;
namespace Turbo.Plugins.User
{
public class NewGame : BasePlugin, INewAreaHandler
{
public int MyIndex { get; set; } = -1;
public NewGame()
{
Enabled = true;
}
public void OnNewArea(bool newGame, ISnoArea area)
{
if (newGame || (MyIndex != Hud.Game.Me.Index) )
{
if (newGame) Hud.Sound.Speak("New Game, Index " + Hud.Game.Me.Index);
else Hud.Sound.Speak("Index Changed, from " + MyIndex + " to " + Hud.Game.Me.Index );
MyIndex = Hud.Game.Me.Index;
// Here we would place the code we want to execute in each new game
}
}
}
}
It also occurred to me to use Hud.Game.CurrentGameTick, which informs us of the time since a new game was made, regardless of which players are currently forming the group. It is still not a reliable method because ... when changing the area the game may take a while to load, sometimes the game freezes, and with some frequency, when you are invited to a group, it is because the players separate to find an "ip gold", or a goblin rainbow, or a specific bounty, and in these situations the Hud.Game.CurrentGameTick of different new game may be similar.
Last edited by RNN; 06-10-2019 at 09:24 AM.
-
Member
Opps... I posted in the wrong forum. Please delete the first post if possible. TY
-
Member
Can you also implement sound notification with .wav file when exp pool is found ?
Last edited by Sklip; 01-25-2020 at 05:31 AM.
-
Legendary
Originally Posted by
Sklip
Can you also implement sound notification with .wav file when exp pool is found ?
yes, later I will
Here it is:
PoolBanditList.cs
Code:
plugin.SoundEnabled = true;
plugin.FileSound = "notification_1.wav"; // File to be played. It must be in the Sounds\ folder
With the changes (lines 147 to 154), it will notify only pools and it is not necessary to have it visible (key end). If you want the plugin to behave differently let me know
Last edited by RNN; 01-25-2020 at 06:40 PM.
-
Post Thanks / Like - 1 Thanks
BeeAntOS (1 members gave Thanks to RNN for this useful post)
-
Member
Big thanks ! Sound notification with .wav works perfect !
-
Active Member
Originally Posted by
RNN
yes, later I will
Here it is:
PoolBanditList.cs
Code:
plugin.SoundEnabled = true;
plugin.FileSound = "notification_1.wav"; // File to be played. It must be in the Sounds\ folder
With the changes (lines 147 to 154), it will notify only pools and it is not necessary to have it visible (key end). If you want the plugin to behave differently let me know
How do I exactly put sound wav to play in this plugin ?
Downloaded default plugin and put your>
plugin.SoundEnabled = true;
plugin.FileSound = "notification_1.wav"; // File to be played. It must be in the Sounds\ folder
(error CS0103: The name 'plugin' does not exist in the current context)
I put the code you pasted in line 147 to 154 and got exception. Ty in advance
-
Legendary
If you replace the old plugin with the one published in post #14 , it should already reproduce the sound. If you want to change it you must write those 2 lines next to the custom code of post #1 (PluginEnablerOrDisablerP.lugin.cs)
Code:
Hud.RunOnPlugin<RNN.PoolsBanditsList>(plugin =>
{
..
..
plugin.SoundEnabled = true;
plugin.FileSound = "notification_1.wav"; // File to be played. It must be in the Sounds\ folder
} );
Last edited by RNN; 03-25-2020 at 05:33 AM.
-
Active Member
Originally Posted by
RNN
If you replace the old plugin with the one published in post
#1 4 , it should already reproduce the sound. If you want to change it you must write those 2 lines next to the custom code of post
#1 (PluginEnablerOrDisablerP.lugin.cs)
Code:
Hud.RunOnPlugin<RNN.PoolsBanditsList>(plugin =>
{
..
..
plugin.SoundEnabled = true;
plugin.FileSound = "notification_1.wav"; // File to be played. It must be in the Sounds\ folder
} );
Oh it worked in the original plugin, somehow I did something wrong, thank u =)
Btw, I tested customize in PluginEnablerDisabler and it said
(The name 'Key' does not exist in the current context)
-
Legendary
Originally Posted by
Saico
Oh it worked in the original plugin, somehow I did something wrong, thank u =)
Btw, I tested customize in PluginEnablerDisabler and it said
(The name 'Key' does not exist in the current context)
PluginEnablerOrDisablerPlugin.cs :
Code:
using SharpDX.DirectInput; // This line at the beginning of the file, if not exist, look in the first 4-5 lines
Last edited by RNN; 03-25-2020 at 08:28 AM.
-
Active Member
Originally Posted by
RNN
PluginEnablerOrDisablerPlugin.cs :
Code:
using SharpDX.DirectInput; // This line at the beginning of the file, if not exist, look in the first 4-5 lines
Oh completely forgot about this command, thank u =)