Jump to content

Marsbar

Elite user
  • Posts

    411
  • Joined

  • Last visited

Everything posted by Marsbar

  1. It's because you're running addons, the memory gets too high and wrobot does a reload to clear up some memory.
  2. No, that's why you were getting the stuttering. It was trying to go back to doing what it was and then hitting the condition again (i think). We're adding extra behavior to the onfightloop. In regards to moving to a "safe" position, it may not be as hard as we think. We need to change the direction of the vector if a mob is too close to the end position. If you look at the code you can see that the xvector and yvector are our position xy minus the target xy. This ends up giving us the x and y distance we move in the x and y directions. Example (ignoring z axis): Our target is at position x:55,y:45 We are at position x:48,y:44 Our x position minus the target x position = our x vector == 48 - 55 = -7 Our y position minus the target y position = our y vector == 44 - 45 = -1 What we could do is then add or subtract to that vector if an enemy is too close to our target pos, which would change the direction from the Me pos. (I'm at work again so cant play with it but it's actually quite interesting because I'm starting to get how this works lol)
  3. Try adding FightEvents.OnFightLoop += (unit, cancelable) => { if (ObjectManager.Target.GetDistance < 8) { 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); Thread.Sleep(1500); } }; edit: the thread.sleep is a bit of a workaround to stop whatever else is interfering you may also want to increase that if distance to higher than 8
  4. You can run any c# code in the dev tools; Tools>Development Tools>Paste your code in the window>Press c# button. I'll try adding it to a fight class and see if i get better results.
  5. Can you try targetting something (can be a friendly), running wrotation and running my code in the dev tools? Edit: I'm also in vanilla and it works running in dev tools, havent tried it in a fight class yet
  6. This took me a while, I had the help of my GF who did mathy things in school (unlike me) to be my human calculator; 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); Currently this runs ~20 yards back away from the target using the pathfinder, you can change the 20 to be what you want and also add it to the onfightloop with an if condition. Let me know how it goes!
  7. Ignoring the Helpers.Move for a second, could you not do something like; MovementManager.Go(PathFinder.FindPath("Vector3 of the place you want to go"), false); Bear in mind, you'll need to do some math to find the vector3 that is like 20yards behind where your char is currently facing.
  8. I'd be surprised if it doesn't error; BuffRotation(); CheckConjureWaterRank(); CheckConjureFoodRank(); These functions don't exist, also you left out using wManager.Events; again :P
  9. I believe that is because they're static. A lot of these types of errors can easily be highlighted by a better editor that references the wrobot dlls. Visual studio community edition is free (although quite a heavy editor) and there are some others, its all based on preference.
  10. Using Visual studio? Ctrl+K Ctrl+D, formats your code, i was really confused, thought you were doing the events in the ShowConfiguration(). also would you not do? MovementEvents.OnMoveToPulse += delegate { MovementEvents_OnMoveToPulse; }; MovementEvents.OnMovementPulse += delegate { MovementEvents_OnMovementPulse; };
  11. Looking good so far! I'm also doing a c# WL fightclass atm - i recommend adding this; The Drain soul talent will keep needs for regen low. At the moment yours will not cast it if the soul shard count is 3 or higher when you optimally always want to cast drain soul and then remove the unneeded soul shards.
  12. @reapler Sadly not working for me. Getting a Index was out of range error. I'm doing this for soul shard management, wanting to delete all soul shards exepct for a certain amount.
  13. To add another question onto this, Bag.GetBagItem() only shows 1 instance of the item, even if there are more of them in different bags, anyway to get the containerid/slot for each?
  14. I assume you need to go into the gossip option first, then do one of these. Edit: Try manually selecting a gossip option (a quest) and then running the AcceptQuest from the dev console.
  15. Just had a quick look, not sure if it works but; wManager.Wow.Helpers.Quest.AcceptQuest(); wManager.Wow.Helpers.Quest.CompleteQuest(int); There are more options under Quest. which you probably also want to use.
  16. Move.Forward(Move.MoveAction.PressKey, 2000); Move.StrafeLeft(Move.MoveAction.PressKey, 2000); something like that
  17. The attached may work, untested plugin. RezzRange.cs I get this issue sometimes too but its very rare, never really bothered about thinking of a way to fix it before now.
  18. You can add movement in your fightclass. I think it would likely need to be a c# fightclass but there is a movement manager in wRobot. Some people here have incorporated kiting into their fightclasses.
  19. Marsbar

    Ghosty

    Thanks for the feedback, could you give me a little more info on what your bot was doing? When it was spamming ghost wolf, did you have a DoT on you by chance? (this could make you "enter combat" so to speak). In the log it should also say either "Going Ghosty" or "Leaving Ghosty", when that spamming was happening was it showing both or just "Going Ghosty"? Also, could your fightclass be interfering? You're welcome to try my fightclass (its a work in progess). MarsEShaman.cs
  20. Version 1.0.4

    369 downloads

    Tried adding ghost wolf as a mount and it bugs out? Hopefully here is the solution: This plugin hooks itself onto the MoveToPulse, pauses the bot and enters ghost wolf and continues when travelling as a Shaman. It will not attempt to do this if you have a mount name filled in or are indoors. It should leave ghost wolf when entering combat. I heavily recommend using the addon EzDismount, it tries to cancel ghost wolf when you interact with things. You no longer need an addon, I have built leaving ghost wolf into the plugin. Not tested too thoroughly, let me know if anything doesn't work too well.
  21. Hi, I'm trying to get the totem helpers to work in my fightclass. Totems.TotemTimeLeft(TotemType.Fire) Totems.TotemExist(TotemType.Fire) The way I'm testing it is via the dev tools and trying to write the result to the log: Logging.Write(Totems.TotemTimeLeft(TotemType.Fire).ToString()); Logging.Write(Totems.TotemExist(TotemType.Fire).ToString()); Timeleft always returns 0 and exist always returns false. A lua error is also displayed ingame: All im trying to do is check if the fire totem is up, if not recast the fire totem.
×
×
  • Create New...