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

📄 dead.cs

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

    public class Dead
    {
        public static float lastalivex;
        public static float lastalivey;
        public static float mycorpsex;
        public static float mycorpsey;

        public static object boucle()
        {
            MyProject.Forms.CoolDown.BuffCooldown1.Enabled = false;
            MyProject.Forms.CoolDown.BuffCooldown2.Enabled = false;
            MyProject.Forms.CoolDown.BuffCooldown3.Enabled = false;
            MyProject.Forms.CoolDown.BuffCooldown4.Enabled = false;
            if (MyProject.Forms.Config.Notifications.Checked)
            {
                MyProject.Forms.Main.NotifyIcon1.ShowBalloonTip(0x3e8, "eBot - Notification", "I'm dead !", ToolTipIcon.Info);
            }
            func.oldWait(0x3e8);
            if (Bot.haveghost == 0)
            {
                func.logmsg("[BOT] Je n'est pas de ghosts waypoints !");
                Bot.botStop();
            }
            if (!MyProject.Forms.Config.Rez.Checked)
            {
                func.logmsg("[BOT] R\x00e9surection non activ\x00e9 dans les options !");
                Bot.botStop();
            }
            if (MyProject.Forms.Config.Notifications.Checked)
            {
                MyProject.Forms.Main.NotifyIcon1.ShowBalloonTip(0x3e8, "eBot - Notification", "Let's resurrect !", ToolTipIcon.Info);
            }
            int num3 = 0;
            int num = 0;
            mycorpsex = Conversions.ToSingle(MyProject.Forms.Main.Label15.Text);
            mycorpsey = Conversions.ToSingle(MyProject.Forms.Main.Label16.Text);
            func.logmsg("[BOT] D'oh ! Je suis mort, pas grave, gr\x00e2ce \x00e0 eBot je rez :)");
            MyProject.Forms.Main.died.Text = Conversions.ToString((double) (Conversions.ToDouble(MyProject.Forms.Main.died.Text) + 1.0));
            Clavier.SendTextToWoWChat("/script RepopMe()");
            func.oldWait(0x7d0);
            func.logmsg("[BOT] Go rez !");
            walktocorpse();
            Clavier.SendTextToWoWChat("/script RetrieveCorpse()");
            func.oldWait(0x7d0);
            if (Main.havetarget == 1)
            {
                func.logmsg("[BOT] Aggro !");
                Bot.combat();
            }
            MyProject.Forms.TimerForm.CheckWalkwaypointBlock.Enabled = false;
            int num2 = MyProject.Forms.Main.PlayerHealthBar.Value;
            while (MyProject.Forms.Main.PlayerHealthBar.Value < 90)
            {
                func.oldWait(10);
                if (num3 == 0)
                {
                    Universel.Buff();
                    Clavier.x();
                    num3 = 1;
                }
                if (((num == 0) & MyProject.Forms.Config.iDrinkFood.Checked) & (decimal.Compare(new decimal(MyProject.Forms.Main.PlayerHealthBar.Value), MyProject.Forms.Config.MinHealth.Value) < 0))
                {
                    Bot.manger();
                    num = 1;
                }
                if (Main.havetarget == 1)
                {
                    func.logmsg("[BOT] Aggro !");
                    num3 = 0;
                    num = 0;
                    Bot.combat();
                }
            }
            MyProject.Forms.TimerForm.CheckWalkwaypointBlock.Enabled = true;
            return 0;
        }

        public static object walkforcorpse(object x, object y)
        {
            string str = "running";
            Bot.face(Conversions.ToSingle(Bot.calculface(RuntimeHelpers.GetObjectValue(x), RuntimeHelpers.GetObjectValue(y))));
            str = "running";
            while (str == "running")
            {
                func.oldWait(1);
                Clavier.AvancerDown();
                if (Main.facingtimerval == 1)
                {
                    Clavier.AvancerUp();
                    Bot.face(Conversions.ToSingle(Bot.calculface(RuntimeHelpers.GetObjectValue(x), RuntimeHelpers.GetObjectValue(y))));
                    Main.facingtimerval = 0;
                }
                if (Conversions.ToBoolean(Operators.AndObject(Operators.AndObject(Operators.AndObject(Operators.CompareObjectGreater(MyProject.Forms.Main.Label15.Text, Operators.SubtractObject(x, 4), false), Operators.CompareObjectLess(MyProject.Forms.Main.Label15.Text, Operators.AddObject(x, 4), false)), Operators.CompareObjectGreater(MyProject.Forms.Main.Label16.Text, Operators.SubtractObject(y, 4), false)), Operators.CompareObjectLess(MyProject.Forms.Main.Label16.Text, Operators.AddObject(y, 4), false))))
                {
                    Clavier.AvancerUp();
                    str = "normal";
                    break;
                }
            }
            Clavier.AvancerUp();
            return 0;
        }

        public static object walktocorpse()
        {
            int index = 0;
            string str = "running";
            while (index < (MyProject.Forms.Config.gwaypoint.Lines.Length - 2))
            {
                Array instance = MyProject.Forms.Config.gwaypoint.Lines[index].Split(new char[] { ';' });
                string x = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null));
                string y = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null));
                Bot.face(Conversions.ToSingle(Bot.calculface(x, y)));
                func.logmsg("[BOT] Aller au waypoint : X = " + x + " Y = " + y);
                str = "running";
                while (str == "running")
                {
                    func.oldWait(1);
                    Clavier.AvancerDown();
                    if (Main.facingtimerval == 1)
                    {
                        Bot.face(Conversions.ToSingle(Bot.calculface(x, y)));
                        Main.facingtimerval = 0;
                    }
                    if ((((Conversions.ToDouble(MyProject.Forms.Main.Label15.Text) > (Conversions.ToDouble(x) - 8.0)) & (Conversions.ToDouble(MyProject.Forms.Main.Label15.Text) < (Conversions.ToDouble(x) + 8.0))) & (Conversions.ToDouble(MyProject.Forms.Main.Label16.Text) > (Conversions.ToDouble(y) - 8.0))) & (Conversions.ToDouble(MyProject.Forms.Main.Label16.Text) < (Conversions.ToDouble(y) + 8.0)))
                    {
                        str = "normal";
                        break;
                    }
                }
                index++;
            }
            Clavier.AvancerUp();
            walktolastwaypointalive();
            return 0;
        }

        public static object walktolastwaypointalive()
        {
            int index = 0;
            string str = "running";
            while (index < (MyProject.Forms.Config.waypoint.Lines.Length - 2))
            {
                Array instance = MyProject.Forms.Config.waypoint.Lines[index].Split(new char[] { ';' });
                string x = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null));
                string y = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null));
                Bot.face(Conversions.ToSingle(Bot.calculface(x, y)));
                func.logmsg("[BOT] Aller au waypoint : X = " + x + " Y = " + y);
                str = "running";
                while (str == "running")
                {
                    func.oldWait(1);
                    Clavier.AvancerDown();
                    if (Main.facingtimerval == 1)
                    {
                        Bot.face(Conversions.ToSingle(Bot.calculface(x, y)));
                        Main.facingtimerval = 0;
                    }
                    if ((((Conversions.ToDouble(MyProject.Forms.Main.Label15.Text) > (Conversions.ToDouble(x) - 8.0)) & (Conversions.ToDouble(MyProject.Forms.Main.Label15.Text) < (Conversions.ToDouble(x) + 8.0))) & (Conversions.ToDouble(MyProject.Forms.Main.Label16.Text) > (Conversions.ToDouble(y) - 8.0))) & (Conversions.ToDouble(MyProject.Forms.Main.Label16.Text) < (Conversions.ToDouble(y) + 8.0)))
                    {
                        str = "normal";
                        break;
                    }
                }
                if (Conversions.ToDouble(x) == lastalivex)
                {
                    break;
                }
                index++;
            }
            Clavier.AvancerUp();
            walkforcorpse(mycorpsex, mycorpsey);
            return 0;
        }
    }
}

⌨️ 快捷键说明

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