Jump to content
This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

nickname

WRobot user
  • Content Count

    28
  • Joined

  • Last visited

About nickname

  • Rank
    Member

Recent Profile Visitors

385 profile views
  1. is there a similar method to reboot pc? @Droidz
  2. still can't do something working can anyone say why he cannot start a fight with a player? A few more tests and here I understand that he still starts the battle, but some trait is only close, although range in my FС = 35
  3. 25 дек 2019 14H32.log.htmlhere is the battle log file Bot skip fight with mobs, but dont start fighting with the player
  4. In your version, he stops attacking mobs, but does not take the attacking player in the target, he just stands and looks towards the player if add Lua.LuaDoString("TargetNearestEnemyPlayer();"); Behaves in the way I described when I posted the code (constantly changing the target from one to another)
  5. Hello to all who care, I think that a bot is very easy to detect when it grinds mobs. If an enemy player attacks the bot, until the bot kills all the mobs he fought before the player attacks him, he will not attack the player. I began to search on the forum, but did not find anything similar on this topic. using System; using System.ComponentModel; using System.Configuration; using System.Collections.Generic; using System.IO; using System.Linq; using robotManager.Helpful; using wManager; using wManager.Plugin; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : IPlugin { private bool _isLaunched; public void Initialize() { _isLaunched = true; ChangeTargetSettings.Load(); wManager.Events.FightEvents.OnFightLoop += TargetSwitcher; Logging.Write("[ChangeTarget2] Started."); } public void Dispose() { try { wManager.Events.FightEvents.OnFightLoop -= TargetSwitcher; } catch { } _isLaunched = false; Logging.Write("[ChangeTarget2] Stoped."); } public void Settings() { ChangeTargetSettings.Load(); ChangeTargetSettings.CurrentSetting.ToForm(); ChangeTargetSettings.CurrentSetting.Save(); Logging.Write("[ChangeTarget2] Settings saved."); } private void TargetSwitcher(WoWUnit woWPlayer, System.ComponentModel.CancelEventArgs cancelable) { while (_isLaunched) { WoWPlayer player = ObjectManager.GetNearestWoWPlayer(ObjectManager.GetObjectWoWPlayer()); if (!player.IsAlive || player.Faction == ObjectManager.Me.Faction || player.IsFlying || player.IsMyTarget) return; if (player != null && player.IsValid && player.InCombatWithMe) { //if(ObjectManager.Target.Type != WoWObjectType.Player) //Fight.StopFight(); Lua.LuaDoString("TargetNearestEnemyPlayer();"); //Interact.InteractGameObject(player.GetBaseAddress, false); cancelable.Cancel = true; //Fight.StartFight(true, true, false, true); //FightBG.StartFight(player.Guid); var m = Fight.StartFight(player.Guid, false); } } } } public class ChangeTargetSettings : Settings { public ChangeTargetSettings() { } public static ChangeTargetSettings CurrentSetting { get; set; } public bool Save() { try { return Save(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError("ChangeTargetSettings > Save(): " + e); return false; } } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<ChangeTargetSettings>(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName)); return true; } CurrentSetting = new ChangeTargetSettings(); } catch (Exception e) { Logging.WriteError("ChangeTargetSettings > Load(): " + e); } return false; } } I made a plugin, but it does not work correctly. The plugin tries to start a fight with a player who attacked everything, but the fight with mobs does not stop, and the bot turns either towards the player or tries to fight with mobs. Is there any way to stop attacking mobs and focus on the bot attacking player?
  6. Wonderful, it finally worked, but he still doesn’t want to mount, he had to add the command manually. You can use it to avoid unwanted players, if this occurs, the bot will stop all actions and fly away to the Crystal Song Forest, the position can be changed, it works only in Northrend plagin.cs
  7. just in case I’ll publish the code if you suddenly do not want to download the project Main.cs using robotManager.Helpful; using System.Threading; using robotManager.Products; using wManager.Wow.Enums; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using System; using System.Collections.Generic; using System.IO; using System.Net.Mail; using System.Net; using System.Configuration; using System.ComponentModel; using System.Text; using robotManager; using System.Threading.Tasks; using robotManager.Events; using robotManager.FiniteStateMachine; using System.Linq; using wManager.Wow.Bot.States; using System.Drawing; public class Main : wManager.Plugin.IPlugin { private bool _isLaunched; public static bool Enemynear; private enum GameState { None, Logged_Out = 0, Logged_In = 1 }; // enemyAlert private DateTime nextEnemyAlertTime; DateTime todaysDates; public List<string> myEnemyList; private bool hasAddedState; public void Initialize() { Logging.Write("[EnemyAlert] Started."); _isLaunched = true; todaysDates = DateTime.Now; //Fixed issue for BN_WHISPER not defined. initializeEnemiesList(); nextEnemyAlertTime = DateTime.Now; doStuffLoop(); FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += new FiniteStateMachineEvents.FSMEngineStateCancelableHandler(this.FiniteStateMachineEvents_OnBeforeCheckIfNeedToRunState); } private void initializeEnemiesList() { if (_settings.enemyAlertEnabled) { string[] enemySplit = _settings.enemyNamesList.Split(','); myEnemyList = new List<string>(enemySplit); } } public void Dispose() { nextEnemyAlertTime = DateTime.Now; myEnemyList = null; FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState -= new FiniteStateMachineEvents.FSMEngineStateCancelableHandler(this.FiniteStateMachineEvents_OnBeforeCheckIfNeedToRunState); _isLaunched = false; Logging.Write("[RoboAlert] Disposed."); } public void Settings() { _settings.ToForm(); _settings.Save(); } public void doStuffLoop() { while (Products.IsStarted && _isLaunched) { // Products.InPause = true; if (!Products.InPause) { if (_settings.enemyAlertEnabled) GetEnemiesNearMe(); Thread.Sleep(20000); } } } private void FiniteStateMachineEvents_OnBeforeCheckIfNeedToRunState( Engine engine, robotManager.FiniteStateMachine.State state, CancelEventArgs cancelable) { if (this.hasAddedState) return; int priority = engine.States.Find((Predicate<robotManager.FiniteStateMachine.State>)(s => s.GetType() == typeof(Grinding))).Priority; Engine engine1 = engine; LeaveHaters leaveHaters = new LeaveHaters(); leaveHaters.Priority = priority + 5; engine1.AddState((robotManager.FiniteStateMachine.State) leaveHaters); Logging.Write("[TSO]: Profession Training state added.", Logging.LogType.Normal, Color.SteelBlue); engine.States.Sort(); this.hasAddedState = true; } public bool GetEnemiesNearMe() { var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList); if(!(ObjectManager.Me.InCombatFlagOnly) && enemiesNearMe.Count > 0 && (DateTime.Now > nextEnemyAlertTime)) { nextEnemyAlertTime = DateTime.Now.AddSeconds(_settings.enemyAlertWaitTime); Enemynear = true; var enemyNames = ""; foreach (var enemy in enemiesNearMe) { enemyNames += (enemy.Name + " "); } Logging.Write("[EnemyAllert] Enemies Near Me "); wManager.Wow.Helpers.Lua.LuaDoString("BasicScriptErrors:SetScale(6) if BasicScriptErrors:IsShown() then BasicScriptErrors:Hide() end message('ХЕЙТЕР " + enemyNames + "')"); return Enemynear; } return false; } private List<WoWPlayer> GetEnemiesNearMe(int range, List<string> enemyName) { foreach (var enemy in enemyName) { Logging.Write(enemy); } List<WoWPlayer> enemiesNearMe = ObjectManager.GetObjectWoWPlayer().FindAll(p => p.GetDistance <= range && enemyName.Contains(p.Name) && p.IsAlive); return enemiesNearMe; } private roboAlertSettings _settings { get { try { if (roboAlertSettings.CurrentSetting == null) roboAlertSettings.Load(); return roboAlertSettings.CurrentSetting; } catch { } return new roboAlertSettings(); } set { try { roboAlertSettings.CurrentSetting = value; } catch { } } } [Serializable] public class roboAlertSettings : Settings { public roboAlertSettings() { enemyAlertEnabled = true; enemyNamesList = "Sosuza,player2,player3"; enemyAlertWaitTime = 20; enemyScanRange = 500; } [Setting] [Category("Enemy Alert Settings")] [DisplayName(" Enemy Alert Enabled")] public bool enemyAlertEnabled { get; set; } [Setting] [Category("Enemy Alert Settings")] [DisplayName("Enemy Names")] [Description("Check for specific Enemy by name. For multiple enemies, use a comma seperated list (Do not include spaces). This can be used in either the Elite Name or Normal Enemy Name.")] public string enemyNamesList { get; set; } [Setting] [Category("Enemy Alert Settings")] [DisplayName("Enemy Alert Pulse")] [Description("Time to wait until creating another subsequent alert after receiving an Enemy Alert (seconds). This prevents spamming of the alert")] public int enemyAlertWaitTime { get; set; } [Setting] [Category("Enemy Alert Settings")] [DisplayName("Enemy Scan Range")] [Description("The max range that RoboAlert will scan for enemies near you. (default is 500 units)")] public int enemyScanRange { get; set; } public static roboAlertSettings CurrentSetting { get; set; } public bool Save() { try { return Save(AdviserFilePathAndName("EnemyAlert", ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError("EnemyAlert > Save(): " + e); return false; } } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName("EnemyAlert", ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<roboAlertSettings>(AdviserFilePathAndName("EnemyAlert", ObjectManager.Me.Name + "." + Usefuls.RealmName)); return true; } CurrentSetting = new roboAlertSettings(); } catch (Exception e) { Logging.WriteError("EnemyAlert > Load(): " + e); } return false; } } } LeaveHaters.cs using robotManager.Helpful; using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Threading; using wManager.Wow.Bot.Tasks; using wManager.Wow.Class; using wManager.Wow.Enums; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; internal class LeaveHaters : robotManager.FiniteStateMachine.State { private int _priority; public override string DisplayName { get { return "Test State"; } } public override int Priority { get { return this._priority; } set { this._priority = 99; } } public override bool NeedToRun { get { return Main.Enemynear && (!ObjectManager.Me.InCombat && !ObjectManager.Me.IsCast && !ObjectManager.Me.IsLooting()); } } public override List<robotManager.FiniteStateMachine.State> NextStates { get { return new List<robotManager.FiniteStateMachine.State>(); } } public override List<robotManager.FiniteStateMachine.State> BeforeStates { get { return new List<robotManager.FiniteStateMachine.State>(); } } public override void Run() { wManager.Events.FightEvents.OnFightLoop += delegate (WoWUnit unit, CancelEventArgs cancelable) { var toPosition = new Vector3(4286.155, -884.4277, 251.7935, "Flying"); LongMove.LongMoveGo(toPosition); }; } } I would be grateful for any help
  8. In the project below, I tried to create my own state but failed ... https://mega.nz/#!UNcVBSRC!sroet3sV6t9UWoR7st514C7_KA0WRdY8Vmjre4SpyII
  9. I have already spent several days trying to come up with something to implement through the plugin and it seems to me that this venture failed, all that I found and that could work to get the bot to go somewhere during grind (immediately after the battle) or (farm ore or grass), the bot can’t just leave and go where I need to. Maybe this can be implemented somehow differently, for example, to call a special state with a high priority, if a specific player is nearby, but I found even less information regarding the forum states
  10. public void Initialize() { if (_settings.enemyAlertEnabled) { string[] enemySplit = _settings.enemyNamesList.Split(','); myEnemyList = new List<string>(enemySplit); robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += delegate (Engine engine, State state, CancelEventArgs cancelable) { if (!(state is wManager.Wow.Bot.States.IsAttacked) || ObjectManager.Me.InCombat || ObjectManager.Me.IsCast || ObjectManager.Me.IsLooting()) return; while (!wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore) { var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList); if (enemiesNearMe.Count > 0 && GetUnitsNearMe(50).Count == 0) { moveto(); Thread.Sleep(200); } } }; } } private void moveto() { wManager.Events.FightEvents.OnFightLoop += delegate (WoWUnit unit, CancelEventArgs cancelable) { var toPosition = new Vector3(4286.155, -884.4277, 251.7935, "Flying"); LongMove.LongMoveGo(toPosition); }; } public List<WoWUnit> GetUnitsNearMe(int range) { List<WoWUnit> GetUnitsNearMe = wManager.Wow.ObjectManager.ObjectManager.GetWoWUnitHostile().FindAll(u => (double)u.GetDistance <= range); return GetUnitsNearMe; } If the bot is farming and a specific player flies up to it, it simply finishes the mobs and becomes afk (it doesn’t even take loot).
  11. It’s very strange, sometimes the code works (flies as expected), but in 80% of cases it just farm on, although there is a player next to whom the proc works, sometimes (after loot) it just becomes afk and does nothing.
  12. private void initializeEnemiesList() { if (_settings.enemyAlertEnabled) { string[] enemySplit = _settings.enemyNamesList.Split(','); myEnemyList = new List<string>(enemySplit); } } public void enemyAlert() { var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList); if (!(ObjectManager.Me.InCombatFlagOnly) && enemiesNearMe.Count > 0 && (DateTime.Now > nextEnemyAlertTime)) { nextEnemyAlertTime = DateTime.Now.AddSeconds(_settings.enemyAlertWaitTime); var enemyNames = ""; foreach (var enemy in enemiesNearMe) { enemyNames += (enemy.Name + " "); } moveto(); Logging.Write("[RoboAlert] Enemies Near Me "); wManager.Wow.Helpers.Lua.LuaDoString("BasicScriptErrors:SetScale(6) if BasicScriptErrors:IsShown() then BasicScriptErrors:Hide() end message('HATER " + enemyNames + "')"); } private void moveto() { wManager.Events.FightEvents.OnFightLoop += delegate (WoWUnit unit, CancelEventArgs cancelable) { var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList); if (enemiesNearMe.Count > 0) { var toPosition = new Vector3(4286.155, -884.4277, 251.7935, "Flying"); wManager.Wow.Helpers.MovementManager.MoveTo(toPosition); while (wManager.Wow.Helpers.MovementManager.InMoveTo && toPosition.DistanceTo(wManager.Wow.ObjectManager.ObjectManager.Me.Position) > 17) { System.Threading.Thread.Sleep(10000); } } }; } What code could be placed in the body of the method moveto() so that the bot flew to a specific point if the enemy suddenly appeared nearby, And after that the bot returned
  13. tried to use this code but it doesn't work at all maybe instead robotManager.Events.FiniteStateMachineEvents.OnRunState += (FiniteStateMachineEvents.FSMEngineStateCancelableHandler)((engine, state, cancelable) => Will some other code work? Any ideas pls...
  14. Hi guys, I'm editing Roboalert, or rather I'm trying to add a method thanks to which the bot will fly to a certain point if it meets a certain player (bot catcher) public void LeavePlace() { robotManager.Events.FiniteStateMachineEvents.OnRunState += (FiniteStateMachineEvents.FSMEngineStateCancelableHandler)((engine, state, cancelable) => { Vector3 newpos = new Vector3() { X = 5296.862f, Y = 974.8112f, Z = 447.8605f, Type = "Flying" }; Logging.Write("Leave"); wManager.Wow.Helpers.LongMove.LongMoveByNewThread(newpos); if (wManager.Wow.Helpers.LongMove.IsLongMove) { Thread.Sleep(20000); Logging.Write("летим"); } }); } I tried to put everything in one method, but it turned out - some shit
×
×
  • Create New...