Everything posted by Pudge
-
fly away if you meet a specific player
In the project below, I tried to create my own state but failed ... https://mega.nz/#!UNcVBSRC!sroet3sV6t9UWoR7st514C7_KA0WRdY8Vmjre4SpyII
-
fly away if you meet a specific player
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
-
fly away if you meet a specific player
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).
-
fly away if you meet a specific player
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.
-
fly away if you meet a specific player
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
-
fly away if you meet a specific player
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...
-
fly away if you meet a specific player
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
- c# targeting by name
-
c# targeting by name
thanks for reply, but that is not what i need, i need targeting, not interact :)
-
c# targeting by name
hi, is there a c# way to targeting npcs like a lua TargetUnit()? by using this code "ObjectManager.Me.Target = ObjectManager.GetWoWUnitByName("Havenshire Stallion").First().Guid;" bot starts move straight to target and interact with them instead of just targeting
-
Smelting
Dontried all the ways to call SmeltingState, Droidz wrote that the bot goes to melt when "Tototown", no, it doesn’t go anywhere, there is a bunch of Npc Forge with the type "Smelting" in the database, but no, the bot neglects and goes nowhere except "totown"
-
Bot fly under water
I mainly use Grinder, and I do a lot tasks like "Run" in the reloger, and when there is a change of "run", the bot uses the Path Finder, which automatically draws a route through the bottom of any rivers and lakes. There is a solution - add to the blacklist all the reservoirs that are between the routes, and you need to do blacklists at the bottom of the reservoirs and not on their surface, if on the surface - the bot can ignore the blacklist and get stuck.
-
Bot fly under water
I think it would be nice to add in Wrobot General Settings the function Dismount on stuck when fly mount, it would simplify everything
-
Bot fly under water
a bot often flies from one location to another. When a bot flies over water, it often uses points under water when it is on a flying mount and starts to get stuck on the surface without dismounting from the mount. Please help with the solution