示例#1
0
 public static bool Approach(Location location, int distance)
 {
     var timeout = new Ticker(6000);
     double num2 = location.DistanceToSelf;
     MoveHelper.StopMove();
     location.Face();
     FlyingEngine.Navigator.Start();
     FlyingEngine.Navigator.SetDestination(location);
     while (location.DistanceToSelf2D > distance)
     {
         if (timeout.IsReady)
         {
             FlyingEngine.Navigator.Stop();
             return false;
         }
         if (location.DistanceToSelf < num2)
         {
             num2 = location.DistanceToSelf;
             timeout.Reset();
         }
         if (location.DistanceToSelf < distance)
         {
             FlyingEngine.Navigator.Stop();
         }
         Thread.Sleep(10);
     }
     FlyingEngine.Navigator.Stop();
     Descent();
     return true;
 }
示例#2
0
 public void AddBadNode(Location badNode)
 {
     if (!_badNodes.Contains(badNode))
     {
         _badNodes.Add(badNode);
     }
 }
示例#3
0
 public override void Load(XmlNode xml)
 {
     foreach (XmlNode childNode in xml.ChildNodes)
     {
         if (childNode.Name.Equals("Name"))
             Name = childNode.InnerText;
         if (childNode.Name.Equals("Spot"))
         {
             string temp = childNode.InnerText;
             string correctString = temp;
             if (Convert.ToString(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator) != ".")
             {
                 correctString = temp.Replace(".", CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
             }
             string xyz = correctString;
             string[] split = xyz.Split(new[] {' '});
             if (split.Length > 2)
             {
                 Spot = new Location((float) Convert.ToDouble((split[0])), (float) Convert.ToDouble((split[1])),
                                     (float) Convert.ToDouble((split[2])));
             }
         }
         if (childNode.Name.Equals("Class"))
             Class = childNode.InnerText;
     }
 }
示例#4
0
        internal static void Pulse()
        {
            if (CorpsePosition.X == 0 && CorpsePosition.Y == 0 && CorpsePosition.Z == 0)
            {
                GrindingEngine.Navigator.Stop();
                MoveHelper.ReleaseKeys();
                CorpsePosition = ObjectManager.MyPlayer.Location;
                GrindingEngine.UpdateStats(0, 0, 1);
            }
            while (!ObjectManager.MyPlayer.IsGhost)
            {
                Thread.Sleep(1000);
                Frame staticPopup1Button1 = InterfaceHelper.GetFrameByName("StaticPopup1Button1");
                if (staticPopup1Button1 != null && staticPopup1Button1.IsVisible)
                {
                    staticPopup1Button1.LeftClick();
                    Thread.Sleep(2000);
                }
                Thread.Sleep(100);
            }
            if (GrindingEngine.Navigation.SpotToHit != CorpsePosition)
            {
                GrindingEngine.Navigation.SetNewSpot(CorpsePosition);
            }
            GrindingEngine.Navigation.Pulse();
            if (GrindingEngine.Navigation.IsLastWaypoints || CorpsePosition.DistanceToSelf2D < 20)
            {
                Logging.Write("Move to our corpse");
                GrindingEngine.Navigator.Stop();
                MoveHelper.ReleaseKeys();

                MoveHelper.MoveToLoc(CorpsePosition, 3);

                Logging.Write("Lets ress");

                Frame staticPopup1Button1 = InterfaceHelper.GetFrameByName("StaticPopup1Button1");
                var clickTimeout = new Ticker(5*1000);
                bool firstClick = false;
                while (ObjectManager.MyPlayer.IsGhost)
                {
                    if (!firstClick || clickTimeout.IsReady)
                    {
                        if (staticPopup1Button1 != null && staticPopup1Button1.IsVisible)
                        {
                            staticPopup1Button1.LeftClick();
                            firstClick = true;
                            clickTimeout.Reset();
                        }
                    }
                    Thread.Sleep(1000);
                }
                Logging.Write("Ress worked");
                Reset();
                GrindingEngine.Navigator.Stop();
                GrindingEngine.Navigation = new GrindingNavigation(GrindingEngine.CurrentProfile);
                return;
            }
            Thread.Sleep(10);
        }
示例#5
0
 public VendorsEx(VendorType vendorType, string name, Location location, TrainClass trainClass, int entryId)
 {
     VendorType = vendorType;
     Name = name;
     Location = location;
     TrainClass = trainClass;
     EntryId = entryId;
 }
示例#6
0
 public void ConnectNode(Location toAdd)
 {
     foreach (Location n in _graph.Vertices)
     {
         if (n != toAdd)
         {
             if (toAdd.DistanceFrom(n) <= _distance + 2)
             {
                 AddEdge(toAdd, n);
             }
         }
     }
 }
示例#7
0
 public void AddEdge(Location source, Location target)
 {
     if (_graph.ContainsVertex(source) && _graph.ContainsVertex(target))
     {
         var edge = new DirectedLazyEdge(source, target);
         _graph.AddEdge(edge);
         edge = new DirectedLazyEdge(target, source);
         _graph.AddEdge(edge);
     }
     else
     {
         Logging.Write("Vertex: " + source + " : " + target);
     }
 }
示例#8
0
        public static List<Location> GetBadNodeList()
        {
            var list = new List<Location>();
            if (File.Exists(FlyingEngine.OurDirectory + "\\badNodes.xml"))
            {
                try
                {
                    _doc.Load(FlyingEngine.OurDirectory + "\\badNodes.xml");
                }
                catch (Exception h)
                {
                    Logging.Write(
                        "Could not load badNodes.xml did you add something invalid? Try opening the file in your browser " +
                        h);
                }
            }
            else
            {
                return new List<Location>();
            }
            XmlNodeList badNode = _doc.GetElementsByTagName("bad_location");
            try
            {
                foreach (XmlNode node in badNode)
                {
                    try
                    {
                        string temp = node.ChildNodes[1].InnerText;
                        //Make sure it also works on systems that does not use .
                        string correctString = temp;
                        if (
                            Convert.ToString(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator) != ".")
                            correctString = temp.Replace(".", CultureInfo.CurrentCulture.NumberFormat.
                                                                  NumberDecimalSeparator);

                        var bad = new Location(correctString);
                        list.Add(bad);
                    }
                    catch
                    {
                    }
                }
            }
            catch
            {
            }
            return list;
        }
示例#9
0
 /// <summary>
 ///   Moves in 3D
 /// </summary>
 /// <param name = "targetCoord">The target coord.</param>
 /// <param name="zMaxAvoidiance"></param>
 public static void Move3D(Location targetCoord, int zMaxAvoidiance)
 {
     var targetGLoc = new Location(targetCoord.X, targetCoord.Y, targetCoord.Z);
     if (!targetCoord.IsFacing(0.3f))
     {
         targetGLoc.Face();
     }
     if (targetCoord.Z - ObjectManager.MyPlayer.Location.Z > zMaxAvoidiance) //go up
     {
         KeyHelper.ReleaseKey("X");
         KeyHelper.PressKey("Space");
     }
     else if (targetCoord.Z - ObjectManager.MyPlayer.Location.Z < -zMaxAvoidiance) //go down
     {
         KeyHelper.ReleaseKey("Space");
         KeyHelper.PressKey("X");
     }
     else
     {
         KeyHelper.ReleaseKey("Space");
         KeyHelper.ReleaseKey("X");
     }
 }
示例#10
0
文件: SpyWOW.cs 项目: civicacid/myevo
        public static void XSXDY_TSG(string DaHao)              //图书馆-血色
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(874.6886), (float)Convert.ToDouble(1399.048), (float)Convert.ToDouble(18.00647)));
            large.Add(1, new Location((float)Convert.ToDouble(974.805), (float)Convert.ToDouble(1379.996), (float)Convert.ToDouble(21.97392)));
            large.Add(2, new Location((float)Convert.ToDouble(1065.205), (float)Convert.ToDouble(1398.764), (float)Convert.ToDouble(30.76385)));

            small.Add(0, new Location((float)Convert.ToDouble(853.2313), (float)Convert.ToDouble(1322.512), (float)Convert.ToDouble(18.67164)));
            small.Add(1, new Location((float)Convert.ToDouble(870.9263), (float)Convert.ToDouble(1322.137), (float)Convert.ToDouble(18.00613)));
            small.Add(2, new Location((float)Convert.ToDouble(870.5344), (float)Convert.ToDouble(1338.765), (float)Convert.ToDouble(18.00613)));
            small.Add(3, new Location((float)Convert.ToDouble(870.0039), (float)Convert.ToDouble(1361.277), (float)Convert.ToDouble(18.00613)));
            small.Add(4, new Location((float)Convert.ToDouble(869.5035), (float)Convert.ToDouble(1382.509), (float)Convert.ToDouble(18.00613)));

            small.Add(5, new Location((float)Convert.ToDouble(869.079), (float)Convert.ToDouble(1400.522), (float)Convert.ToDouble(18.00613)));
            small.Add(6, new Location((float)Convert.ToDouble(881.2842), (float)Convert.ToDouble(1399.369), (float)Convert.ToDouble(18.67652)));
            small.Add(7, new Location((float)Convert.ToDouble(891.8546), (float)Convert.ToDouble(1399.188), (float)Convert.ToDouble(18.6765)));
            small.Add(8, new Location((float)Convert.ToDouble(909.7885), (float)Convert.ToDouble(1399.16), (float)Convert.ToDouble(18.02418)));
            small.Add(9, new Location((float)Convert.ToDouble(910.191), (float)Convert.ToDouble(1376.08), (float)Convert.ToDouble(17.99018)));
            small.Add(10, new Location((float)Convert.ToDouble(944.8943), (float)Convert.ToDouble(1377.826), (float)Convert.ToDouble(18.02216)));
            small.Add(11, new Location((float)Convert.ToDouble(972.0721), (float)Convert.ToDouble(1379.498), (float)Convert.ToDouble(20.64153)));

            small.Add(12, new Location((float)Convert.ToDouble(985.4244), (float)Convert.ToDouble(1379.664), (float)Convert.ToDouble(24.29541)));
            small.Add(13, new Location((float)Convert.ToDouble(986.4362), (float)Convert.ToDouble(1363.739), (float)Convert.ToDouble(27.2986)));
            small.Add(14, new Location((float)Convert.ToDouble(1012.446), (float)Convert.ToDouble(1364.28), (float)Convert.ToDouble(27.30698)));
            small.Add(15, new Location((float)Convert.ToDouble(1049.201), (float)Convert.ToDouble(1393.344), (float)Convert.ToDouble(27.30282)));


            mapp.Add(0, 0);
            mapp.Add(1, 0);
            mapp.Add(2, 0);
            mapp.Add(3, 0);
            mapp.Add(4, 0);
            mapp.Add(5, 1);
            mapp.Add(6, 1);
            mapp.Add(7, 1);
            mapp.Add(8, 1);
            mapp.Add(9, 1);
            mapp.Add(10, 1);
            mapp.Add(11, 1);
            mapp.Add(12, 2);
            mapp.Add(13, 2);
            mapp.Add(14, 2);
            mapp.Add(15, 2);

            Location inPoint = new Location((float)Convert.ToDouble(2926.667), (float)Convert.ToDouble(-813.0659), (float)Convert.ToDouble(160.327));
            Location outPoint = new Location((float)Convert.ToDouble(859.032), (float)Convert.ToDouble(1306.221), (float)Convert.ToDouble(18.67159));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#11
0
文件: SpyWOW.cs 项目: civicacid/myevo
        public static void STSM_For(string DaHao)              //STSM-前门
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(3552.746), (float)Convert.ToDouble(-3390.129), (float)Convert.ToDouble(133.6904)));
            large.Add(1, new Location((float)Convert.ToDouble(3634.392), (float)Convert.ToDouble(-3335.104), (float)Convert.ToDouble(123.8209)));
            large.Add(2, new Location((float)Convert.ToDouble(3694.374), (float)Convert.ToDouble(-3252.993), (float)Convert.ToDouble(126.9459)));
            large.Add(3, new Location((float)Convert.ToDouble(3647.75), (float)Convert.ToDouble(-3123.231), (float)Convert.ToDouble(134.7812)));
            large.Add(4, new Location((float)Convert.ToDouble(3577.48), (float)Convert.ToDouble(-3065.235), (float)Convert.ToDouble(135.6654)));

            small.Add(0, new Location((float)Convert.ToDouble(3394.787), (float)Convert.ToDouble(-3378.851), (float)Convert.ToDouble(142.7063)));
            small.Add(1, new Location((float)Convert.ToDouble(3458.428), (float)Convert.ToDouble(-3380.6), (float)Convert.ToDouble(139.2054)));
            small.Add(2, new Location((float)Convert.ToDouble(3548.421), (float)Convert.ToDouble(-3383.074), (float)Convert.ToDouble(132.8665)));
            small.Add(3, new Location((float)Convert.ToDouble(3549.881), (float)Convert.ToDouble(-3331.992), (float)Convert.ToDouble(129.3269)));
            small.Add(4, new Location((float)Convert.ToDouble(3582.671), (float)Convert.ToDouble(-3335.25), (float)Convert.ToDouble(127.8763)));
            small.Add(5, new Location((float)Convert.ToDouble(3625.19), (float)Convert.ToDouble(-3335.013), (float)Convert.ToDouble(122.9529)));
            small.Add(6, new Location((float)Convert.ToDouble(3656.602), (float)Convert.ToDouble(-3334.31), (float)Convert.ToDouble(123.6646)));
            small.Add(7, new Location((float)Convert.ToDouble(3687.047), (float)Convert.ToDouble(-3289.592), (float)Convert.ToDouble(128.2343)));
            small.Add(8, new Location((float)Convert.ToDouble(3695.337), (float)Convert.ToDouble(-3254.503), (float)Convert.ToDouble(127.0161)));
            small.Add(9, new Location((float)Convert.ToDouble(3680.442), (float)Convert.ToDouble(-3215.124), (float)Convert.ToDouble(127.1871)));
            small.Add(10, new Location((float)Convert.ToDouble(3673.885), (float)Convert.ToDouble(-3193.536), (float)Convert.ToDouble(126.2168)));
            small.Add(11, new Location((float)Convert.ToDouble(3670.725), (float)Convert.ToDouble(-3172.513), (float)Convert.ToDouble(126.4293)));
            small.Add(12, new Location((float)Convert.ToDouble(3639.522), (float)Convert.ToDouble(-3128.482), (float)Convert.ToDouble(134.7796)));
            small.Add(13, new Location((float)Convert.ToDouble(3652.425), (float)Convert.ToDouble(-3119.892), (float)Convert.ToDouble(134.7803)));
            small.Add(14, new Location((float)Convert.ToDouble(3642.929), (float)Convert.ToDouble(-3106.38), (float)Convert.ToDouble(134.1169)));
            small.Add(15, new Location((float)Convert.ToDouble(3654.825), (float)Convert.ToDouble(-3098.323), (float)Convert.ToDouble(134.1169)));
            small.Add(16, new Location((float)Convert.ToDouble(3641.787), (float)Convert.ToDouble(-3080.266), (float)Convert.ToDouble(134.121)));
            small.Add(17, new Location((float)Convert.ToDouble(3606.12), (float)Convert.ToDouble(-3105.424), (float)Convert.ToDouble(134.121)));
            small.Add(18, new Location((float)Convert.ToDouble(3580.596), (float)Convert.ToDouble(-3069.592), (float)Convert.ToDouble(135.6633)));

            mapp.Add(0, 0);
            mapp.Add(1, 0);
            mapp.Add(2, 0);
            mapp.Add(3, 1);
            mapp.Add(4, 1);
            mapp.Add(5, 1);
            mapp.Add(6, 2);
            mapp.Add(7, 2);
            mapp.Add(8, 2);
            mapp.Add(9, 3);
            mapp.Add(10, 3);
            mapp.Add(11, 3);
            mapp.Add(12, 3);
            mapp.Add(13, 3);
            mapp.Add(14, 4);
            mapp.Add(15, 4);
            mapp.Add(16, 4);
            mapp.Add(17, 4);
            mapp.Add(18, 4);

            Location inPoint = new Location((float)Convert.ToDouble(3392.912), (float)Convert.ToDouble(-3304.423), (float)Convert.ToDouble(142.2488));
            Location outPoint = new Location((float)Convert.ToDouble(3392.055), (float)Convert.ToDouble(-3496.787), (float)Convert.ToDouble(143.07));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#12
0
文件: SpyWOW.cs 项目: civicacid/myevo
 public static bool Init(string _leadername, Location _fbin, Location _fbout, Dictionary<int, Location> _lloc, Dictionary<int, Location> _path, Dictionary<int, int> _map)
 {
     LastLeaderStep = 0;
     FBStatus = DBStatus.In_EntryChecking;
     _Action = ActionStatus.Nothing;
     LeaderName = _leadername.ToUpper();
     if (!SetLeader()) return false;
     FBEntry = _fbin;
     FBExit = _fbout;
     LeaderInFB = _lloc;
     memInFB = _path;
     MapOverLeaderAndMem = _map;
     return true;
 }
示例#13
0
文件: SpyWOW.cs 项目: civicacid/myevo
        /******************************************
         * 根据法术名字获得动作条
         *  BarSpell gg = BarMapper.GetSpellByName("");
         *  gg.CastSpell();
         *  
         *  BarMapper.MapBars();
         *  KeyHelper.LoadKeys();
         * ****************************************/

        public static void XSXDY_MD(string DaHao)                   //墓地——血色
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(1703.884), (float)Convert.ToDouble(1097.721), (float)Convert.ToDouble(6.820244)));
            large.Add(1, new Location((float)Convert.ToDouble(1797.786), (float)Convert.ToDouble(1167.898), (float)Convert.ToDouble(6.820681)));
            large.Add(2, new Location((float)Convert.ToDouble(1797.543), (float)Convert.ToDouble(1390.579), (float)Convert.ToDouble(21.0289)));

            small.Add(0, new Location((float)Convert.ToDouble(1687.463), (float)Convert.ToDouble(1052.708), (float)Convert.ToDouble(18.6773)));
            small.Add(1, new Location((float)Convert.ToDouble(1702.782), (float)Convert.ToDouble(1053.758), (float)Convert.ToDouble(18.49206)));
            small.Add(2, new Location((float)Convert.ToDouble(1702.369), (float)Convert.ToDouble(1098.05), (float)Convert.ToDouble(6.820761)));

            small.Add(3, new Location((float)Convert.ToDouble(1710.781), (float)Convert.ToDouble(1097.89), (float)Convert.ToDouble(6.820291)));
            small.Add(4, new Location((float)Convert.ToDouble(1732.834), (float)Convert.ToDouble(1097.47), (float)Convert.ToDouble(6.820291)));
            small.Add(5, new Location((float)Convert.ToDouble(1755.895), (float)Convert.ToDouble(1097.032), (float)Convert.ToDouble(6.820291)));
            small.Add(6, new Location((float)Convert.ToDouble(1758.96), (float)Convert.ToDouble(1108.889), (float)Convert.ToDouble(7.490634)));
            small.Add(7, new Location((float)Convert.ToDouble(1759.459), (float)Convert.ToDouble(1140.953), (float)Convert.ToDouble(7.490634)));
            small.Add(8, new Location((float)Convert.ToDouble(1781.824), (float)Convert.ToDouble(1147.978), (float)Convert.ToDouble(7.490634)));
            small.Add(9, new Location((float)Convert.ToDouble(1783.685), (float)Convert.ToDouble(1167.668), (float)Convert.ToDouble(6.82066)));
            small.Add(10, new Location((float)Convert.ToDouble(1797.073), (float)Convert.ToDouble(1167.381), (float)Convert.ToDouble(6.82066)));

            small.Add(11, new Location((float)Convert.ToDouble(1797.499), (float)Convert.ToDouble(1173.833), (float)Convert.ToDouble(6.82066)));
            small.Add(12, new Location((float)Convert.ToDouble(1796.883), (float)Convert.ToDouble(1204.196), (float)Convert.ToDouble(18.49159)));
            small.Add(13, new Location((float)Convert.ToDouble(1797.17), (float)Convert.ToDouble(1223.217), (float)Convert.ToDouble(18.19079)));
            small.Add(14, new Location((float)Convert.ToDouble(1796.428), (float)Convert.ToDouble(1259.853), (float)Convert.ToDouble(18.39784)));
            small.Add(15, new Location((float)Convert.ToDouble(1795.763), (float)Convert.ToDouble(1292.662), (float)Convert.ToDouble(18.58248)));
            small.Add(16, new Location((float)Convert.ToDouble(1797.835), (float)Convert.ToDouble(1309.065), (float)Convert.ToDouble(18.67566)));
            small.Add(17, new Location((float)Convert.ToDouble(1788.97), (float)Convert.ToDouble(1322.456), (float)Convert.ToDouble(18.90245)));
            small.Add(18, new Location((float)Convert.ToDouble(1794.272), (float)Convert.ToDouble(1352.333), (float)Convert.ToDouble(18.88878)));
            small.Add(19, new Location((float)Convert.ToDouble(1797.968), (float)Convert.ToDouble(1390.656), (float)Convert.ToDouble(21.06569)));

            mapp.Add(0, 0);
            mapp.Add(1, 0);
            mapp.Add(2, 0);
            mapp.Add(3, 1);
            mapp.Add(4, 1);
            mapp.Add(5, 1);
            mapp.Add(6, 1);
            mapp.Add(7, 1);
            mapp.Add(8, 1);
            mapp.Add(9, 1);
            mapp.Add(10, 1);
            mapp.Add(11, 2);
            mapp.Add(12, 2);
            mapp.Add(13, 2);
            mapp.Add(14, 2);
            mapp.Add(15, 2);
            mapp.Add(16, 2);
            mapp.Add(17, 2);
            mapp.Add(18, 2);
            mapp.Add(19, 2);

            Location inPoint = new Location((float)Convert.ToDouble(2915.34), (float)Convert.ToDouble(-771.58), (float)Convert.ToDouble(160.333));
            Location outPoint = new Location((float)Convert.ToDouble(1687.27), (float)Convert.ToDouble(1020.09), (float)Convert.ToDouble(18.6773));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#14
0
 public Trainer(string name, Location spot, string @class)
 {
     Name = name;
     Spot = spot;
     Class = @class;
 }
示例#15
0
 public void AddNodeNoConnection(Location toAdd)
 {
     toAdd.NodeType = _nodeType;
     _graph.AddVertex(toAdd);
 }
示例#16
0
        private static void FindTheBobber(Location loc, ulong guid)
        {
            Point worldToScreen = Camera.World2Screen.WorldToScreen(loc, true);
            MoveMouse(worldToScreen.X, worldToScreen.Y);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X, worldToScreen.Y - 15);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X, worldToScreen.Y + 15);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            Thread.Sleep(50);
            MoveMouse(worldToScreen.X - 15, worldToScreen.Y);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X + 15, worldToScreen.Y);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X, worldToScreen.Y + 35);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X, worldToScreen.Y + 40);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X, worldToScreen.Y + 45);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X + 35, worldToScreen.Y);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X + 40, worldToScreen.Y);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;
            MoveMouse(worldToScreen.X + 45, worldToScreen.Y);
            Thread.Sleep(50);
            if (IsMouseOverBobber())
                return;

            int xOffset =  -60;
            int yOffset =  -60;
            MoveMouse(worldToScreen.X, worldToScreen.Y);
            while (!IsMouseOverBobber())
            {
                MoveMouse(worldToScreen.X + xOffset, worldToScreen.Y + yOffset);
                Thread.Sleep(10);
                if (IsMouseOverBobber())
                {
                    return;
                }
                xOffset = xOffset + 10;
                if (xOffset >= 60)
                {
                    yOffset = yOffset + 10;
                    xOffset = -60;
                    if (yOffset > 60)
                    {
                        break;
                    }
                }
            }
        }
示例#17
0
文件: SpyWOW.cs 项目: civicacid/myevo
        public static void WY_MDSPT(string DaHao)              //外域--魔导师平台
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(147.0217), (float)Convert.ToDouble(-0.7574186), (float)Convert.ToDouble(-2.621897)));

            small.Add(0, new Location((float)Convert.ToDouble(23.72066), (float)Convert.ToDouble(0.3930818), (float)Convert.ToDouble(-2.820039)));
            small.Add(1, new Location((float)Convert.ToDouble(24.34679), (float)Convert.ToDouble(18.49923), (float)Convert.ToDouble(-1.801288)));
            small.Add(2, new Location((float)Convert.ToDouble(32.9401), (float)Convert.ToDouble(17.48651), (float)Convert.ToDouble(-2.024594)));
            small.Add(3, new Location((float)Convert.ToDouble(33.59445), (float)Convert.ToDouble(0.4313231), (float)Convert.ToDouble(-2.81209)));
            small.Add(4, new Location((float)Convert.ToDouble(114.8011), (float)Convert.ToDouble(-0.579667), (float)Convert.ToDouble(-2.726018)));

            mapp.Add(0, 0);
            mapp.Add(1, 0);
            mapp.Add(2, 0);
            mapp.Add(3, 0);
            mapp.Add(4, 0);

            Location inPoint = new Location((float)Convert.ToDouble(12880.3), (float)Convert.ToDouble(-7346.42), (float)Convert.ToDouble(65.4882));
            Location outPoint = new Location((float)Convert.ToDouble(5), (float)Convert.ToDouble(-0.579667), (float)Convert.ToDouble(-2.820039));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#18
0
 /// <summary>
 ///   Determines whether [is it safe at] [the specified ignore].
 /// </summary>
 /// <param name = "ignore">The ignore.</param>
 /// <param name = "l">The l.</param>
 /// <returns>
 ///   <c>true</c> if [is it safe at] [the specified ignore]; otherwise, <c>false</c>.
 /// </returns>
 public static bool IsItSafeAt(ulong ignore, Location l)
 {
     List<PUnit> mobs = CheckForMobsAtLoc(l, 15.0f, false); // Setting for radius?
     return mobs.Where(mob => !mob.GUID.Equals(ignore)).All(mob => mob.IsDead || mob.TargetGUID == 0);
 }
示例#19
0
 /// <summary>
 ///   Checks for mobs at location.
 /// </summary>
 /// <param name = "l">The location.</param>
 /// <param name = "radius">The radius.</param>
 /// <param name = "includeFriendly">if set to <c>true</c> [include friendly units].</param>
 /// <returns></returns>
 public static List<PUnit> CheckForMobsAtLoc(Location l, float radius, bool includeFriendly)
 {
     var returns = new List<PUnit>();
     List<PUnit> mobs = GetUnits;
     if (l != null)
     {
         if (mobs.Count > 0)
         {
             if (includeFriendly)
                 returns.AddRange(from mob in mobs
                                  let mdt = mob.Location.GetDistanceTo(l)
                                  where
                                      mdt <= radius && !mob.IsDead && !mob.IsTagged && mob.Level > 1 &&
                                      !mob.IsTargetingMe
                                  select mob);
             else
                 returns.AddRange(from mob in mobs
                                  let mdt = mob.Location.GetDistanceTo(l)
                                  where
                                      mdt <= radius && !mob.IsDead && !mob.IsTagged && mob.Level > 1 &&
                                      !mob.IsTargetingMe && mob.Reaction.Equals(Reaction.Hostile)
                                  select mob);
         }
     }
     return returns;
 }
示例#20
0
 public Location GetClosest(Location loc)
 {
     double closest = double.MaxValue;
     Location re = null;
     foreach (Location n in _graph.Vertices)
     {
         if (n.DistanceFromXY(loc) < closest)
         {
             closest = n.DistanceFromXY(loc);
             re = n;
         }
     }
     return re;
 }
示例#21
0
 public void AddNode(Location loc)
 {
     loc.NodeType = _nodeType;
     _graph.AddVertex(loc);
     ConnectNode(loc);
 }
示例#22
0
 public void AddConnection(Location a, Location b)
 {
     try
     {
         AddEdge(a, b);
     }
     catch
     {
     }
 }
示例#23
0
文件: SpyWOW.cs 项目: civicacid/myevo
        public static void ATHKSM(string DaHao)              //阿塔哈卡神庙
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(-403.0322), (float)Convert.ToDouble(70.44502), (float)Convert.ToDouble(-90.92807)));
            large.Add(1, new Location((float)Convert.ToDouble(-590.7496), (float)Convert.ToDouble(113.9529), (float)Convert.ToDouble(-90.87166)));

            small.Add(0, new Location((float)Convert.ToDouble(-358.1343), (float)Convert.ToDouble(95.7), (float)Convert.ToDouble(-90.88229)));
            small.Add(1, new Location((float)Convert.ToDouble(-465.3393), (float)Convert.ToDouble(95.7), (float)Convert.ToDouble(-94.95782)));
            small.Add(2, new Location((float)Convert.ToDouble(-514.1118), (float)Convert.ToDouble(85.07677), (float)Convert.ToDouble(-91.4877)));
            small.Add(3, new Location((float)Convert.ToDouble(-587.5876), (float)Convert.ToDouble(94.92146), (float)Convert.ToDouble(-90.88853)));

            mapp.Add(0, 0);
            mapp.Add(1, 0);
            mapp.Add(2, 1);
            mapp.Add(3, 1);

            Location inPoint = new Location((float)Convert.ToDouble(-10299.08), (float)Convert.ToDouble(-4000.266), (float)Convert.ToDouble(-70.85023));
            Location outPoint = new Location((float)Convert.ToDouble(-300.5324), (float)Convert.ToDouble(95.67683), (float)Convert.ToDouble(-91.26634));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#24
0
 public void SetNewSpot(Location location)
 {
     SpotToHit = location;
     _path = PathProfile.FindShortsPath(ObjectManager.MyPlayer.Location, location);
     _currentWaypointIndex = 0;
     GrindingEngine.Navigator.SetDestination(location);
 }
示例#25
0
文件: SpyWOW.cs 项目: civicacid/myevo
        public static void WY_CQ(string DaHao)              //外域--城墙
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(-1351.121), (float)Convert.ToDouble(1651.274), (float)Convert.ToDouble(68.74297)));

            small.Add(0, new Location((float)Convert.ToDouble(-1353.837), (float)Convert.ToDouble(1644.862), (float)Convert.ToDouble(68.41888)));

            mapp.Add(0, 0);

            Location inPoint = new Location((float)Convert.ToDouble(-363.836), (float)Convert.ToDouble(3178.43), (float)Convert.ToDouble(-15.0013));
            Location outPoint = new Location((float)Convert.ToDouble(-1360), (float)Convert.ToDouble(1630.171), (float)Convert.ToDouble(68.53243));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#26
0
文件: Vendor.cs 项目: civicacid/myevo
 public Vendor(string name, Location spot)
 {
     Name = name;
     Spot = spot;
 }
示例#27
0
文件: SpyWOW.cs 项目: civicacid/myevo
        public static void WLK_GDK(string DaHao)              //WLK-古达克
        {
            if (string.IsNullOrWhiteSpace(DaHao))
            {
                Logging.Write("没提供大号的名字");
                return;
            }
            Dictionary<int, Location> small = new Dictionary<int, Location>();
            Dictionary<int, Location> large = new Dictionary<int, Location>();
            Dictionary<int, int> mapp = new Dictionary<int, int>();

            large.Add(0, new Location((float)Convert.ToDouble(147.0217), (float)Convert.ToDouble(-0.7574186), (float)Convert.ToDouble(-2.621897)));
            large.Add(1, new Location((float)Convert.ToDouble(147.0217), (float)Convert.ToDouble(-0.7574186), (float)Convert.ToDouble(-2.621897)));
            large.Add(2, new Location((float)Convert.ToDouble(147.0217), (float)Convert.ToDouble(-0.7574186), (float)Convert.ToDouble(-2.621897)));
            large.Add(3, new Location((float)Convert.ToDouble(147.0217), (float)Convert.ToDouble(-0.7574186), (float)Convert.ToDouble(-2.621897)));

            small.Add(0, new Location((float)Convert.ToDouble(1882.32), (float)Convert.ToDouble(631.027), (float)Convert.ToDouble(176.696)));
            small.Add(1, new Location((float)Convert.ToDouble(1865.156), (float)Convert.ToDouble(631.027), (float)Convert.ToDouble(176.6707)));
            small.Add(2, new Location((float)Convert.ToDouble(1864.86), (float)Convert.ToDouble(644.0133), (float)Convert.ToDouble(176.6822)));
            small.Add(3, new Location((float)Convert.ToDouble(1829.27), (float)Convert.ToDouble(642.1031), (float)Convert.ToDouble(159.941)));
            small.Add(4, new Location((float)Convert.ToDouble(1829.068), (float)Convert.ToDouble(623.2595), (float)Convert.ToDouble(152.2446)));
            small.Add(5, new Location((float)Convert.ToDouble(1853.23), (float)Convert.ToDouble(622.9475), (float)Convert.ToDouble(144.8592)));
            small.Add(6, new Location((float)Convert.ToDouble(1852.397), (float)Convert.ToDouble(643.9853), (float)Convert.ToDouble(135.4792)));
            small.Add(7, new Location((float)Convert.ToDouble(1827.927), (float)Convert.ToDouble(642.1819), (float)Convert.ToDouble(129.2708)));
            small.Add(8, new Location((float)Convert.ToDouble(1828.352), (float)Convert.ToDouble(633.4611), (float)Convert.ToDouble(129.2857)));

            small.Add(9, new Location((float)Convert.ToDouble(1716.94), (float)Convert.ToDouble(632.9564), (float)Convert.ToDouble(129.1974)));

            small.Add(10, new Location((float)Convert.ToDouble(1661.818), (float)Convert.ToDouble(635.2555), (float)Convert.ToDouble(130.2019)));
            small.Add(11, new Location((float)Convert.ToDouble(1624.687), (float)Convert.ToDouble(694.1088), (float)Convert.ToDouble(142.1722)));

            small.Add(12, new Location((float)Convert.ToDouble(1625.095), (float)Convert.ToDouble(783.053), (float)Convert.ToDouble(142.7822)));

            mapp.Add(0, 0);
            mapp.Add(1, 0);
            mapp.Add(2, 0);
            mapp.Add(3, 0);
            mapp.Add(4, 0);
            mapp.Add(5, 0);
            mapp.Add(6, 0);
            mapp.Add(7, 0);
            mapp.Add(8, 0);
            mapp.Add(9, 1);
            mapp.Add(10, 2);
            mapp.Add(11, 2);
            mapp.Add(12, 3);

            Location inPoint = new Location((float)Convert.ToDouble(6995.587), (float)Convert.ToDouble(-4376.675), (float)Convert.ToDouble(445.7651));
            Location outPoint = new Location((float)Convert.ToDouble(1902), (float)Convert.ToDouble(667), (float)Convert.ToDouble(176.696));

            SpyFB.Init(DaHao, inPoint, outPoint, large, small, mapp);
            SpyFB.StartFB();
        }
示例#28
0
 internal void SetDestination(Location pos)
 {
     _destination = pos;
 }
示例#29
0
 public List<Location> FindPath(Location sourced, Location targetd)
 {
     try
     {
         Func<DirectedLazyEdge, double> cityDistances = GetDistance;
         // a delegate that gives the distance between cities
         Location so = GetClosest(sourced);
         Location tar = GetClosest(targetd);
         TryFunc<Location, IEnumerable<DirectedLazyEdge>> tryGetPath = null;
         try
         {
             tryGetPath = _graph.ShortestPathsDijkstra(cityDistances, so);
         }
         catch (Exception e)
         {
             Logging.Write("Could not create path: " + e);
         }
         var loc = new List<Location>();
         if (tryGetPath != null)
         {
             IEnumerable<DirectedLazyEdge> path;
             if (tryGetPath(tar, out path))
                 loc.AddRange(path.Select(e => e.Source));
         }
         return loc;
     }
     catch (ArgumentException)
     {
         Logging.Write(LogType.Warning, "Could not create path, make sure you got a path loaded and it is valid");
         return new List<Location>();
     }
 }
示例#30
0
        public void RemoveNode(Location loc)
        {
            lock (_graph)
            {
                List<DirectedLazyEdge> toRemove =
                    _graph.Edges.Where(lazyEdge => lazyEdge.Source.Equals(loc) || lazyEdge.Target.Equals(loc)).ToList();
                foreach (DirectedLazyEdge directedLazyEdge in toRemove)
                {
                    _graph.RemoveEdge(directedLazyEdge);
                }

                foreach (Location node in _graph.Vertices)
                {
                    if (node.Equals(loc))
                    {
                        _graph.RemoveVertex(node);
                        break;
                    }
                }
            }
        }