srazdokunebil 6 Posted February 20, 2020 Share Posted February 20, 2020 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. Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/ Share on other sites More sharing options...
Droidz 2738 Posted February 21, 2020 Share Posted February 21, 2020 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) Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/#findComment-56876 Share on other sites More sharing options...
srazdokunebil 6 Posted February 25, 2020 Author Share Posted February 25, 2020 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. Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/#findComment-56898 Share on other sites More sharing options...
Ordush 185 Posted February 25, 2020 Share Posted February 25, 2020 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. ? Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/#findComment-56899 Share on other sites More sharing options...
srazdokunebil 6 Posted February 25, 2020 Author Share Posted February 25, 2020 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. Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/#findComment-56904 Share on other sites More sharing options...
Ordush 185 Posted February 25, 2020 Share Posted February 25, 2020 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. Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/#findComment-56910 Share on other sites More sharing options...
srazdokunebil 6 Posted February 25, 2020 Author Share Posted February 25, 2020 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? Link to comment https://wrobot.eu/forums/topic/11888-toggle-manage-character-movement-setting-in-wrotation/#findComment-56911 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now