Good night friends…
I recently found Sanderling and I find it incredible, it has helped me a lot.
Unfortunately I am not aware of programming, so I come to ask the help of who knows to create a script that I believe to be simple.
The script will follow the following rules.
-
1ª Use dscan continuously and uninterrupted (spam)
-
2ª Check the local chat continuously and if there is any neutral / hostile I receive a sound alert.
-
3ª Verify the overview continuously and if it appears some neutral / hostile I receive a sound alert.
Currently I have the following code, which does the 2ª function. In that case, it would be difficult to implement the 1ª and 3ª functions.
Sanderling.Parse.IMemoryMeasurement Measurement => Sanderling?.MemoryMeasurementParsed?.Value;
var chatLocal =
Sanderling.MemoryMeasurementParsed?.Value?.WindowChatChannel
?.FirstOrDefault(windowChat => windowChat?.Caption?.RegexMatchSuccessIgnoreCase("local") ?? false);
bool hostileOrNeutralsInLocal => 1 != chatLocal?.ParticipantView?.Entry?.Count(IsNeutralOrEnemy);
bool IsNeutralOrEnemy(IChatParticipantEntry participantEntry) =>
!(participantEntry?.FlagIcon?.Any(flagIcon =>
new[] { "Pilot is in your (fleet|corporation)" }
.Any(goodStandingText =>
flagIcon?.HintText?.RegexMatchSuccessIgnoreCase(goodStandingText) ?? false)) ?? false);
while(true)
{
var chatLocal =
Sanderling.MemoryMeasurementParsed?.Value?.WindowChatChannel
?.FirstOrDefault(windowChat => windowChat?.Caption?.RegexMatchSuccessIgnoreCase("local") ?? false);
if(chatLocal?.ParticipantView?.Entry?.Count(IsNeutralOrEnemy) > 1)
{
Host.Log(hostileOrNeutralsInLocal);
Host.Log(chatLocal?.ParticipantView?.Entry?.Count(IsNeutralOrEnemy));
System.Media.SoundPlayer simpleSound = new System.Media.SoundPlayer(@"C:\Teste\alarme.wav");
simpleSound.Play();
}
Host.Delay(4000);
Sanderling.InvalidateMeasurement();
}
Can anybody help me?