⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wowchat.cs

📁 EBot source for the popular MMORPG World of Warcraft
💻 CS
字号:
namespace WoWBot
{
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;
    using WoWBot.My;

    [DesignerGenerated]
    public class WoWChat : Form
    {
        private IContainer b;
        [AccessedThroughProperty("Button1")]
        private Button b;
        [AccessedThroughProperty("Button2")]
        private Button b;
        [AccessedThroughProperty("TextBox1")]
        private TextBox b;
        [AccessedThroughProperty("Chat")]
        private TextBox b;
        public static int FirstLoop = 0;
        public static int NeedSend;
        public static string TextToSend;

        [DebuggerNonUserCode]
        public WoWChat()
        {
            base.Load += new EventHandler(this.a);
            this.a();
        }

        [DebuggerStepThrough]
        private void a()
        {
            this.Chat = new TextBox();
            this.Button1 = new Button();
            this.TextBox1 = new TextBox();
            this.Button2 = new Button();
            this.SuspendLayout();
            Point point = new Point(13, 13);
            this.Chat.Location = point;
            this.Chat.Multiline = true;
            this.Chat.Name = "Chat";
            this.Chat.ReadOnly = true;
            Size size = new Size(0x1d0, 0x185);
            this.Chat.Size = size;
            this.Chat.TabIndex = 0;
            point = new Point(0x141, 0x198);
            this.Button1.Location = point;
            this.Button1.Name = "Button1";
            size = new Size(0x4b, 0x17);
            this.Button1.Size = size;
            this.Button1.TabIndex = 1;
            this.Button1.Text = "Send";
            this.Button1.UseVisualStyleBackColor = true;
            point = new Point(12, 410);
            this.TextBox1.Location = point;
            this.TextBox1.Name = "TextBox1";
            size = new Size(0x12f, 20);
            this.TextBox1.Size = size;
            this.TextBox1.TabIndex = 2;
            point = new Point(0x192, 0x198);
            this.Button2.Location = point;
            this.Button2.Name = "Button2";
            size = new Size(0x4b, 0x17);
            this.Button2.Size = size;
            this.Button2.TabIndex = 3;
            this.Button2.Text = "Hide";
            this.Button2.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x1f1, 0x1ba);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.Button2);
            this.Controls.Add(this.TextBox1);
            this.Controls.Add(this.Button1);
            this.Controls.Add(this.Chat);
            size = new Size(0x201, 480);
            this.MaximumSize = size;
            size = new Size(0x201, 480);
            this.MinimumSize = size;
            this.Name = "WoWChat";
            this.Text = "WoW Chat";
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        private void a(object b, EventArgs b)
        {
        }

        private void b(object b, EventArgs b)
        {
            this.Visible = false;
        }

        private void c(object b, EventArgs b)
        {
            Clavier.SendTextToWoWChat(this.TextBox1.Text);
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing && (this.b != null))
                {
                    this.b.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        public static object ReadChat()
        {
            if ((Conversions.ToDouble(MyProject.Forms.Main.Label15.Text) != 0.0) & (Conversions.ToDouble(MyProject.Forms.Main.Label16.Text) != 0.0))
            {
                int num = 0;
                TextBox box = new TextBox();
                while (num < 60)
                {
                    string str = Main.wow.ReadASCIIString((uint) (Offsets.ChatOffsets + (num * Offsets.ChatNextMsg)), 0x200);
                    if ((str.Length > 5) && (((str.Contains("Type: [7]") | str.Contains("Type: [9]")) | str.Contains("Type: [1]")) | str.Contains("Type: [4]")))
                    {
                        str = str.Replace(" Channel: [],", "").Replace("]", "").Replace("[", "").Replace("Type: 1,", "General :").Replace("Type: 7,", "Whisper From :").Replace("Type: 9,", "Whisper To :").Replace("Type: 4,", "Guild :");
                        if (!MyProject.Forms.WoWChat.Chat.Text.Contains(str))
                        {
                            MyProject.Forms.WoWChat.Chat.AppendText(str + "\r\n");
                            if (str.Contains("Whisper From :") & (FirstLoop == 1))
                            {
                                func.logmsg("[BOT] Whisper !");
                                func.PlayWav(Application.StartupPath + @"\Sounds\Whisper.wav");
                            }
                        }
                    }
                    num++;
                }
                FirstLoop = 1;
            }
            return 0;
        }

        internal virtual Button Button1
        {
            [DebuggerNonUserCode]
            get
            {
                return this.b;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.c);
                if (this.b != null)
                {
                    this.b.Click -= handler;
                }
                this.b = value;
                if (this.b != null)
                {
                    this.b.Click += handler;
                }
            }
        }

        internal virtual Button Button2
        {
            [DebuggerNonUserCode]
            get
            {
                return this.b;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.b);
                if (this.b != null)
                {
                    this.b.Click -= handler;
                }
                this.b = value;
                if (this.b != null)
                {
                    this.b.Click += handler;
                }
            }
        }

        internal virtual TextBox Chat
        {
            [DebuggerNonUserCode]
            get
            {
                return this.b;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this.b = value;
            }
        }

        internal virtual TextBox TextBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this.b;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this.b = value;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -