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

srazdokunebil

Toggle "Manage Character Movement" Setting in WRotation

Recommended Posts

I'm trying to add a toggle to my fightclass to enable/disable character movement with a hotkey.  I'm looking to enable/disable WRotation ->Product Settings ->Manage Character Movement while the rotation is running?  If this is possible, which is the C# variable that this setting maps to?  I wasn't able to find a definitive answer in the WRobot API or the forums.

I'm using this in the context of PQR/WRotation where a melee player might occasionally toggle this setting on to "stick" to mobs.

 

Share this post


Link to post
Share on other sites

Hello, no tested but like that:

    public static bool ManageMovement()
    {
        if (robotManager.Products.Products.ProductName == "WRotation")
        {
            string errorsCSharp;
            if (wManager.Wow.Helpers.RunCodeExtension.RunScript(robotManager.Helpful.RunCode.CodeType.CSharp, @"robotManager.Helpful.Var.SetVar(""ManageMovementWRotation"", WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement);", "", out errorsCSharp))
            {
                return robotManager.Helpful.Var.Exist("ManageMovementWRotation") && robotManager.Helpful.Var.GetVar<bool>("ManageMovementWRotation");
            }
        }

        return false;
    }

(try to call this code only one time at start (and cache value) to avoid performance problem)

Share this post


Link to post
Share on other sites

Thank you, I really appreciate your help!  I am integrating this inside of Matenia's 1.12.1 fightclass framework for a melee class.  I've declared your function ManageMovement(), and executed it inside the Initialize() subroutine, which executes its contents once at the beginning as you suggest.  Am I correct in inferring that your code is meant to toggle the value of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement when boolean variable ManageMovementWRotation is toggled? 

This does not seem to work--  I am, however, able to access the correct boolean value of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement according to the setting in WRotation -> Product Settings -> Manage Character Movement.  I'm just not able to toggle it while wRotation is running.

Share this post


Link to post
Share on other sites
5 hours ago, srazdokunebil said:

Thank you, I really appreciate your help!  I am integrating this inside of Matenia's 1.12.1 fightclass framework for a melee class.  I've declared your function ManageMovement(), and executed it inside the Initialize() subroutine, which executes its contents once at the beginning as you suggest.  Am I correct in inferring that your code is meant to toggle the value of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement when boolean variable ManageMovementWRotation is toggled? 

This does not seem to work--  I am, however, able to access the correct boolean value of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement according to the setting in WRotation -> Product Settings -> Manage Character Movement.  I'm just not able to toggle it while wRotation is running.

Are you sure it's not toggeling? You won't see it change, because if you change the values within your config instead of using the interface, the switches doesn't turn untill you restart wrobot. 😉

Share this post


Link to post
Share on other sites

Thanks for chiming in!  I am aware that the wrobot application winform switch element 'Manage Character Movement' shouldn't toggle in response to the state of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement being toggled,  not unless wrobot is stopped and started again.

I'm not 100% clear on what of Droidz's suggestion does, in particular:

wManager.Wow.Helpers.RunCodeExtension.RunScript(robotManager.Helpful.RunCode.CodeType.CSharp, @"robotManager.Helpful.Var.SetVar(""ManageMovementWRotation"", WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement);", "", out errorsCSharp))

Does this create variable ManageMovementWRotation that becomes an alias of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement?  Toggling the ManageMovementWRotation variable in turn toggles the WRotation setting?  I'm a bit confused as I don't have a clear understanding of what wManager.Wow.Helpers.RunCodeExtension.RunScript is doing.

Share this post


Link to post
Share on other sites
6 hours ago, srazdokunebil said:

Thanks for chiming in!  I am aware that the wrobot application winform switch element 'Manage Character Movement' shouldn't toggle in response to the state of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement being toggled,  not unless wrobot is stopped and started again.

I'm not 100% clear on what of Droidz's suggestion does, in particular:

wManager.Wow.Helpers.RunCodeExtension.RunScript(robotManager.Helpful.RunCode.CodeType.CSharp, @"robotManager.Helpful.Var.SetVar(""ManageMovementWRotation"", WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement);", "", out errorsCSharp))

Does this create variable ManageMovementWRotation that becomes an alias of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement?  Toggling the ManageMovementWRotation variable in turn toggles the WRotation setting?  I'm a bit confused as I don't have a clear understanding of what wManager.Wow.Helpers.RunCodeExtension.RunScript is doing.

It does about the same, but gives you an error message if any errors happens.

Share this post


Link to post
Share on other sites

From what I understand, the code:

wManager.Wow.Helpers.RunCodeExtension.RunScript(robotManager.Helpful.RunCode.CodeType.CSharp, @"robotManager.Helpful.Var.SetVar(""ManageMovementWRotation"", WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement);", "", out errorsCSharp)

..creates variable ManageMovementWRotation, and assigns it the value of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement.  How does this change the value of WRotation.Bot.WRotationSetting.CurrentSetting.ManageMovement while wrobot is running?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...