Пример #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var account = Others.GetProcessOwner(Process.GetCurrentProcess().Id);
            var botFile = Others.ReadFileAllLines(Application.StartupPath + "\\Data\\Launcher.txt")[0].Trim();

            if (File.Exists(botFile))
            {
                string random = Others.GetRandomString(Others.Random(4, 10));
                string tnbExe = random + ".exe";
                var    sw     = new StreamWriter(Application.StartupPath + "\\Data\\Launcher.txt");
                sw.WriteLine(tnbExe);
                sw.Close();
                File.Move(botFile, tnbExe);
                if (File.Exists(botFile + ".config"))
                {
                    File.Move(botFile + ".config", tnbExe + ".config");
                }
                Others.AddFileSecurity(tnbExe, account, FileSystemRights.ReadData, AccessControlType.Allow);
                Others.RemoveFileSecurity(tnbExe, account, FileSystemRights.ReadData, AccessControlType.Deny);
                Process.Start(tnbExe);
                Process.GetCurrentProcess().Kill();
            }
            MessageBox.Show("Please do not modify the name of the executable by yourself. Restore the original name or re-download the software.");
            Process.GetCurrentProcess().Kill();
        }
Пример #2
0
            // Load data\spell.txt (English)
            internal static void LoadSpellList(string fileName)
            {
                try
                {
                    lock (LoadSpellListLock)
                    {
                        if (ListSpell == null)
                        {
                            var      tListSpell     = new Dictionary <uint, string>();
                            string[] listSpellTemps = Others.ReadFileAllLines(fileName);
                            foreach (string tempsSpell in listSpellTemps)
                            {
                                Application.DoEvents();
                                if (string.IsNullOrWhiteSpace(tempsSpell) || !tempsSpell.Contains(";"))
                                {
                                    continue;
                                }

                                string[] tmpSpell = tempsSpell.Split(';');

                                if (tmpSpell.Length != 2 || string.IsNullOrWhiteSpace(tmpSpell[0]) || string.IsNullOrWhiteSpace(tmpSpell[1]))
                                {
                                    continue;
                                }

                                uint tspellId = Others.ToUInt32(tmpSpell[0]);
                                if (!tListSpell.ContainsKey(tspellId))
                                {
                                    tListSpell.Add(tspellId, tmpSpell[1]);
                                }
                            }

                            ListSpell = tListSpell;
                        }
                    }
                }
                catch (Exception exception)
                {
                    Logging.WriteError("LoadSpellListe(string fileName): " + exception);
                    if (ListSpell == null)
                    {
                        Logging.WriteError("ListSpell == null");
                    }
                    else
                    {
                        Logging.WriteError("ListSpell.Count = " + ListSpell.Count);
                    }
                }
            }
Пример #3
0
        public static string GetAquaticMountName()
        {
            try
            {
                var aquaticMountList =
                    new List <string>(Others.ReadFileAllLines(Application.StartupPath + "\\Data\\aquaticmountList.txt"));

                string key = GetClientNameBySpellName(aquaticMountList);
                if (key != "")
                {
                    Logging.Write("Found aquatic mount: " + key);
                }
                return(key);
            }
            catch (Exception exception)
            {
                Logging.WriteError("GetAquaticMountName(): " + exception);
            }
            return("");
        }
Пример #4
0
        public static string GetAquaticMountBarAndSlot()
        {
            try
            {
                List <string> aquaticMountList =
                    new List <string>(Others.ReadFileAllLines(Application.StartupPath + "\\Data\\aquaticmountList.txt"));

                string key = GetSlotBarBySpellName(aquaticMountList);
                if (key != "")
                {
                    Logging.Write("Searching for aquatic mount: " + key);
                }
                return(key);
            }
            catch (Exception exception)
            {
                Logging.WriteError("GetAquaticMountBarAndSlot(): " + exception);
            }
            return("");
        }
Пример #5
0
 internal static void LoadSpellListe(string fileName)
 {
     try
     {
         if (ListSpell == null)
         {
             string[] listSpellTemps = Others.ReadFileAllLines(fileName);
             ListSpell     = new List <SpellList>();
             ListSpellName = new List <string>();
             foreach (string tempsSpell in listSpellTemps)
             {
                 string[] tmpSpell = tempsSpell.Split(';');
                 ListSpell.Add(new SpellList(Others.ToUInt32(tmpSpell[0]), tmpSpell[1]));
                 ListSpellName.Add(tmpSpell[1]);
             }
         }
     }
     catch (Exception exception)
     {
         Logging.WriteError("LoadSpellListe(string fileName): " + exception);
     }
 }
Пример #6
0
 public void StrikeFirst()
 {
     if (_stealthSpell == null)
     {
         _stealthSpell = new Spell("Stealth");
     }
     if (_prowlSpell == null)
     {
         _prowlSpell = new Spell("Prowl");
     }
     if (IgnoreStrikeBackCreatureList.Count <= 0)
     {
         Logging.Write("Loading IgnoreStrikeBackCreatureList...");
         string[] forceLootCreatureList = Others.ReadFileAllLines(Application.StartupPath + "\\Data\\IgnoreStrikeBackCreatureList.txt");
         for (int i = 0; i <= forceLootCreatureList.Length - 1; i++)
         {
             int creatureId = Others.ToInt32(forceLootCreatureList[i]);
             if (creatureId > 0 && !IgnoreStrikeBackCreatureList.Contains(creatureId))
             {
                 IgnoreStrikeBackCreatureList.Add(creatureId);
             }
         }
         if (IgnoreStrikeBackCreatureList.Count > 0)
         {
             Logging.Write("Loaded " + IgnoreStrikeBackCreatureList.Count + " creatures to ignore in Strike Back system.");
         }
     }
     while (Products.Products.IsStarted)
     {
         Thread.Sleep(1500); // no need to spam, this is supposed to be more "human", and human have brainlag anyway.
         if (Fight.InFight)
         {
             continue;
         }
         if (Usefuls.BadBottingConditions)
         {
             continue;
         }
         if ((ObjectManager.ObjectManager.Me.IsMounted && (nManagerSetting.CurrentSetting.IgnoreFightIfMounted || Usefuls.IsFlying)))
         {
             continue;
         }
         if (_stealthSpell.HaveBuff || _prowlSpell.HaveBuff)
         {
             continue;
         }
         if (ObjectManager.ObjectManager.Me.HealthPercent <= 40)
         {
             continue;
         }
         if (ObjectManager.ObjectManager.Me.GetDurability <= nManagerSetting.CurrentSetting.RepairWhenDurabilityIsUnderPercent)
         {
             continue;
         }
         WoWUnit unit = ObjectManager.ObjectManager.GetUnitInAggroRange();
         if (unit == null || !unit.IsValid || unit.IsDead || nManagerSetting.IsBlackListedZone(unit.Position) && unit.GetDistance > 10f)
         {
             continue;
         }
         if (unit.InCombat || unit.IsTrivial)
         {
             continue;
         }
         if (IgnoreStrikeBackCreatureList.Contains(unit.Entry))
         {
             continue;
         }
         if (unit.IsElite && System.Math.Abs(ObjectManager.ObjectManager.Me.Level - unit.Level) < 0 || System.Math.Abs(ObjectManager.ObjectManager.Me.Level - unit.Level) < -6)
         {
             //nManagerSetting.AddBlackListZone(unit.Position, 15f);
             continue; // automatically add potentially dangerous target location to blacklist to avoid suiciding farming near an elite.
         }
         if (unit.Health > (ObjectManager.ObjectManager.Me.Health * 15))
         {
             continue;
         }
         if (TraceLine.TraceLineGo(ObjectManager.ObjectManager.Me.Position, unit.Position, CGWorldFrameHitFlags.HitTestAllButLiquid))
         {
             continue;
         }
         if (unit.GetMove) // only decide to attack if the unit move towards us or patrol.
         {
             _unitToPull = unit;
         }
     }
 }