Ejemplo n.º 1
0
        private static void Chat_OnMessageReceived(ChatMessageEventArgs e)
        {
            if (e.Message.Contains("AP"))
            {
                var m = e.Message;
                try
                {
                    var code = m.Substring(m.IndexOf("AP"), 17);

                    if (!Properties.Settings.Default.RedeemedCodes.Contains(code) && !CodeQueue.GetCodeQueue().Contains(code) && !code.Contains(" "))
                    {
                        CodeQueue.AddCodeToQueue(code);

                        foreach (var queuedCode in CodeQueue.GetCodeQueue())
                        {
                            var loop = GetRedeemLoop(queuedCode);
                            DolphinScript.Lib.Backend.Common.DoLoop(loop);

                            Properties.Settings.Default.RedeemedCodes.Add(code);

                            CodeQueue.RemoveCodeFromQueue(code);
                        }
                    }
                }
                catch { }
            }
        }
Ejemplo n.º 2
0
        private static void Chat_OnMessageReceived(ChatMessageEventArgs e)
        {
            if (e.Message.Contains("AP"))
            {
                var m = e.Message;
                try
                {
                    var code = m.Substring(m.IndexOf("AP"), 17);

                    if (!Properties.Settings.Default.RedeemedCodes.Contains(code) && !CodeQueue.GetCodeQueue().Contains(code) && !code.Contains(" "))
                    {
                        CodeQueue.AddCodeToQueue(code);
                    }
                    else
                    {
                        Write("Code Spotted: " + code + " (Already Redeemed).");
                    }
                }
                catch { }
            }
        }