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. :)


WRobot user
  • Content Count

  • Joined

  • Last visited

About Zer0

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yep. The more I dive into the bottom of the code, the more I realize I would indeed have to hack the original behavior pretty hard, which is not really my intention, mainly for maintenance reasons. I guess I'll leave it at that and focus on other things for now. Thanks again for your help.
  2. Hah, pretty counter-intuitive, but smart 🙂. Unfortunately the problem is the same. The bot doesn't even seem to check if other states should be running and just keeps walking, even though my RadarFight state does indeed need to run (I'm checking in the log right on enemy detection).
  3. I think it is linked to this piece of code in the NeedToRun() method of the ToTown state: if (!wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause || wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore) { return false; } So I need to work my way around that. Anyway, I shot a message to Droidz. Thanks for your insight.
  4. I've managed to add my own state properly and it's working well in normal traveling conditions, but during the ToTown state, even when the Radarfight state NeedToRun is True and has a higher priority than the ToTown state, it doesn't trigger (unless isAttacked gets triggered, then the ToTown state is halted, and the Radarfight state takes over, since it has a higher priority than isAttacked). How come the IsAttacked state forces the ToTown state to pause, but not my RadarFight state? I'm trying a lot of things, but so far, no dice. Any idea? To expand on this, it seems like during the ToTown state, the engine isn't even checking for other states, unless actually attacked. Is there a way to force a state check?
  5. Lol. Sounds like a question that has been google translated, probably from an Asian language to English. Blood being HP. Blame being fight etc.. I'm not sure. @nishishenm Is your question about health regeneration between fights?
  6. Following your advice, I have been playing a bit with the State idea, yesterday. Both the grinder example and the PartyHelper plugin have been of tremendous help. Thank you again, both of you. Although things are getting clearer, I have a few questions and instead of running in circles and slowly losing faith for a week, I'm gonna ask directly. FYI, I'm conducting all my tests using the Grinder engine, and occasionally the Automaton. When I start the bot; my character needs to go to Town and has enemies on its way. Here's my observation: It seems like 2 engines are running at the same time. Let's say engine1, which only has "NPCScanState" and which refreshes every 3 seconds or so. After I add my RadarFight state with a higher weight to it, while the ToTown state is running, on enemy detection, the RadarFight state triggers and the bot tries to attack the mob, but seems to be confused and wanting to go back to its ToTown state. Basically same problem as before. And engine2, which has all the other states (IsAttacked, Pause, ToTown, MovementLoop etc...). After I add the RadarFight to this one with a high weight, when the bot is on its way to town and detects an enemy to fight, the RadarFight state doesn't trigger at all. BUT, if I get attacked and the weight of RadarFight is higher than the weight of IsAttacked, the RadarFight state takes over and things works perfectly. Does that make sense to you? It seems like engine2 only checks for states to run when engine 1 is somehow interrupted. Any idea how to overcome this?
  7. Hi guys, Although the radar works. Engaging in a clean radar fight is still quite a hassle and triggers a cascading amount of issues that I have to quick fix (blacklisting vendors and flightmasters, messing with running states...). I'm really looking to have a better, more reliable system. I have looked around in the forum and other places but I didn't find exactly what I wanted. So here's my question. Is it possible to add a State to the wRobot engine when the plugin initializes, and would it be a good idea? A whole new state that would be called RadarFight for example and that would have a very high priority. Does a state only run based on a set of conditions, or can you trigger one (Run(), or NeedToRun()) manually? Also what happens if two states have the same priority? I'm getting a bit desperate here, and I'm not sure if I can go any deeper than that. The lack of documentation is starting to be a real problem, so any help will be very much appreciated.
  8. A plugin has been released to try and fix this issue.
  9. Version 1.0.0


    Hi wRobot Community! Here is my first plugin. An enemy radar that can scan your surroundings for mobs to attack, whether they are included in your profile file or not. Why use Z.E.Radar? The reason I have created this plugin is because during travel or even grinding loops, if the enemies encountered are not specified in your profile, you might see your character just mindlessly run into packs of mobs and getting attacked first before retaliating. Z.E.Robot brings a solution to this issue by detecting every enemy in your surroundings and attacking the closest one before they attack, within a certain range of level and distance. What Z.E.Radar is NOT If you encounter those issues, it is mostly because your profile file is not complete or needs corrections. Z.E.Radar should not be a substitue to having clean and well-thought profile files. It should be a crutch or a tool to complete and reinforce your botting experience. How to install Copy the file into your plugin folder and activate the plugin in the wRobot interface. Z.E.Radar in details With Z.E.Radar, you can Set the detection radius. 25-30 yards seems to be a sweet spot. ⛔ DO NOT SET THIS VALUE TOO HIGH ⛔ or you might see your bot go on a murdering rampage in the entire zone with undesired consequences. Plus, you might experience a drop in computer performance due to the radar requiring exponentially higher workloads in populated areas. Set the level range of enemies to attack. You can set Z.E.Radar to attack only enemies within a range relative to your own level by inputting the "Lower lvl difference" and the "Higher lvl difference". For example, if you have set the lower level difference to 10 and the higher lvl difference to 3, and you are level 25, the bot will only attack enemies between level 15 and 28 (20-10 and 25+3). Choose whether the radar is activated when mounted. Choose to ignore passive enemies (yellow portraits). Choose to ignore loot for radar initiated fights. The reason I advise you set this value to True is because radar initiated fights are mostly undesired fights, for example when going to town. The bot will effectively clear out the way. Reaching for loot would mean a waste of time and an extension of the radar distance detection if the corpse is several yards away, leading to even more potential radar fights. Choose to ignore elite enemies. Choose to ignore indoors enemies. Indoors fights are usually not bot friendly. Set it to False at your own risk. Set the maximum Z axis (height) difference for radar detection. You probably don't want to detect and attack enemies under the bridge you are walking on or on a lower floor. 15 seems to work fine. Choose to use your Hearthstone when going to town. This has nothing much to do with the radar itself, just a QoL addition. It is a work in progress and is barely tested. In doubt, set it to False. This is my first plugin and I am new to wRobot. You might encounter bugs. In this case, please contact me or leave a comment. I will keep working on it. It is only tested on a TBC server. It might work for other expansions, but I can't guarantee it. Feel free to play with the setting but please monitor your bot while using the radar. Any feedback will be appreciated. IMPORTANT : Other plugins might interfere with Z.E.Radar. If you encounter a bug, please try deactivating your other plugins first. Cheers! -- KNOWN BUGS, Fix in progress -- Blacklisted session mobs make the radar freeze, causing the character to run into enemies without engaging combat The radar occasionally keeps running after the bot is stopped When the character is on its way to a vendor/flightmaster and engages in a radar fight, the vendor/flightmaster gets blacklisted Maximum radar detection radius should be hard-coded Lower default Z-axis delta limitation to 10 The character runs in a seemingly random direction for a few seconds after using Hearthstone Radar should stop during regen
  10. After further investigation, turns out there's a simpler way to handle the issue. Much cleaner, and works way better. It is confirmed that when you try to aggro a NPC that is not explicitly listed in the profile, AND when you're in a movement loop, the bot just tries to get back in the loop. The 3D radar helped a lot to understand what was going on. I still have a few (hopefully) minor bugs, and then I can release the plugin. Thanks again for your help, everyone. // Pull hook robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) => { if (state.DisplayName == "Movement Loop" && inRadarCombat) { cancelable.Cancel = true; } };
  11. I found a solution. It's not the most elegant and a bit too crafty to my taste, but it works pretty well so far. Again, if anyone has a better idea, please let me know. I have done a ton of tests and I had to search and guess into the API until I found useful pieces of code. What happens is pretty much what I suspected. When you call Fight.startFight on an enemy NPC that is not in the DB (profile) and that is not attacking you, the bot starts a new Move thread to approach the unit. After a second, during the approach, the bot thinks it's still traveling, despite Fight.InFight being true and starts a second Move thread to return to its travel path. Then the 2 threads run at the same time until somehow you're flagged in combat and the bot interrupts the travel Move thread. Here's what I've done : First : MovementManager.StopMove(); Fight.StartFight(closestUnit.Guid); Then the Event hook takes over whenever a new path is created during a pull. I pause the one that is not going to the enemy in a loop for the entire fight. Then, when the fight is over, I stop every movement and launch a new movement thread that will re-calculate the travel path. This last part is not absolutely necessary, but it keeps the bot from running back to its original place after every fight, which looks unnatural. In case you wonder, I tried to use cancelable.Cancel = true;... no dice, it makes the bot move eternally in a direction after reaching the first node, post-fight. wManager.Events.OthersEvents.OnPathFinderFindPath += (Vector3 from, Vector3 to, string continentNameMpq, CancelEventArgs cancelable) => { if (inRadarCombat && Fight.InFight && enemyToFight.Position != to) { while (Fight.InFight && enemyToFight.IsAlive && inRadarCombat) { Thread.Sleep(250); } MovementManager.StopMove(); MovementManager.StopMoveTo(); MovementManager.LaunchThreadMovementManager(); Thread.Sleep(2000); } }; It works for both melee and ranged. I'll keep testing and adjusting. Feel free to share your inputs if any. Also if anyone wants to test the plugin, please let me know. I should mention I'm developing it on a TBC server. No idea if it would work on other versions.
  12. To me, it seems that it's a conflict within the same "module", actually. The MoveTo one. The bot is sending conflicting information to it when I try to force a fight. It's going "Go fight. Oh wait, no, go travel, no wait, go fight, no wait, go travel...". I'm pretty new to wRobot and I don't know the ins and outs of its engine, so if you have any more concrete info about all this, feel free to share :). I'm willing to share the file if needed, since I'll release it for free once it's done.
  13. From my observation, once you launch Fight.startFight(), the next line of code isn't executed until the fight is over. I've tried setting Fight.InFight to true in many different places, and it doesn't work, unfortunately. I've also tried MovementManager.MoveTo(closestUnit.Position), but the bot takes over and tries to get back on its traveling path as soon as it starts moving to its target. I've also hooked the wManager.Events.MovementEvents.OnMoveToPulse event and maybe there's some hope in there but it's getting really complicated for such a simple task. I'm running out of ideas here. Do you think there is a way to temporarily deactivate the profile path, or the profile altogether?
  14. Thanks a lot for your help, but I'm still really stuck here. Here's what I tried : Logging.Write("[Z.E.Radar] Enemy too close (" + closestUnit.GetDistance + "), attacking : " + closestUnit.Name); // Start Fight Logging.WriteDebug(MovementManager.CurrentMoveTo.ToString()); MovementManager.StopMove(); Logging.WriteDebug(MovementManager.CurrentMoveTo.ToString()); MovementManager.StopMoveTo(false, 500); Logging.WriteDebug(MovementManager.CurrentMoveTo.ToString()); MovementManager.CurrentPath.Clear(); Logging.WriteDebug(MovementManager.CurrentMoveTo.ToString()); Fight.StartFight(closestUnit.Guid); And here's my log : 21:18:07 - [Z.E.Radar] Enemy too close (48,20433), attacking : Kolkar Scout [D] 21:18:07 - -776,1435 ; 1188,599 ; 98,48631 ; "None" [D] 21:18:07 - -776,1435 ; 1188,599 ; 98,48631 ; "None" [D] 21:18:07 - -776,1435 ; 1188,599 ; 98,48631 ; "None" [D] 21:18:07 - -776,1435 ; 1188,599 ; 98,48631 ; "None" 21:18:12 - [Fight] Player Attacked by Kolkar Scout (lvl 31) I'm really getting confused here. Nothing seems to work, yet it looks like it shouldn't be an issue at all. Any idea what is going on? I've also noted that once I'm actually in combat (for example my pet attacks or is attacked), the bot starts acting normally again. To me it seems like when I force engage a fight, unless I'm actually "In fight" in the game, the bot tries to take back control and follow its normal path, and I can't find a way to cancel it.
  • Create New...