Jump to content

Recommended Posts

  On 10/30/2017 at 12:57 PM, Matenia said:

You actually need to set isTooClose to false again after the while loop and maybe give it a short Thread.Sleep(500) or so at the end of each iteration.
Does the bot interrupt movement and then starts strafing again? Or is the strafing itself just choppy?

 

I highly recommend getting Visual Studio and doing a basic C# tutorial (or even Java, they're essentially the same

Expand  

I'll try to record it so you guys know what I'm talking about.

  On 10/30/2017 at 1:25 PM, Matenia said:

Looks to me like you need to call the movement function with maybe 50ms instead of 1250.

Expand  

What does that parameter mean? I haven't been able to find any explanation to it so I assumed it defined how long should the movement be active for, in other words for how long the key should be pressed.

 

I tried this, which somewhat works but it moves backwards REALLY choppy, it really looks like it presses S every 50ms, however changing it to something like 5000 doesn't do much...

while (ObjectManager.Target.GetDistance <= 6)
			{
				isTooClose = true;
				wManager.Wow.Helpers.Move.Backward(Move.MoveAction.PressKey, 50); // wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.PressKey, 1500);
				//Thread.Sleep(1250);
			}

 

Yes, try 

wManager.Wow.Helpers.Move.Backward(Move.MoveAction.DownKey, );

so it will press the key for 1000 ms (down). The ms is the time it will press it. With PressKey it will go up and down in 50ms (or 1000, or whatever) hence the movement you're seeing.

  On 10/30/2017 at 1:39 PM, Matenia said:

Yes, try 

wManager.Wow.Helpers.Move.Backward(Move.MoveAction.DownKey, );

so it will press the key for 1000 ms (down). The ms is the time it will press it. With PressKey it will go up and down in 50ms (or 1000, or whatever) hence the movement you're seeing.

Expand  

lol are you serious DownKey instead of PressKey, so obvious, yet still not so... :-D

 

Alright, so Move.Backward + DownKey works, but that would work even without all the MovementEvents_OnMovementPulse shennanigans.

When I try wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.DownKey, 1000); it STILL tries to face the target, running around in circles, practically indefinitely because I am well within the 6yr range we set up in the while loop.

I even tried ForceIgnoreAttack, still the same thing. The strange thing is that even though it leaves the 6yr radius it continues strafing. It's like it doesn't wait for the movement to stop to continue.

while (ObjectManager.Target.GetDistance <= 6)
{
	wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = true;
	isTooClose = true;
	wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.DownKey, 2500); // wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.PressKey, 1500);
	wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = false;
	//Thread.Sleep(1250);
}

 

If the bot doesn't wait for the Move to resolve before continuing the script I tried putting in Sleep. Still the same thing, runs around in circles until the mob is dead.

while (ObjectManager.Target.GetDistance <= 6)
{
	wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = true;
	isTooClose = true;
	wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.DownKey, 2500); // wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.PressKey, 1500);
	Thread.Sleep(2500);
	wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = false;
	//Thread.Sleep(1250);
}

 

I don't understand the problem really. I use the following for my hunter fight class without any OnEvent methods:

if (!MyTarget.IsTargetingMe && Vector3.Distance(Me.Position, MyTarget.Position) < 8 && HunterSettings.CurrentSetting.ManageMovement)
    Move.Backward(Move.MoveAction.PressKey, 800);

And it works flawlessly.

Here's an idea, does facing the target count as movement? Because if it doesn't it would make sense... we're trying to cancel bot movement but facing the target is still there?

This is probably not the case but I'm trying to think of everything because we don't seem to be able to find out what's wrong.

  On 10/30/2017 at 2:09 PM, Apexx said:

I don't understand the problem really. I use the following for my hunter fight class without any OnEvent methods:

if (!MyTarget.IsTargetingMe && Vector3.Distance(Me.Position, MyTarget.Position) < 8 && HunterSettings.CurrentSetting.ManageMovement)
    Move.Backward(Move.MoveAction.PressKey, 800);

And it works flawlessly.

Expand  

Since I see Vector3, do you manage the movement yourself? Because I don't, I let the bot decide the movement.

Also try it with Move.StrafeLeft

Also what does the ManageMovement setting do?

 

EDIT:

  Quote

Since I see Vector3, do you manage the movement yourself? Because I don't, I let the bot decide the movement.

Expand  

With my poor understanding of CSharp and the bot itself I've seen some people claiming they handle the toon movement themselves using a separate code. I don't even know if that could be done but worth asking...

It simply checks the distance between the player and player target. If the distance between is < 8 yards, it will back pedal.
ManageMovement is a boolean option in my fight class settings.

I have not tried strafing, it would just seem pointless to strafe when I can achieve greater distance just back pedaling and not have to worry about character rotation.

  On 10/30/2017 at 2:17 PM, Apexx said:

It simply checks the distance between the player and player target. If the distance between is < 8 yards, it will back pedal.
ManageMovement is a boolean option in my fight class settings.

I have not tried strafing, it would just seem pointless to strafe when I can achieve greater distance just back pedaling and not have to worry about character rotation.

Expand  

I don't know about you but when I see someone backpaddling it seems suspicious not to mention it is significantly slower than strafing.

I would very much like to see if strafing worked for you. Would you try and let us know?

I think back pedaling is somewhat a moot point. Even when I play my hunter using my actual fingers :tongue: I back pedal. The video behavior would be more suspicious imo.
I could maybe find some time at some point to modify the code and test. I just don't know when I will be able to at the current moment.

You can try the following:

MovementManager.StopMove();
var target = ObjectManager.Target;
Fight.StopFight();
// do movement here
FIght.StartFight(target.Guid);

Edit: MovementManager.StopMove() should make the bot stop any movement it was trying to do already (for example, running close to a target). Your bot constantly facing the target happens because it started a "fight". If you temporarily stop the fight and then re-enable it, MAYBE that will help with your strafing.

Edited by Matenia

I'm begining to give up, honestly...

So first issue, when I stop the fight and then start it again, the bot log says I started to fight the mob I was targetting before. BUT... it doesn't do anything, it just stares at the mob... But that's irrelevant since it doesn't solve the movement issue at all, still running in circles...

Second thing. There seems to be an inconsistency between presskey and downkey. Both of them make the bot run in circles, however when I do:

  • wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.PressKey, 1000); - it does only a small movement, maybe trully 1second and then stops (still circling though)
  • wManager.Wow.Helpers.Move.StrafeLeft(Move.MoveAction.DownKey, 1000); - it does circles for a VERY long time, maybe 30 seconds... doesn't DownKey require an UpKey somewhere?
  • wManager.Wow.Helpers.Move.Backward(Move.MoveAction.PressKey, 1000); - does the chopping movement I showed in the vid
  • wManager.Wow.Helpers.Move.Backward(Move.MoveAction.DownKey, 1000); - actually moves back but there is still slight choppiness, it doesn't look like someone pressed a button and held it pressed, it looks like someone was mashing the key repeatedly in milisecond increments, look very bot like

I also tried removing the MovementEvents and it didn't have any effect on how the bot acted...

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.

  On 10/30/2017 at 3:06 PM, Marsbar said:

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.

Expand  

I wanted to avoid this as much as possible because I have NO IDEA how to do that but if you or someone is willing to help me with that I guess it would be a good solution if it worked.

  On 10/30/2017 at 2:28 PM, Apexx said:

I think back pedaling is somewhat a moot point. Even when I play my hunter using my actual fingers :tongue: I back pedal. The video behavior would be more suspicious imo.
I could maybe find some time at some point to modify the code and test. I just don't know when I will be able to at the current moment.

Expand  

Would you be willing to post your code, Apexx? I would like to check the differences.

So I did some testing.

I put together a complete vanilla Fightclass and a Custom profile.

 

Custom Profile: 

moves flawlessly both in and out of combat both backward and strafe (doesn't attack though, duh)

  Reveal hidden contents

 

Fightclass:

Is set it up to shoot frost bolts if distance > 6, if the distance is smaller it should go backwards. And despite it being vanilla and converted from XML, it does the same stutter as shown in the video. So now we know the issue is not with my code but rather it's something in wrobot handling combat, not just Grinder. I tried using Party mode and aggroing a mob and same thing. @Apexx what wow version do you use wrobot for? Not sure if the wrobot versions are different or not but I cannot see any other reason why the code would work for you and not for me.

  Reveal hidden contents

 

@Droidz / @iMod, guys would you be willing to take a look? I'm going crazy already.

Short Video Demonstration

// Debuff 20549 = War Stomp | 19975 = Entangling Roots
while (ObjectManager.Target.IsValid &&
    (ObjectManager.Target.HaveBuff(20549) || ObjectManager.Target.HaveBuff(19975)) &&   
    Vector3.Distance(ObjectManager.Me.Position, ObjectManager.Target.Position) < 6)
{
    Move.StrafeLeft(Move.MoveAction.PressKey, 1500);
    MovementManager.Face(ObjectManager.Target);
}

 

  On 10/30/2017 at 4:27 PM, Apexx said:

Short Video Demonstration

// Debuff 20549 = War Stomp | 19975 = Entangling Roots
while (ObjectManager.Target.IsValid &&
    (ObjectManager.Target.HaveBuff(20549) || ObjectManager.Target.HaveBuff(19975)) &&   
    Vector3.Distance(ObjectManager.Me.Position, ObjectManager.Target.Position) < 6)
{
    Move.StrafeLeft(Move.MoveAction.PressKey, 1500);
    MovementManager.Face(ObjectManager.Target);
}

 

Expand  

Thanks for that, I appreciate it! But as per my previous post, for some reason it doesn't work for me. Are you using WRobot for Vanilla?

EDIT: Also, do you use Pathfinder (General Settings --> Path-finding)? What are your Class / Fight Class settings?

Sorry I don't play Vanilla. All Path Finding settings are default.

I don't have a ranged class to try it with, and I am not sure how Vanilla might defer using built in WRobot functions..

// Debuff 20549 = War Stomp | 19975 = Entangling Roots
while (ObjectManager.Target.IsValid &&
    (ObjectManager.Target.HaveBuff(20549) || ObjectManager.Target.HaveBuff(19975)) &&
    Vector3.Distance(ObjectManager.Me.Position, ObjectManager.Target.Position) < 6)
{
    // Start Movement
    Move.StrafeLeft(Move.MoveAction.PressKey, 2250);

    while (ObjectManager.Me.GetMove)
        Thread.Sleep(10);
  
    // Stop Movement and Face Target
    MovementManager.StopMove();
    MovementManager.Face(ObjectManager.Target);
    MovementManager.StopMove();

    // Launch spell(s) here...
}

With WRotation it works fine (Manage Character Movement disabled), Automaton, Grinder, Quester etc should work, but
with melee feral druid, it kept trying to run to the target for my range. The automated bot actions are a bit different as the
bot continues the character movement on its own.

public float Range { get { return 4.95f; } }

Maybe someone else can chime in on this. I am at a loss @Seminko. Sorry.

  On 10/30/2017 at 6:35 PM, Apexx said:

Sorry I don't play Vanilla.

Expand  

So this must be the root of the problem. You're using non-vanilla Wrobot version, I use vanilla Wrobot, for you it's working, for me it's not. Thank you for trying man!

@Droidz we might possibly have a bug on our hands.

  On 10/30/2017 at 7:50 PM, sjb211 said:

Vanilla can also work properly, you can try attachments(trial version)
good luck

Expand  

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!

  On 10/30/2017 at 7:56 PM, Seminko said:

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!

Expand  

he's hammered

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...