Jump to content

Seminko

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by Seminko

  1. I'm trying to save the polyTarget but I guess i can grab it manually after the fact.
  2. Absolutely noob question. Inside the OnFightLoop I have WoWUnit currentTarget = etc.etc. What the heck do I need to do to be able to use it in an IF statement outside of the OnFightLoop? I want to test using it in my main rotation "if polyTarget.IsValid" (now gives an error) and if that is true I want to do "Interact.InteractGameObject(polyTarget.GetBaseAddress);" which also gives an error, saying it doesn't exist in the current context. Do I need to define it at the start? What type do I define it as?
  3. So both the OnFightLoop and my FightClass code will get executed, the only thing we are cancelling is wrobot's "default built in" fighting code / behavior? That's strange, kind of. If that is so, what would happen if I did: FightEvents.OnFightLoop += (unit, cancelable) => { cancelable.Cancel = true; }; Well, time to experiment...
  4. Sorry, I don't follow. My understanding is the OnFightLoop "loop" is acting like a while loop everytime I'm in combat, doing its thing continuously. Let's say, if I have the code below and the first argument would be true, cancelable.Cancel would be set to true, what would happen? It would skip the second if argument in the OnFightLoop and start right from the start? FightEvents.OnFightLoop += (unit, cancelable) => { if (ObjectManager.Target.GetDistance <= 8 && (!ObjectManager.Target.HaveBuff("Frost Nova") || !ObjectManager.Target.HaveBuff("Frostbite")) && (_timerFrostNova == null || _timerFrostNova.IsReady) && ObjectManager.Target.HealthPercent >= 20) { Move.StrafeRight(Move.MoveAction.PressKey, 1250); cancelable.Cancel = true; } if (ObjectManager.Target.GetDistance <= 10 && (!ObjectManager.Target.HaveBuff("Frost Nova") || !ObjectManager.Target.HaveBuff("Frostbite")) && (_timerFrostNova == null || _timerFrostNova.IsReady) && ObjectManager.Target.HealthPercent >= 20) { Move.StrafeLeft(Move.MoveAction.PressKey, 1250); } }; If that is the case can I disable OnFightLoop? I'm looking at the += and thinking if I did -= it would somehow remove things from the OnFightLoop? If so, how? Btw guys, this is great, this is how I like to learn, not sitting in books, that doesn't work for me at all. I have to dive right in and figure things out on real life examples. ;) Thanks for being so helpful!
  5. Just so I understand... From my testing today I found out that if I have OnFightLoop it combines my BAU rotation with the OnFightLoop rotation. It doesn't really seem it superseeds the BAU rotation. So if I go cancelable.Cancel = true; what will it cancel? The OnFightLoop rotation or everything else except the OnFightLoop rotation? Can Cancel be used from within the OnFightLoop?
  6. One more thing @Marsbar. I have this line, look below. How do I get all of the names of the player so I can print it in the log? var PlayersNearby = ObjectManager.GetObjectWoWPlayer().Where(p => p.GetDistance <= 120).ToList();
  7. How do I cancel all other events? I tried cancelable.Cancel = true within my OnFightLoop and I'm not 100% convinced it cancelled my main fight loop. God damn, I'm totally lost :-D EDIT: the thing is, if we do this (WoWUnit mainTarget = attackers.Where(u => u.HealthPercent == attackers.Min(x => x.HealthPercent)).FirstOrDefault();) inside an OnFightLoop it will "forget" the poly target, won't it? Because it will get redefined everytime it loops...
  8. Well the way I understand it is that if you don't use OnFightLoop and you call InteractGameObject and it instantly switches back to the original target, the one bot decided to target. I can polymorph a mob but it will keep it targetted until it dies despite InteractGameObject switching to a different target. So if the bot targets MOB1 and you InteractGameObject with MOB2 and cast Poly, it might work. But if the bot targets MOB1 and you poly MOB1, it will keep switching between MOB2 and MOB1. I guess it could work if polytarget was NOT my original target.
  9. Realized Me Human Plugin has this functionality. That will do nicely as a template to start from. Thanks Marsbar
  10. Can't really imagine it. Like if me.havebuff.food then wrobot.settings.pauseifplayer = false ? That would mess up the timer though. Also, not even sure if that can be controlled.
  11. Could you be more specific? What needs to be changed / what do I look into?
  12. Right, so based on my previous experience with moving after frostnova I now know tha for something like this I will need FightEvents.OnFightLoop. The idea is simple, however with my limited knowledge of CSharp I was not able to make this work reliably and/or as smooth as I would like to. The scripting language I'm familiar with is AutoIt and if I was using that I would grab the attacking units, put them into an array, polymorph the second, make the script remember which mob index I polymorphed and go back to any other index. Or grab all the mobs attacking me into an array, polymorph any of them really, probably the one that I have targetted to make it simple, and then do a for loop to loop through them all and check for unit.HaveBuff("Polymorph"), find the first that doesn't have it and attack. I have tried several versions but I always hit a brick wall due to my CSharp ignorance. Here's my total pseudo code (don't laugh too hard, or do :-D ) that works but only somewhat. It correctly casts poly, switches target but unfortunately once the target is dead the bot doesn't start fighting with the polymorphed mob. Despite being in combat it considers itself not fighting and tries to move on. The worst scenario is when I have 'Pause if player nearby' selected, once I kill the non-poly mob and player is nearby, it stops, sits there and takes the punishment from the recently unpolymorphed mob. There must be a clean way to do this.
  13. Everytime I grind with my mage this error occurs. I go in, start casting and one of three things happens: I lock onto a target, start casting frostbolt and once it's in the air the bot switches targets. If there are no mobs within the frostbolt range, it's fine, bot switches targets back. I lock onto a target, start casting frostbolt and once it's in the air the bot switches targets. If a mob is within range, it doesn't switch back and pulls another mob. I lock onto a target, start casting frostbolt and even before it shoots the bot switches targets. If a mob is within range, it doesn't switch back and pulls another mob. I've googled and tried installing SlimDX. Didn't help. Is there a way to manually increase the time before the bot considers a mob bugged?
  14. It looks really crappy / bot-like when you're eating, a player comes within range and you just stand up with 30% HP without finishing eating. The same way bot waits for combat to finish before it pauses itself, it should wait for regen to finish. EDIT: Wrote a plugin for this. Once properly tested, I will release it...
  15. Could you ellaborate on that? What do you mean it's preventing the bot from starting? Do you get an error?
  16. Just so I understand and correct me if I'm wrong, but this basically overrides the default Fight behavior? It "cancels" the current Fight behavior, inserts a new one (our code), and once that inserted "event" is resolved it continues with the BAU Fight behavior. Is that correct?
  17. GG WP! Yup that's it. Works both in my test blank fightclass as well as in the main one! Thank you very much @Marsbar. Also thank you @Matenia and @Apexx ! I apreciate the help guys! This will definitely help me with my rogue fightclass as well. The only thing missing from perfection is moving to a spot without mobs. But that is way above my knowledge of coding :-D You know what the funny part is? I've seen that post dozens of times when I was googling but since I didn't know what FightEvents.OnFightLoop was or even how to use it properly I didn't even attempted to fiddle with it. I was so close yet so far :-D
  18. I don't know how to do that. However I tried with a custom profile and it worked nicely. But, keep in mind that simple wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.PressKey, 1000); also worked with a custom profile but got messed up once it was inside a Fightclass and my toon was in combat. EDIT: But since you mentioned it, how do you run code from within the dev tools? You just put it in and start WRotation? If so, that did nothing.
  19. Wow man, thanks for taking the time! And thanks to your girlfriend! It does what it's supposed to... but... bad news... still the same stuttering issue. :( Here is how I tested: made a blank Fightclass with only Frost Nova and your move. Tries to move but stutters = does not even move the full 20 yards. I tried adding the MoveEvents but with those, the bot doesn't move at all. Also tried making a Fightclass with movement only so I can record and show it you all. Here's the code: Here's the video of above code in action: https://www.youtube.com/watch?v=B9ANAEQ0rSg I googled a bit and found an example where a while loop with sleep is used until the movement stops. I thought that makes sense so I tried and logged the loops to see what's going on. while (ObjectManager.Target.GetDistance <= 20) { var xvector = (ObjectManager.Me.Position.X) - (ObjectManager.Target.Position.X); var yvector = (ObjectManager.Me.Position.Y) - (ObjectManager.Target.Position.Y); Vector3 newpos = new Vector3() { X = ObjectManager.Me.Position.X + (float)((xvector * (20 / ObjectManager.Target.GetDistance)-xvector)), Y = ObjectManager.Me.Position.Y + (float)((yvector * (20 / ObjectManager.Target.GetDistance)-yvector)), Z = ObjectManager.Me.Position.Z }; MovementManager.Go(PathFinder.FindPath(newpos), false); Logging.Write("STARTED MOVING"); while (MovementManager.InMovement && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { Thread.Sleep(1000); Logging.Write("STILL MOVING"); } } Didn't have any effect at all. Here is the result from the log. It looks like how I though it would look. It doesn't perform the move, it performs dozens of small little tiny moves for some reason, hence the stuttering.
  20. Well, iMage-Pro is a paid FightClass. I appreciate you wanting to help me but I would advise to delete the file immediately. Mr. @Jasabi surely spent couple of hours on this and wouldn't apprecite you spreading it around. Thanks for participating in this, though!
×
×
  • Create New...