capint 0 Posted November 27, 2017 Share Posted November 27, 2017 Hi all, I've thrown together a plugin to try and get my hunter to correctly range against targets it's fighting as if it pulls when they're too close it's just stuck in the deadzone. I've whipped this up for vanilla but the get target/get distance doesn't seem to be working. Any advice from you experienced folks here? I can't seem to find an api so it's all ripped from other projects I've read. Thanks using wManager; using System; using System.Threading; using System.Windows; using robotManager.Helpful; using wManager.Wow.Class; using wManager.Wow.Enums; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using robotManager.Products; using System.Collections.Generic; using System.Linq; public class Main : wManager.Plugin.IPlugin { private bool _loop; public void Initialize() { _loop = true; Loop(); } void Loop() { while (_loop) { Thread.Sleep(100); GetInRange(); } } public void GetInRange() { if (Fight.InFight) { if (ObjectManager.get_Target().get_GetDistance() <= 9f && ObjectManager.get_Target().get_GetDistance() >= 2f) { Lua.LuaDoString("MoveBackwardStart()", false); } if (ObjectManager.get_Target().get_GetDistance() >= 9f) { Lua.LuaDoString("MoveBackwardStop()", false); } } } public void Dispose() { _loop = false; } public void Settings() { MessageBox.Show("No settings for this plugin."); } } Link to comment https://wrobot.eu/forums/topic/7850-range-check-plugin-issues/ 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